mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
intellij autofixes
This commit is contained in:
@@ -16,7 +16,7 @@ import lombok.RequiredArgsConstructor;
|
||||
public class FeedEntryKeyword {
|
||||
|
||||
public enum Mode {
|
||||
INCLUDE, EXCLUDE;
|
||||
INCLUDE, EXCLUDE
|
||||
}
|
||||
|
||||
private final String keyword;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class FeedFetcher {
|
||||
boolean etagHeaderValueChanged = !StringUtils.equals(eTag, result.getETag());
|
||||
|
||||
String hash = DigestUtils.sha1Hex(content);
|
||||
if (lastContentHash != null && hash != null && lastContentHash.equals(hash)) {
|
||||
if (lastContentHash != null && lastContentHash.equals(hash)) {
|
||||
log.debug("content hash not modified: {}", feedUrl);
|
||||
throw new NotModifiedException("content hash not modified",
|
||||
lastModifiedHeaderValueChanged ? result.getLastModifiedSince() : null,
|
||||
|
||||
@@ -13,8 +13,8 @@ import com.commafeed.backend.model.Feed;
|
||||
@Singleton
|
||||
public class FeedRefreshIntervalCalculator {
|
||||
|
||||
private boolean heavyLoad;
|
||||
private int refreshIntervalMinutes;
|
||||
private final boolean heavyLoad;
|
||||
private final int refreshIntervalMinutes;
|
||||
|
||||
@Inject
|
||||
public FeedRefreshIntervalCalculator(CommaFeedConfiguration config) {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class FeedRefreshUpdater implements Managed {
|
||||
|
||||
// lock on feed, make sure we are not updating the same feed twice at
|
||||
// the same time
|
||||
String key1 = StringUtils.trimToEmpty("" + feed.getId());
|
||||
String key1 = StringUtils.trimToEmpty(String.valueOf(feed.getId()));
|
||||
|
||||
// lock on content, make sure we are not updating the same entry
|
||||
// twice at the same time
|
||||
|
||||
@@ -154,7 +154,7 @@ public class FeedUtils {
|
||||
for (Emit emit : emits) {
|
||||
int matchIndex = emit.getStart();
|
||||
|
||||
sb.append(source.substring(prevIndex, matchIndex));
|
||||
sb.append(source, prevIndex, matchIndex);
|
||||
sb.append(HtmlEntities.HTML_TO_NUMERIC_MAP.get(emit.getKeyword()));
|
||||
prevIndex = emit.getEnd() + 1;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public class FeedUtils {
|
||||
if (index == -1) {
|
||||
return null;
|
||||
}
|
||||
String encoding = pi.substring(index + 10, pi.length());
|
||||
String encoding = pi.substring(index + 10);
|
||||
encoding = encoding.substring(0, encoding.indexOf('"'));
|
||||
return encoding;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user