diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java index 9e18b281389..56e69745e8f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -28,8 +28,8 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver; import org.springframework.util.StringValueResolver; /** - * {@link PlaceholderConfigurerSupport} subclass that resolves ${...} placeholders - * against {@link #setLocation local} {@link #setProperties properties} and/or system properties + * {@link PlaceholderConfigurerSupport} subclass that resolves ${...} placeholders against + * {@link #setLocation local} {@link #setProperties properties} and/or system properties * and environment variables. * *
As of Spring 3.1, {@link org.springframework.context.support.PropertySourcesPlaceholderConfigurer @@ -41,19 +41,13 @@ import org.springframework.util.StringValueResolver; *
Prior to Spring 3.1, the {@code
NOTE: Access to environment variables does not work on the
- * Sun VM 1.4, where the corresponding {@link System#getenv} support was
- * disabled - before it eventually got re-enabled for the Sun VM 1.5.
- * Please upgrade to 1.5 (or higher) if you intend to rely on the
- * environment variable support.
* @see #setSystemPropertiesMode
* @see java.lang.System#getProperty(String)
* @see java.lang.System#getenv(String)
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java
index 69343f04b2b..0c7e29e39b8 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -62,6 +62,7 @@ abstract class AutowireUtils {
return Integer.compare(c2pl, c1pl);
};
+
/**
* Sort the given constructors, preferring public constructors and "greedy" ones with
* a maximum number of arguments. The result will contain public constructors first,
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java
index fd4f8666546..e1240f3b657 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -82,9 +82,10 @@ public class ReplaceOverride extends MethodOverride {
if (this.typeIdentifiers.size() != method.getParameterCount()) {
return false;
}
+ Class>[] parameterTypes = method.getParameterTypes();
for (int i = 0; i < this.typeIdentifiers.size(); i++) {
String identifier = this.typeIdentifiers.get(i);
- if (!method.getParameterTypes()[i].getName().contains(identifier)) {
+ if (!parameterTypes[i].getName().contains(identifier)) {
return false;
}
}
diff --git a/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java
index e67bae0c263..bcce5a86779 100644
--- a/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java
+++ b/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -38,7 +38,7 @@ public class DirectFieldAccessorTests extends AbstractPropertyAccessorTests {
@Test
- public void withShadowedField() throws Exception {
+ public void withShadowedField() {
final StringBuilder sb = new StringBuilder();
@SuppressWarnings("serial")
diff --git a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java
index 384be563f67..9190f60615d 100644
--- a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java
+++ b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -20,7 +20,6 @@ import java.io.Serializable;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
-
import org.junit.Test;
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
@@ -60,7 +59,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
}
@Test
- public void testProxyIsJustInterface() throws Throwable {
+ public void testProxyIsJustInterface() {
TestBean raw = new TestBean();
raw.setAge(32);
AdvisedSupport pc = new AdvisedSupport(ITestBean.class);
@@ -73,7 +72,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
}
@Test
- public void testInterceptorIsInvokedWithNoTarget() throws Throwable {
+ public void testInterceptorIsInvokedWithNoTarget() {
// Test return value
final int age = 25;
MethodInterceptor mi = (invocation -> age);
@@ -87,7 +86,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
}
@Test
- public void testTargetCanGetInvocationWithPrivateClass() throws Throwable {
+ public void testTargetCanGetInvocationWithPrivateClass() {
final ExposedInvocationTestBean expectedTarget = new ExposedInvocationTestBean() {
@Override
protected void assertions(MethodInvocation invocation) {
@@ -128,7 +127,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
}
@Test
- public void testEqualsAndHashCodeDefined() throws Exception {
+ public void testEqualsAndHashCodeDefined() {
AdvisedSupport as = new AdvisedSupport(Named.class);
as.setTarget(new Person());
JdkDynamicAopProxy aopProxy = new JdkDynamicAopProxy(as);
@@ -139,7 +138,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
}
@Test // SPR-13328
- public void testVarargsWithEnumArray() throws Exception {
+ public void testVarargsWithEnumArray() {
ProxyFactory proxyFactory = new ProxyFactory(new VarargTestBean());
VarargTestInterface proxy = (VarargTestInterface) proxyFactory.getProxy();
assertTrue(proxy.doWithVarargs(MyEnum.A, MyOtherEnum.C));
diff --git a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
index a10c8f1328c..36a1e328822 100644
--- a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -235,8 +235,8 @@ public final class BridgeMethodResolver {
if (bridgeMethod == bridgedMethod) {
return true;
}
- return (Arrays.equals(bridgeMethod.getParameterTypes(), bridgedMethod.getParameterTypes()) &&
- bridgeMethod.getReturnType().equals(bridgedMethod.getReturnType()));
+ return (bridgeMethod.getReturnType().equals(bridgedMethod.getReturnType()) &&
+ Arrays.equals(bridgeMethod.getParameterTypes(), bridgedMethod.getParameterTypes()));
}
}
diff --git a/spring-core/src/main/java/org/springframework/core/ResolvableType.java b/spring-core/src/main/java/org/springframework/core/ResolvableType.java
index 08e072e0f01..ca7bece83eb 100644
--- a/spring-core/src/main/java/org/springframework/core/ResolvableType.java
+++ b/spring-core/src/main/java/org/springframework/core/ResolvableType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -591,8 +591,8 @@ public class ResolvableType implements Serializable {
}
/**
- * Return a {@link ResolvableType} for the specified nesting level. See
- * {@link #getNested(int, Map)} for details.
+ * Return a {@link ResolvableType} for the specified nesting level.
+ * See {@link #getNested(int, Map)} for details.
* @param nestingLevel the nesting level
* @return the {@link ResolvableType} type, or {@code #NONE}
*/
@@ -601,11 +601,11 @@ public class ResolvableType implements Serializable {
}
/**
- * Return a {@link ResolvableType} for the specified nesting level. The nesting level
- * refers to the specific generic parameter that should be returned. A nesting level
- * of 1 indicates this type; 2 indicates the first nested generic; 3 the second; and so
- * on. For example, given {@code List The nesting level refers to the specific generic parameter that should be returned.
+ * A nesting level of 1 indicates this type; 2 indicates the first nested generic;
+ * 3 the second; and so on. For example, given {@code List The {@code typeIndexesPerLevel} map can be used to reference a specific generic
* for the given level. For example, an index of 0 would refer to a {@code Map} key;
* whereas, 1 would refer to the value. If the map does not contain a value for a
@@ -614,11 +614,11 @@ public class ResolvableType implements Serializable {
* {@code String[]}, a nesting level of 2 refers to {@code String}.
* If a type does not {@link #hasGenerics() contain} generics the
* {@link #getSuperType() supertype} hierarchy will be considered.
- * @param nestingLevel the required nesting level, indexed from 1 for the current
- * type, 2 for the first nested generic, 3 for the second and so on
- * @param typeIndexesPerLevel a map containing the generic index for a given nesting
- * level (may be {@code null})
- * @return a {@link ResolvableType} for the nested level or {@link #NONE}
+ * @param nestingLevel the required nesting level, indexed from 1 for the
+ * current type, 2 for the first nested generic, 3 for the second and so on
+ * @param typeIndexesPerLevel a map containing the generic index for a given
+ * nesting level (may be {@code null})
+ * @return a {@link ResolvableType} for the nested level, or {@link #NONE}
*/
public ResolvableType getNested(int nestingLevel, @Nullable Map If no generic is available at the specified indexes {@link #NONE} is returned.
- * @param indexes the indexes that refer to the generic parameter (may be omitted to
- * return the first generic)
- * @return a {@link ResolvableType} for the specified generic or {@link #NONE}
+ * @param indexes the indexes that refer to the generic parameter
+ * (may be omitted to return the first generic)
+ * @return a {@link ResolvableType} for the specified generic, or {@link #NONE}
* @see #hasGenerics()
* @see #getGenerics()
* @see #resolveGeneric(int...)
@@ -992,8 +992,8 @@ public class ResolvableType implements Serializable {
}
/**
- * Return a {@link ResolvableType} for the specified {@link Class}, doing
- * assignability checks against the raw class only (analogous to
+ * Return a {@link ResolvableType} for the specified {@link Class},
+ * doing assignability checks against the raw class only (analogous to
* {@link Class#isAssignableFrom}, which this serves as a wrapper for.
* For example: {@code ResolvableType.forRawClass(List.class)}.
* @param clazz the class to introspect ({@code null} is semantically
diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java
index a2feee5568a..c32dc819d5a 100644
--- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java
+++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -150,7 +150,7 @@ public class WebClientResponseException extends WebClientException {
}
/**
- * Create {@code WebClientResponseException} or an HTTP status specific sub-class.
+ * Create {@code WebClientResponseException} or an HTTP status specific subclass.
* @since 5.1
*/
public static WebClientResponseException create(
@@ -160,7 +160,7 @@ public class WebClientResponseException extends WebClientException {
}
/**
- * Create {@code WebClientResponseException} or an HTTP status specific sub-class.
+ * Create {@code WebClientResponseException} or an HTTP status specific subclass.
* @since 5.1.4
*/
public static WebClientResponseException create(
@@ -209,7 +209,7 @@ public class WebClientResponseException extends WebClientException {
- // Sub-classes for specific, client-side, HTTP status codes..
+ // Subclasses for specific, client-side, HTTP status codes
/**
* {@link WebClientResponseException} for status HTTP 400 Bad Request.
@@ -362,7 +362,7 @@ public class WebClientResponseException extends WebClientException {
- // Sub-classes for specific, server-side, HTTP status codes..
+ // Subclasses for specific, server-side, HTTP status codes
/**
* {@link WebClientResponseException} for status HTTP 500 Internal Server Error.