Skip to content

Commit 773d175

Browse files
committed
Polishing
1 parent e14c2de commit 773d175

File tree

8 files changed

+23
-19
lines changed

8 files changed

+23
-19
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/UnsatisfiedDependencyException.java

Lines changed: 3 additions & 3 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-2016 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.
@@ -56,7 +56,7 @@ public UnsatisfiedDependencyException(
5656
public UnsatisfiedDependencyException(
5757
String resourceDescription, String beanName, String propertyName, BeansException ex) {
5858

59-
this(resourceDescription, beanName, propertyName, (ex != null ? ": " + ex.getMessage() : ""));
59+
this(resourceDescription, beanName, propertyName, (ex != null ? ex.getMessage() : ""));
6060
initCause(ex);
6161
}
6262

@@ -88,7 +88,7 @@ public UnsatisfiedDependencyException(
8888
public UnsatisfiedDependencyException(
8989
String resourceDescription, String beanName, int ctorArgIndex, Class<?> ctorArgType, BeansException ex) {
9090

91-
this(resourceDescription, beanName, ctorArgIndex, ctorArgType, (ex != null ? ": " + ex.getMessage() : ""));
91+
this(resourceDescription, beanName, ctorArgIndex, ctorArgType, (ex != null ? ex.getMessage() : ""));
9292
initCause(ex);
9393
}
9494

spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java

Lines changed: 5 additions & 1 deletion
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-2016 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.
@@ -196,6 +196,7 @@ public void increaseNestingLevel() {
196196
* Optionally set the concrete class that contains this dependency.
197197
* This may differ from the class that declares the parameter/field in that
198198
* it may be a subclass thereof, potentially substituting type variables.
199+
* @since 4.0
199200
*/
200201
public void setContainingClass(Class<?> containingClass) {
201202
this.containingClass = containingClass;
@@ -206,6 +207,7 @@ public void setContainingClass(Class<?> containingClass) {
206207

207208
/**
208209
* Build a ResolvableType object for the wrapped parameter/field.
210+
* @since 4.0
209211
*/
210212
public ResolvableType getResolvableType() {
211213
return (this.field != null ? ResolvableType.forField(this.field, this.nestingLevel, this.containingClass) :
@@ -217,13 +219,15 @@ public ResolvableType getResolvableType() {
217219
* <p>This is {@code false} by default but may be overridden to return {@code true} in order
218220
* to suggest to a {@link org.springframework.beans.factory.support.AutowireCandidateResolver}
219221
* that a fallback match is acceptable as well.
222+
* @since 4.0
220223
*/
221224
public boolean fallbackMatchAllowed() {
222225
return false;
223226
}
224227

225228
/**
226229
* Return a variant of this descriptor that is intended for a fallback match.
230+
* @since 4.0
227231
* @see #fallbackMatchAllowed()
228232
*/
229233
public DependencyDescriptor forFallbackMatch() {

spring-context-support/src/main/java/org/springframework/cache/caffeine/CaffeineCache.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -64,6 +64,7 @@ public CaffeineCache(String name, com.github.benmanes.caffeine.cache.Cache<Objec
6464
*/
6565
public CaffeineCache(String name, com.github.benmanes.caffeine.cache.Cache<Object, Object> cache,
6666
boolean allowNullValues) {
67+
6768
super(allowNullValues);
6869
Assert.notNull(name, "Name must not be null");
6970
Assert.notNull(cache, "Cache must not be null");
@@ -142,6 +143,7 @@ public Object apply(Object key) {
142143
}
143144
}
144145

146+
145147
private class LoadFunction implements Function<Object, Object> {
146148

147149
private final Callable<?> valueLoader;

spring-context/src/main/java/org/springframework/cache/Cache.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -164,15 +164,13 @@ class ValueRetrievalException extends RuntimeException {
164164
private final Object key;
165165

166166
public ValueRetrievalException(Object key, Callable<?> loader, Throwable ex) {
167-
super(String.format("Value for key '%s' could not " +
168-
"be loaded using '%s'", key, loader), ex);
167+
super(String.format("Value for key '%s' could not " + "be loaded using '%s'", key, loader), ex);
169168
this.key = key;
170169
}
171170

172171
public Object getKey() {
173172
return this.key;
174173
}
175-
176174
}
177175

178176
}

spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -55,7 +55,7 @@ public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConve
5555
/**
5656
* Construct a new {@code MarshallingHttpMessageConverter} with no {@link Marshaller} or
5757
* {@link Unmarshaller} set. The Marshaller and Unmarshaller must be set after construction
58-
* by invoking {@link #setMarshaller(Marshaller)} and {@link #setUnmarshaller(Unmarshaller)} .
58+
* by invoking {@link #setMarshaller(Marshaller)} and {@link #setUnmarshaller(Unmarshaller)}.
5959
*/
6060
public MarshallingHttpMessageConverter() {
6161
}
@@ -104,14 +104,15 @@ public void setUnmarshaller(Unmarshaller unmarshaller) {
104104
this.unmarshaller = unmarshaller;
105105
}
106106

107+
107108
@Override
108109
public boolean canRead(Class<?> clazz, MediaType mediaType) {
109-
return canRead(mediaType) && (this.unmarshaller != null) && this.unmarshaller.supports(clazz);
110+
return (canRead(mediaType) && this.unmarshaller != null && this.unmarshaller.supports(clazz));
110111
}
111112

112113
@Override
113114
public boolean canWrite(Class<?> clazz, MediaType mediaType) {
114-
return canWrite(mediaType) && (this.marshaller != null) && this.marshaller.supports(clazz);
115+
return (canWrite(mediaType) && this.marshaller != null && this.marshaller.supports(clazz));
115116
}
116117

117118
@Override

spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -516,7 +516,6 @@ public void releaseReadLock() {
516516
this.readWriteLock.readLock().unlock();
517517
}
518518

519-
520519
public void register(T mapping, Object handler, Method method) {
521520
this.readWriteLock.writeLock().lock();
522521
try {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.LinkedHashMap;
2828
import java.util.List;
2929
import java.util.Map;
30-
3130
import javax.servlet.http.HttpServletRequest;
3231

3332
import org.springframework.core.io.AbstractResource;
@@ -225,6 +224,7 @@ protected VersionStrategy getStrategyForPath(String requestPath) {
225224
return null;
226225
}
227226

227+
228228
private class FileNameVersionedResource extends AbstractResource implements VersionedResource {
229229

230230
private final Resource original;
@@ -300,7 +300,6 @@ public InputStream getInputStream() throws IOException {
300300
public String getVersion() {
301301
return this.version;
302302
}
303-
304303
}
305304

306305
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import org.springframework.core.io.Resource;
2020

2121
/**
22-
* Interface for a resource descriptor that describes its version
23-
* with a version string that can be derived from its content and/or metadata.
22+
* Interface for a resource descriptor that describes its version with a
23+
* version string that can be derived from its content and/or metadata.
2424
*
2525
* @author Brian Clozel
2626
* @since 4.2.5
@@ -29,4 +29,5 @@
2929
public interface VersionedResource extends Resource {
3030

3131
String getVersion();
32+
3233
}

0 commit comments

Comments
 (0)