@@ -55,15 +55,15 @@ private static enum State {
5555 /**
5656 * Event source internal state.
5757 */
58- private final AtomicReference <State > state = new AtomicReference <State >(State .READY );
58+ private final AtomicReference <State > state = new AtomicReference <>(State .READY );
5959 /**
6060 * List of all listeners not bound to receive only events of a particular name.
6161 */
62- private final List <EventListener > unboundListeners = new CopyOnWriteArrayList <EventListener >();
62+ private final List <EventListener > unboundListeners = new CopyOnWriteArrayList <>();
6363 /**
6464 * A map of listeners bound to receive only events of a particular name.
6565 */
66- private final ConcurrentMap <String , List <EventListener >> boundListeners = new ConcurrentHashMap <String , List < EventListener > >();
66+ private final ConcurrentMap <String , List <EventListener >> boundListeners = new ConcurrentHashMap <>();
6767
6868 private final MultivaluedMap <String , Object > headers ;
6969
@@ -96,7 +96,7 @@ private Builder(final WebTarget endpoint) {
9696 this .endpoint = endpoint ;
9797 }
9898
99- private MultivaluedMap <String , Object > headers = new StringKeyIgnoreCaseMultivaluedMap <Object >();
99+ private MultivaluedMap <String , Object > headers = new StringKeyIgnoreCaseMultivaluedMap <>();
100100
101101 /**
102102 * Set a custom name for the event source.
@@ -233,7 +233,7 @@ public static Builder target(WebTarget endpoint) {
233233 * @throws NullPointerException in case the supplied web target is {@code null}.
234234 */
235235 public EventSource (final WebTarget endpoint ) {
236- this (endpoint , true , new StringKeyIgnoreCaseMultivaluedMap <Object >());
236+ this (endpoint , true , new StringKeyIgnoreCaseMultivaluedMap <>());
237237 }
238238
239239 /**
@@ -293,7 +293,7 @@ public Thread newThread(Runnable r) {
293293 }
294294 });
295295
296- this .headers = new StringKeyIgnoreCaseMultivaluedMap <Object >();
296+ this .headers = new StringKeyIgnoreCaseMultivaluedMap <>();
297297 this .headers .putAll (headers );
298298
299299 if (open ) {
@@ -373,7 +373,7 @@ public void register(final EventListener listener, final String eventName, final
373373
374374 private void addBoundListener (final String name , final EventListener listener ) {
375375 List <EventListener > listeners = boundListeners .putIfAbsent (name ,
376- new CopyOnWriteArrayList <EventListener >(Collections .singleton (listener )));
376+ new CopyOnWriteArrayList <>(Collections .singleton (listener )));
377377 if (listeners != null ) {
378378 // alas, new listener collection registration conflict:
379379 // need to add the new listener to the existing listener collection
0 commit comments