Browse Source

Polishing

pull/22823/head
Juergen Hoeller 7 years ago
parent
commit
486f64f748
  1. 8
      spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java
  2. 11
      spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java

8
spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java

@ -290,7 +290,7 @@ public class UrlPathHelper {
} }
/** /**
* Sanitize the given path with the following rules: * Sanitize the given path. Uses the following rules:
* <ul> * <ul>
* <li>replace all "//" by "/"</li> * <li>replace all "//" by "/"</li>
* </ul> * </ul>
@ -497,7 +497,7 @@ public class UrlPathHelper {
/** /**
* Remove ";" (semicolon) content from the given request URI if the * Remove ";" (semicolon) content from the given request URI if the
* {@linkplain #setRemoveSemicolonContent removeSemicolonContent} * {@linkplain #setRemoveSemicolonContent removeSemicolonContent}
* property is set to "true". Note that "jssessionid" is always removed. * property is set to "true". Note that "jsessionid" is always removed.
* @param requestUri the request URI string to remove ";" content from * @param requestUri the request URI string to remove ";" content from
* @return the updated URI string * @return the updated URI string
*/ */
@ -533,7 +533,7 @@ public class UrlPathHelper {
* the URL path from which the variables were extracted is already decoded * the URL path from which the variables were extracted is already decoded
* through a call to {@link #getLookupPathForRequest(HttpServletRequest)}. * through a call to {@link #getLookupPathForRequest(HttpServletRequest)}.
* @param request current HTTP request * @param request current HTTP request
* @param vars URI variables extracted from the URL path * @param vars the URI variables extracted from the URL path
* @return the same Map or a new Map instance * @return the same Map or a new Map instance
*/ */
public Map<String, String> decodePathVariables(HttpServletRequest request, Map<String, String> vars) { public Map<String, String> decodePathVariables(HttpServletRequest request, Map<String, String> vars) {
@ -553,7 +553,7 @@ public class UrlPathHelper {
* the URL path from which the variables were extracted is already decoded * the URL path from which the variables were extracted is already decoded
* through a call to {@link #getLookupPathForRequest(HttpServletRequest)}. * through a call to {@link #getLookupPathForRequest(HttpServletRequest)}.
* @param request current HTTP request * @param request current HTTP request
* @param vars URI variables extracted from the URL path * @param vars the URI variables extracted from the URL path
* @return the same Map or a new Map instance * @return the same Map or a new Map instance
*/ */
public MultiValueMap<String, String> decodeMatrixVariables( public MultiValueMap<String, String> decodeMatrixVariables(

11
spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java

@ -80,15 +80,8 @@ import org.junit.Test;
import org.springframework.beans.FatalBeanException; import org.springframework.beans.FatalBeanException;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.not; import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
/** /**
* Test class for {@link Jackson2ObjectMapperBuilder}. * Test class for {@link Jackson2ObjectMapperBuilder}.

Loading…
Cancel
Save