mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
apply formatter
This commit is contained in:
@@ -17,14 +17,13 @@ public abstract class CacheService {
|
||||
public abstract void setLastEntries(Feed feed, List<String> entries);
|
||||
|
||||
public String buildUniqueEntryKey(Feed feed, FeedEntry entry) {
|
||||
return DigestUtils.sha1Hex(entry.getGuid() +
|
||||
entry.getUrl());
|
||||
return DigestUtils.sha1Hex(entry.getGuid() + entry.getUrl());
|
||||
}
|
||||
|
||||
public abstract Category getRootCategory(User user);
|
||||
|
||||
public abstract void setRootCategory(User user, Category category);
|
||||
|
||||
|
||||
public abstract Map<Long, Long> getUnreadCounts(User user);
|
||||
|
||||
public abstract void setUnreadCounts(User user, Map<Long, Long> map);
|
||||
|
||||
@@ -29,8 +29,7 @@ import com.google.api.client.util.Lists;
|
||||
@ApplicationScoped
|
||||
public class RedisCacheService extends CacheService {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(RedisCacheService.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(RedisCacheService.class);
|
||||
|
||||
private JedisPool pool = new JedisPool(new JedisPoolConfig(), "localhost");
|
||||
private ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -113,8 +112,7 @@ public class RedisCacheService extends CacheService {
|
||||
String key = buildRedisUnreadCountKey(user);
|
||||
String json = jedis.get(key);
|
||||
if (json != null) {
|
||||
MapType type = mapper.getTypeFactory().constructMapType(
|
||||
Map.class, Long.class, Long.class);
|
||||
MapType type = mapper.getTypeFactory().constructMapType(Map.class, Long.class, Long.class);
|
||||
map = mapper.readValue(json, type);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user