From 370e3d683a648db506056fcb2af3394e5fea70ea Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 20 Feb 2017 23:00:12 +0100 Subject: [PATCH] Polishing --- .../AbstractFallbackCacheOperationSource.java | 5 ++--- .../simp/broker/DefaultSubscriptionRegistry.java | 10 ++++------ .../web/filter/ShallowEtagHeaderFilter.java | 1 + 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java index cee063acdb..0e5b6d5d76 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,8 +70,7 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera *

As this base class is not marked Serializable, the cache will be recreated * after serialization - provided that the concrete subclass is Serializable. */ - private final Map> attributeCache = - new ConcurrentHashMap<>(1024); + private final Map> attributeCache = new ConcurrentHashMap<>(1024); /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java index bb0e289e65..48a42b2196 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -361,8 +361,7 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry { private static class SessionSubscriptionRegistry { // sessionId -> SessionSubscriptionInfo - private final ConcurrentMap sessions = - new ConcurrentHashMap<>(); + private final ConcurrentMap sessions = new ConcurrentHashMap<>(); public SessionSubscriptionInfo getSubscriptions(String sessionId) { return this.sessions.get(sessionId); @@ -406,11 +405,10 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry { private final String sessionId; // destination -> subscriptions - private final Map> destinationLookup = - new ConcurrentHashMap<>(4); + private final Map> destinationLookup = new ConcurrentHashMap<>(4); public SessionSubscriptionInfo(String sessionId) { - Assert.notNull(sessionId, "sessionId must not be null"); + Assert.notNull(sessionId, "'sessionId' must not be null"); this.sessionId = sessionId; } diff --git a/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java b/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java index 5d29d1c59b..0d89426c69 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java @@ -48,6 +48,7 @@ import org.springframework.web.util.WebUtils; * * @author Arjen Poutsma * @author Rossen Stoyanchev + * @author Brian Clozel * @author Juergen Hoeller * @since 3.0 */