Commit 699b037a authored by akwizgran's avatar akwizgran

Remove redundant constant for max blog name length.

parent e474042a
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment