Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
briar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julian Dehm
briar
Commits
699b037a
Verified
Commit
699b037a
authored
Jan 16, 2018
by
akwizgran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant constant for max blog name length.
parent
e474042a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
briar-api/src/main/java/org/briarproject/briar/api/blog/BlogConstants.java
...n/java/org/briarproject/briar/api/blog/BlogConstants.java
+0
-6
briar-core/src/main/java/org/briarproject/briar/feed/FeedFactoryImpl.java
...ain/java/org/briarproject/briar/feed/FeedFactoryImpl.java
+2
-2
No files found.
briar-api/src/main/java/org/briarproject/briar/api/blog/BlogConstants.java
View file @
699b037a
package
org.briarproject.briar.api.blog
;
import
static
org
.
briarproject
.
bramble
.
api
.
identity
.
AuthorConstants
.
MAX_AUTHOR_NAME_LENGTH
;
import
static
org
.
briarproject
.
bramble
.
api
.
sync
.
SyncConstants
.
MAX_MESSAGE_BODY_LENGTH
;
public
interface
BlogConstants
{
/**
* The maximum length of a blogs's name in UTF-8 bytes.
*/
int
MAX_BLOG_NAME_LENGTH
=
MAX_AUTHOR_NAME_LENGTH
;
/**
* The maximum length of a blog post's body in bytes.
*/
...
...
briar-core/src/main/java/org/briarproject/briar/feed/FeedFactoryImpl.java
View file @
699b037a
...
...
@@ -20,7 +20,7 @@ import org.briarproject.briar.api.feed.Feed;
import
javax.inject.Inject
;
import
static
org
.
briarproject
.
br
iar
.
api
.
blog
.
BlogConstants
.
MAX_BLOG
_NAME_LENGTH
;
import
static
org
.
briarproject
.
br
amble
.
api
.
identity
.
AuthorConstants
.
MAX_AUTHOR
_NAME_LENGTH
;
import
static
org
.
briarproject
.
briar
.
api
.
feed
.
FeedConstants
.
KEY_FEED_ADDED
;
import
static
org
.
briarproject
.
briar
.
api
.
feed
.
FeedConstants
.
KEY_FEED_AUTHOR
;
import
static
org
.
briarproject
.
briar
.
api
.
feed
.
FeedConstants
.
KEY_FEED_DESC
;
...
...
@@ -53,7 +53,7 @@ class FeedFactoryImpl implements FeedFactory {
public
Feed
createFeed
(
String
url
,
SyndFeed
syndFeed
)
{
String
title
=
syndFeed
.
getTitle
();
if
(
title
==
null
)
title
=
"RSS"
;
else
title
=
StringUtils
.
truncateUtf8
(
title
,
MAX_
BLOG
_NAME_LENGTH
);
else
title
=
StringUtils
.
truncateUtf8
(
title
,
MAX_
AUTHOR
_NAME_LENGTH
);
KeyPair
keyPair
=
cryptoComponent
.
generateSignatureKeyPair
();
LocalAuthor
localAuthor
=
authorFactory
.
createLocalAuthor
(
title
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment