aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util/PrettyTimeFormatter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/util/PrettyTimeFormatter.java')
-rw-r--r--src/main/java/com/juick/util/PrettyTimeFormatter.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main/java/com/juick/util/PrettyTimeFormatter.java b/src/main/java/com/juick/util/PrettyTimeFormatter.java
index 383f4d9a..792d185d 100644
--- a/src/main/java/com/juick/util/PrettyTimeFormatter.java
+++ b/src/main/java/com/juick/util/PrettyTimeFormatter.java
@@ -32,14 +32,12 @@ public class PrettyTimeFormatter {
// Cache PrettyTime per locale. LRU cache to prevent memory leak.
private static final Map<Locale, PrettyTime> PRETTY_TIME_LOCALE_MAP =
- new LinkedHashMap<Locale, PrettyTime>(MAX_CACHE_SIZE + 1, 1.1F, true)
- {
- @Override
- protected boolean removeEldestEntry(Map.Entry<Locale, PrettyTime> eldest)
- {
- return size() > MAX_CACHE_SIZE;
- }
- };
+ new LinkedHashMap<>(MAX_CACHE_SIZE + 1, 1.1F, true) {
+ @Override
+ protected boolean removeEldestEntry(Map.Entry<Locale, PrettyTime> eldest) {
+ return size() > MAX_CACHE_SIZE;
+ }
+ };
public String format(final Locale locale, final Date value)
{