Skip to content

Commit 0711d6d

Browse files
committed
Polishing
1 parent ef7cf2c commit 0711d6d

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

spring-core/src/main/java/org/springframework/core/convert/support/StreamConverter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ public class StreamConverter implements ConditionalGenericConverter {
4444

4545
private final ConversionService conversionService;
4646

47+
4748
public StreamConverter(ConversionService conversionService) {
4849
this.conversionService = conversionService;
4950
}
5051

52+
5153
@Override
5254
public Set<ConvertiblePair> getConvertibleTypes() {
5355
return CONVERTIBLE_TYPES;

spring-core/src/main/java/org/springframework/core/convert/support/StringToLocaleConverter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,10 +22,11 @@
2222
import org.springframework.util.StringUtils;
2323

2424
/**
25-
* Converts a String to a Locale.
25+
* Converts from a String to a {@link java.util.Locale}.
2626
*
2727
* @author Keith Donald
2828
* @since 3.0
29+
* @see StringUtils#parseLocaleString
2930
*/
3031
final class StringToLocaleConverter implements Converter<String, Locale> {
3132

spring-core/src/main/java/org/springframework/core/convert/support/StringToUUIDConverter.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,19 +22,17 @@
2222
import org.springframework.util.StringUtils;
2323

2424
/**
25-
* Converts from a String to a java.util.UUID by calling {@link UUID#fromString(String)}.
25+
* Converts from a String to a {@link java.util.UUID}.
2626
*
2727
* @author Phillip Webb
2828
* @since 3.2
29+
* @see UUID#fromString
2930
*/
3031
final class StringToUUIDConverter implements Converter<String, UUID> {
3132

3233
@Override
3334
public UUID convert(String source) {
34-
if (StringUtils.hasLength(source)) {
35-
return UUID.fromString(source.trim());
36-
}
37-
return null;
35+
return (StringUtils.hasLength(source) ? UUID.fromString(source.trim()) : null);
3836
}
3937

4038
}

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -59,8 +59,7 @@ private static class ResourceUrlEncodingResponseWrapper extends HttpServletRespo
5959
/* Cache the index of the path within the DispatcherServlet mapping. */
6060
private Integer indexLookupPath;
6161

62-
63-
private ResourceUrlEncodingResponseWrapper(HttpServletRequest request, HttpServletResponse wrapped) {
62+
public ResourceUrlEncodingResponseWrapper(HttpServletRequest request, HttpServletResponse wrapped) {
6463
super(wrapped);
6564
this.request = request;
6665
}
@@ -69,11 +68,11 @@ private ResourceUrlEncodingResponseWrapper(HttpServletRequest request, HttpServl
6968
public String encodeURL(String url) {
7069
ResourceUrlProvider resourceUrlProvider = getResourceUrlProvider();
7170
if (resourceUrlProvider == null) {
72-
logger.debug("Request attribute exposing ResourceUrlProvider not found.");
71+
logger.debug("Request attribute exposing ResourceUrlProvider not found");
7372
return super.encodeURL(url);
7473
}
7574
initIndexLookupPath(resourceUrlProvider);
76-
if(url.length() >= this.indexLookupPath) {
75+
if (url.length() >= this.indexLookupPath) {
7776
String prefix = url.substring(0, this.indexLookupPath);
7877
String lookupPath = url.substring(this.indexLookupPath);
7978
lookupPath = resourceUrlProvider.getForLookupPath(lookupPath);

0 commit comments

Comments
 (0)