diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java index ea7d8979c17..607ed56ca92 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -18,10 +18,7 @@ package org.springframework.validation.beanvalidation; import java.io.IOException; import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Proxy; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -51,7 +48,6 @@ import org.springframework.core.DefaultParameterNameDiscoverer; import org.springframework.core.ParameterNameDiscoverer; import org.springframework.core.io.Resource; import org.springframework.util.Assert; -import org.springframework.util.ClassUtils; import org.springframework.util.CollectionUtils; import org.springframework.util.ReflectionUtils; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java index ec29246bb2a..42b47d85c08 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2017 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. @@ -95,12 +95,12 @@ public class WebSphereDataSourceAdapter extends IsolationLevelDataSourceAdapter Class> wsrraFactoryClass = getClass().getClassLoader().loadClass("com.ibm.websphere.rsadapter.WSRRAFactory"); this.newJdbcConnSpecMethod = wsrraFactoryClass.getMethod("createJDBCConnectionSpec", (Class>[]) null); this.wsDataSourceGetConnectionMethod = - this.wsDataSourceClass.getMethod("getConnection", new Class>[] {jdbcConnSpecClass}); + this.wsDataSourceClass.getMethod("getConnection", jdbcConnSpecClass); this.setTransactionIsolationMethod = - jdbcConnSpecClass.getMethod("setTransactionIsolation", new Class>[] {int.class}); - this.setReadOnlyMethod = jdbcConnSpecClass.getMethod("setReadOnly", new Class>[] {Boolean.class}); - this.setUserNameMethod = jdbcConnSpecClass.getMethod("setUserName", new Class>[] {String.class}); - this.setPasswordMethod = jdbcConnSpecClass.getMethod("setPassword", new Class>[] {String.class}); + jdbcConnSpecClass.getMethod("setTransactionIsolation", int.class); + this.setReadOnlyMethod = jdbcConnSpecClass.getMethod("setReadOnly", Boolean.class); + this.setUserNameMethod = jdbcConnSpecClass.getMethod("setUserName", String.class); + this.setPasswordMethod = jdbcConnSpecClass.getMethod("setPassword", String.class); } catch (Exception ex) { throw new IllegalStateException( @@ -144,7 +144,7 @@ public class WebSphereDataSourceAdapter extends IsolationLevelDataSourceAdapter } /** - * Create a WebSphere {@code JDBCConnectionSpec} object for the given charateristics. + * Create a WebSphere {@code JDBCConnectionSpec} object for the given characteristics. *
The default implementation uses reflection to apply the given settings.
* Can be overridden in subclasses to customize the JDBCConnectionSpec object
* (JDBCConnectionSpec javadoc;
diff --git a/spring-test/src/main/java/org/springframework/test/util/AopTestUtils.java b/spring-test/src/main/java/org/springframework/test/util/AopTestUtils.java
index 560b7d03b9b..51598fccea3 100644
--- a/spring-test/src/main/java/org/springframework/test/util/AopTestUtils.java
+++ b/spring-test/src/main/java/org/springframework/test/util/AopTestUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 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.
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
* @see org.springframework.aop.framework.AopProxyUtils
* @see ReflectionTestUtils
*/
-public class AopTestUtils {
+public abstract class AopTestUtils {
/**
* Get the target object of the supplied {@code candidate} object.
@@ -42,22 +42,22 @@ public class AopTestUtils {
* {@linkplain AopUtils#isAopProxy proxy}, the target of the proxy will
* be returned; otherwise, the {@code candidate} will be returned
* as is.
- * @param candidate the instance to check (potentially a Spring AOP proxy);
- * never {@code null}
- * @return the target object or the {@code candidate}; never {@code null}
+ * @param candidate the instance to check (potentially a Spring AOP proxy;
+ * never {@code null})
+ * @return the target object or the {@code candidate} (never {@code null})
* @throws IllegalStateException if an error occurs while unwrapping a proxy
* @see Advised#getTargetSource()
* @see #getUltimateTargetObject
*/
@SuppressWarnings("unchecked")
public static