mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Remove redundant constant for max blog name length.
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
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.
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.briarproject.briar.api.feed.Feed;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static org.briarproject.briar.api.blog.BlogConstants.MAX_BLOG_NAME_LENGTH;
|
||||
import static org.briarproject.bramble.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,
|
||||
|
||||
Reference in New Issue
Block a user