diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java b/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java index 2020c9fa739..8335dbf1ae5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -32,11 +32,10 @@ import org.springframework.util.Assert; /** * Utility class for handling registration of AOP auto-proxy creators. * - *
Only a single auto-proxy creator can be registered yet multiple concrete - * implementations are available. Therefore this class wraps a simple escalation - * protocol, allowing classes to request a particular auto-proxy creator and know - * that class, {@code or a subclass thereof}, will eventually be resident - * in the application context. + *
Only a single auto-proxy creator should be registered yet multiple concrete
+ * implementations are available. This class provides a simple escalation protocol,
+ * allowing a caller to request a particular auto-proxy creator and know that creator,
+ * or a more capable variant thereof, will be registered as a post-processor.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -55,12 +54,10 @@ public abstract class AopConfigUtils {
/**
* Stores the auto proxy creator classes in escalation order.
*/
- private static final List Only a single auto-proxy creator can be registered and multiple tags may wish
- * to register different concrete implementations. As such this class delegates to
- * {@link AopConfigUtils} which wraps a simple escalation protocol. Therefore classes
- * may request a particular auto-proxy creator and know that class, or a subclass
- * thereof, will eventually be resident in the application context.
+ * Only a single auto-proxy creator should be registered and multiple configuration
+ * elements may wish to register different concrete implementations. As such this class
+ * delegates to {@link AopConfigUtils} which provides a simple escalation protocol.
+ * Callers may request a particular auto-proxy creator and know that creator,
+ * or a more capable variant thereof, will be registered as a post-processor.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -95,9 +95,8 @@ public abstract class AopNamespaceUtils {
private static void registerComponentIfNecessary(@Nullable BeanDefinition beanDefinition, ParserContext parserContext) {
if (beanDefinition != null) {
- BeanComponentDefinition componentDefinition =
- new BeanComponentDefinition(beanDefinition, AopConfigUtils.AUTO_PROXY_CREATOR_BEAN_NAME);
- parserContext.registerComponent(componentDefinition);
+ parserContext.registerComponent(
+ new BeanComponentDefinition(beanDefinition, AopConfigUtils.AUTO_PROXY_CREATOR_BEAN_NAME));
}
}
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
index 0c6501189a9..6ad96135d97 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 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.
@@ -27,12 +27,6 @@ import org.springframework.lang.Nullable;
/**
* A Spring {@link FactoryBean} that builds and exposes a preconfigured {@link ForkJoinPool}.
*
- * For details on the ForkJoinPool API and its use with RecursiveActions, see the
- * JDK 7 javadoc.
- *
- * {@code jsr166.jar}, containing {@code java.util.concurrent} updates for Java 6, can be obtained
- * from the concurrency interest website.
- *
* @author Juergen Hoeller
* @since 3.1
*/
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
index 197c7f01d8b..dcdd1be3f09 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
@@ -111,7 +111,7 @@ public class ScheduledExecutorFactoryBean extends ExecutorConfigurationSupport
}
/**
- * Set the remove-on-cancel mode on {@link ScheduledThreadPoolExecutor} (JDK 7+).
+ * Set the remove-on-cancel mode on {@link ScheduledThreadPoolExecutor}.
* Default is {@code false}. If set to {@code true}, the target executor will be
* switched into remove-on-cancel mode (if possible, with a soft fallback otherwise).
*/
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java
index 6b8ef9745b8..a1d167f6028 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java
@@ -88,7 +88,7 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport
}
/**
- * Set the remove-on-cancel mode on {@link ScheduledThreadPoolExecutor} (JDK 7+).
+ * Set the remove-on-cancel mode on {@link ScheduledThreadPoolExecutor}.
* Default is {@code false}. If set to {@code true}, the target executor will be
* switched into remove-on-cancel mode (if possible, with a soft fallback otherwise).
* This setting can be modified at runtime, for example through JMX.
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java
index 6642f8fc9e7..3c536d6cfee 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java
@@ -49,7 +49,7 @@ public abstract class OrderUtils {
ClassUtils.forName("javax.annotation.Priority", OrderUtils.class.getClassLoader());
}
catch (Throwable ex) {
- // javax.annotation.Priority not available, or present but not loadable (on JDK 6)
+ // javax.annotation.Priority not available
priorityAnnotationType = null;
}
}
diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
index a62131a8dd5..918f2e8dbb5 100644
--- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
+++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
@@ -145,12 +145,7 @@ public class AnnotationUtilsTests {
assertNull(getAnnotation(bridgeMethod, Order.class));
assertNotNull(findAnnotation(bridgeMethod, Order.class));
- // As of OpenJDK 8 b99, invoking getAnnotation() on a bridge method actually finds
- // an annotation on its 'bridged' method. This differs from the previous behavior
- // of JDK 5 through 7 and from the current behavior of the Eclipse compiler;
- // however, we need to ensure that the tests pass in the Gradle build. So we
- // comment out the following assertion.
- // assertNull(bridgeMethod.getAnnotation(Transactional.class));
+ assertNotNull(bridgeMethod.getAnnotation(Transactional.class));
assertNotNull(getAnnotation(bridgeMethod, Transactional.class));
assertNotNull(findAnnotation(bridgeMethod, Transactional.class));
}
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java
index b5b6ec2971b..adb89f13a37 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2018 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.
@@ -58,15 +58,15 @@ public class SqlRowSetResultSetExtractor implements ResultSetExtractor This implementation creates a Spring {@link ResultSetWrappingSqlRowSet}
+ * instance that wraps a standard JDBC {@link CachedRowSet} instance.
* Can be overridden to use a different implementation.
* @param rs the original ResultSet (connected)
* @return the disconnected SqlRowSet
* @throws SQLException if thrown by JDBC methods
- * @see #newCachedRowSet
+ * @see #newCachedRowSet()
* @see org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet
*/
protected SqlRowSet createSqlRowSet(ResultSet rs) throws SQLException {
@@ -76,14 +76,14 @@ public class SqlRowSetResultSetExtractor implements ResultSetExtractor The default implementation uses JDBC 4.1's {@link RowSetFactory}.
* @return a new CachedRowSet instance
* @throws SQLException if thrown by JDBC methods
* @see #createSqlRowSet
+ * @see RowSetProvider#newFactory()
+ * @see RowSetFactory#createCachedRowSet()
*/
protected CachedRowSet newCachedRowSet() throws SQLException {
return rowSetFactory.createCachedRowSet();
diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java
index 35f87341490..60426ba5d28 100644
--- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java
+++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java
@@ -57,6 +57,9 @@ import org.springframework.util.CommonsLogWriter;
*/
public class HessianExporter extends RemoteExporter implements InitializingBean {
+ /**
+ * The content type for hessian ({@code application/x-hessian}).
+ */
public static final String CONTENT_TYPE_HESSIAN = "application/x-hessian";
diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java
index 314aadaaa97..1b55b45136a 100644
--- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java
+++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java
@@ -63,10 +63,10 @@ public class HessianServiceExporter extends HessianExporter implements HttpReque
response.setContentType(CONTENT_TYPE_HESSIAN);
try {
- invoke(request.getInputStream(), response.getOutputStream());
+ invoke(request.getInputStream(), response.getOutputStream());
}
catch (Throwable ex) {
- throw new NestedServletException("Hessian skeleton invocation failed", ex);
+ throw new NestedServletException("Hessian skeleton invocation failed", ex);
}
}
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleHttpServerJaxWsServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleHttpServerJaxWsServiceExporter.java
index 1c8fbad4b57..96b25e58409 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleHttpServerJaxWsServiceExporter.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleHttpServerJaxWsServiceExporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 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.
@@ -164,8 +164,8 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
InetSocketAddress address = (this.hostname != null ?
new InetSocketAddress(this.hostname, this.port) : new InetSocketAddress(this.port));
HttpServer server = HttpServer.create(address, this.backlog);
- if (this.logger.isInfoEnabled()) {
- this.logger.info("Starting HttpServer at address " + address);
+ if (logger.isInfoEnabled()) {
+ logger.info("Starting HttpServer at address " + address);
}
server.start();
this.server = server;
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleJaxWsServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleJaxWsServiceExporter.java
index 8746786f144..77e952b9308 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleJaxWsServiceExporter.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/SimpleJaxWsServiceExporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2018 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.
@@ -30,11 +30,7 @@ import javax.xml.ws.WebServiceProvider;
*
* Note that this exporter will only work if the JAX-WS runtime actually
* supports publishing with an address argument, i.e. if the JAX-WS runtime
- * ships an internal HTTP server. This is the case with the JAX-WS runtime
- * that's included in Sun's JDK 6 but not with the standalone JAX-WS 2.1 RI.
- *
- * For explicit configuration of JAX-WS endpoints with Sun's JDK 6
- * HTTP server, consider using {@link SimpleHttpServerJaxWsServiceExporter}!
+ * ships an internal HTTP server.
*
* @author Juergen Hoeller
* @since 2.5
@@ -44,6 +40,9 @@ import javax.xml.ws.WebServiceProvider;
*/
public class SimpleJaxWsServiceExporter extends AbstractJaxWsServiceExporter {
+ /**
+ * The default base address.
+ */
public static final String DEFAULT_BASE_ADDRESS = "http://localhost:8080/";
private String baseAddress = DEFAULT_BASE_ADDRESS;
diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java
index dc93ade1f92..43e80875e25 100644
--- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java
+++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java
@@ -156,7 +156,7 @@ public class ConcurrentWebSocketSessionDecorator extends WebSocketSessionDecorat
}
finally {
this.sendStartTime = 0;
- flushLock.unlock();
+ this.flushLock.unlock();
}
return true;
}