diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java index 62735c4890..4ad244b286 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -68,7 +68,7 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver { * @param userRegistry the registry, never {@code null} */ public DefaultUserDestinationResolver(SimpUserRegistry userRegistry) { - Assert.notNull(userRegistry, "'userRegistry' must not be null"); + Assert.notNull(userRegistry, "SimpUserRegistry must not be null"); this.userRegistry = userRegistry; } @@ -87,8 +87,8 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver { * @param prefix the prefix to use */ public void setUserDestinationPrefix(String prefix) { - Assert.hasText(prefix, "prefix must not be empty"); - this.prefix = prefix.endsWith("/") ? prefix : prefix + "/"; + Assert.hasText(prefix, "Prefix must not be empty"); + this.prefix = (prefix.endsWith("/") ? prefix : prefix + "/"); } /** @@ -102,11 +102,11 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver { * Use this property to indicate whether the leading slash from translated * user destinations should be removed or not. This depends on the * destination prefixes the message broker is configured with. - *

By default this is set to {@code false}, i.e. "do not change the - * target destination", although + *

By default this is set to {@code false}, i.e. + * "do not change the target destination", although * {@link org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration - * AbstractMessageBrokerConfiguration} may change that to {@code true} if - * the configured destinations do not have a leading slash. + * AbstractMessageBrokerConfiguration} may change that to {@code true} + * if the configured destinations do not have a leading slash. * @param remove whether to remove the leading slash * @since 4.3.14 */ @@ -116,6 +116,7 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver { /** * Whether to remove the leading slash from target destinations. + * @since 4.3.14 */ public boolean isRemoveLeadingSlash() { return this.removeLeadingSlash; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java index e3e30a7d90..a40e9bbd51 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java @@ -42,7 +42,6 @@ import static org.junit.Assert.*; */ public class ServerHttpRequestTests { - @Test public void queryParamsNone() throws Exception { MultiValueMap params = createHttpRequest("/path").getQueryParams(); @@ -64,7 +63,7 @@ public class ServerHttpRequestTests { assertEquals(Arrays.asList("1", "2"), params.get("a")); } - @Test // SPR-15140 + @Test // SPR-15140 public void queryParamsWithEncodedValue() throws Exception { MultiValueMap params = createHttpRequest("/path?a=%20%2B+%C3%A0").getQueryParams(); assertEquals(1, params.size()); @@ -85,7 +84,7 @@ public class ServerHttpRequestTests { assertEquals(Collections.singletonList(null), params.get("a")); } - @Test // SPR-16434 + @Test // SPR-16434 public void mutatePathWithEncodedQueryParams() throws Exception { ServerHttpRequest request = createHttpRequest("/path?name=%E6%89%8E%E6%A0%B9") .mutate().path("/mutatedPath").build();