diff --git a/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/ISO8601DateParser.java b/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/ISO8601DateParser.java index 45340d6..6b6100a 100644 --- a/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/ISO8601DateParser.java +++ b/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/ISO8601DateParser.java @@ -31,13 +31,13 @@ * $ */ public class ISO8601DateParser { - private static ThreadLocal normalDf = new ThreadLocal() { + private static ThreadLocal normalDf = new ThreadLocal<>() { @Override protected synchronized DateFormat initialValue() { return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz", Locale.ENGLISH); } }; - private static ThreadLocal hackDf = new ThreadLocal() { + private static ThreadLocal hackDf = new ThreadLocal<>() { @Override protected synchronized DateFormat initialValue() { return new SimpleDateFormat("yyyy-MM-dd'T'HH-mm-ss", Locale.ENGLISH); diff --git a/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/formats/JsonActivityFeedProcessor.java b/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/formats/JsonActivityFeedProcessor.java index 0278118..3292214 100644 --- a/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/formats/JsonActivityFeedProcessor.java +++ b/core/src/main/java/com/zaubersoftware/gnip4j/api/impl/formats/JsonActivityFeedProcessor.java @@ -22,10 +22,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.Version; -import com.fasterxml.jackson.databind.DeserializationConfig; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationConfig; import com.fasterxml.jackson.databind.module.SimpleModule; import com.zaubersoftware.gnip4j.api.StreamNotification; import com.zaubersoftware.gnip4j.api.model.Activity; diff --git a/core/src/test/java/com/zaubersoftware/gnip4j/api/StreamNotificationAdapterTest.java b/core/src/test/java/com/zaubersoftware/gnip4j/api/StreamNotificationAdapterTest.java index edec5c3..f812f78 100644 --- a/core/src/test/java/com/zaubersoftware/gnip4j/api/StreamNotificationAdapterTest.java +++ b/core/src/test/java/com/zaubersoftware/gnip4j/api/StreamNotificationAdapterTest.java @@ -31,7 +31,7 @@ public class StreamNotificationAdapterTest { /** nothing to do! */ @Test public final void testNull() { - final StreamNotification n = new StreamNotificationAdapter() { + final StreamNotification n = new StreamNotificationAdapter<>() { @Override public void notify(final Activity activity, final GnipStream stream) { } diff --git a/core/src/test/java/com/zaubersoftware/gnip4j/http/LocalhostTestDriver.java b/core/src/test/java/com/zaubersoftware/gnip4j/http/LocalhostTestDriver.java index 4db4c08..7f11cae 100644 --- a/core/src/test/java/com/zaubersoftware/gnip4j/http/LocalhostTestDriver.java +++ b/core/src/test/java/com/zaubersoftware/gnip4j/http/LocalhostTestDriver.java @@ -74,7 +74,7 @@ public String getHttpMethodForRulesDelete() { System.out.println("-- Creating stream"); final AtomicInteger counter = new AtomicInteger(); - final StreamNotificationAdapter n = new StreamNotificationAdapter() { + final StreamNotificationAdapter n = new StreamNotificationAdapter<>() { @Override public void notify(final Activity activity, final GnipStream stream) { final int i = counter.getAndIncrement(); diff --git a/core/src/test/java/com/zaubersoftware/gnip4j/http/StreamTestDriver.java b/core/src/test/java/com/zaubersoftware/gnip4j/http/StreamTestDriver.java index 55fa7d7..6073e75 100644 --- a/core/src/test/java/com/zaubersoftware/gnip4j/http/StreamTestDriver.java +++ b/core/src/test/java/com/zaubersoftware/gnip4j/http/StreamTestDriver.java @@ -64,7 +64,7 @@ public void testname() throws Exception { System.out.println("-- Creating stream"); final AtomicInteger counter = new AtomicInteger(); - final StreamNotificationAdapter n = new StreamNotificationAdapter() { + final StreamNotificationAdapter n = new StreamNotificationAdapter<>() { @Override public void notify(final Activity activity, final GnipStream stream) { final int i = counter.getAndIncrement(); diff --git a/core/src/test/java/com/zaubersoftware/gnip4j/jmx/JMXTest.java b/core/src/test/java/com/zaubersoftware/gnip4j/jmx/JMXTest.java index d884ee7..2c5a37b 100644 --- a/core/src/test/java/com/zaubersoftware/gnip4j/jmx/JMXTest.java +++ b/core/src/test/java/com/zaubersoftware/gnip4j/jmx/JMXTest.java @@ -38,7 +38,7 @@ * @since May 26, 2011 */ public final class JMXTest { - private final StreamNotificationAdapter observer = new StreamNotificationAdapter() { + private final StreamNotificationAdapter observer = new StreamNotificationAdapter<>() { @Override public void notify(final Activity activity, final GnipStream stream) {