diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java index 2f59b4af88e..9ca006be428 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.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. @@ -31,8 +31,8 @@ import org.springframework.util.Assert; * Generic auto proxy creator that builds AOP proxies for specific beans * based on detected Advisors for each bean. * - *
Subclasses must implement the abstract {@link #findCandidateAdvisors()} - * method to return a list of Advisors applying to any object. Subclasses can + *
Subclasses may override the {@link #findCandidateAdvisors()} method to + * return a custom list of Advisors applying to any object. Subclasses can * also override the inherited {@link #shouldSkip} method to exclude certain * objects from auto-proxying. * @@ -160,7 +160,7 @@ public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyC *
The default implementation is empty. *
Typically used to add Advisors that expose contextual information
* required by some of the later advisors.
- * @param candidateAdvisors Advisors that have already been identified as
+ * @param candidateAdvisors the Advisors that have already been identified as
* applying to a given bean
*/
protected void extendAdvisors(List Fetches "spring-beans.dtd" from the class path resource
@@ -57,6 +57,7 @@ public class BeansDtdResolver implements EntityResolver {
logger.trace("Trying to resolve XML entity with public ID [" + publicId +
"] and system ID [" + systemId + "]");
}
+
if (systemId != null && systemId.endsWith(DTD_EXTENSION)) {
int lastPathSeparator = systemId.lastIndexOf('/');
int dtdNameStart = systemId.indexOf(DTD_NAME, lastPathSeparator);
@@ -80,11 +81,10 @@ public class BeansDtdResolver implements EntityResolver {
logger.debug("Could not resolve beans DTD [" + systemId + "]: not found in classpath", ex);
}
}
-
}
}
- // Use the default behavior -> download from website or wherever.
+ // Fall back to the parser's default behavior.
return null;
}
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java
index 3fed99e2608..0fa2b834c3b 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.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.
@@ -38,15 +38,15 @@ import org.springframework.util.CollectionUtils;
* {@link EntityResolver} implementation that attempts to resolve schema URLs into
* local {@link ClassPathResource classpath resources} using a set of mappings files.
*
- * By default, this class will look for mapping files in the classpath using the pattern:
- * {@code META-INF/spring.schemas} allowing for multiple files to exist on the
- * classpath at any one time.
+ * By default, this class will look for mapping files in the classpath using the
+ * pattern: {@code META-INF/spring.schemas} allowing for multiple files to exist on
+ * the classpath at any one time.
*
- * The format of {@code META-INF/spring.schemas} is a properties
- * file where each line should be of the form {@code systemId=schema-location}
- * where {@code schema-location} should also be a schema file in the classpath.
- * Since systemId is commonly a URL, one must be careful to escape any ':' characters
- * which are treated as delimiters in properties files.
+ * The format of {@code META-INF/spring.schemas} is a properties file where each line
+ * should be of the form {@code systemId=schema-location} where {@code schema-location}
+ * should also be a schema file in the classpath. Since systemId is commonly a URL,
+ * one must be careful to escape any ':' characters which are treated as delimiters
+ * in properties files.
*
* The pattern for the mapping files can be overidden using the
* {@link #PluggableSchemaResolver(ClassLoader, String)} constructor
@@ -103,6 +103,7 @@ public class PluggableSchemaResolver implements EntityResolver {
this.schemaMappingsLocation = schemaMappingsLocation;
}
+
@Override
@Nullable
public InputSource resolveEntity(String publicId, @Nullable String systemId) throws IOException {
@@ -131,6 +132,8 @@ public class PluggableSchemaResolver implements EntityResolver {
}
}
}
+
+ // Fall back to the parser's default behavior.
return null;
}
@@ -169,7 +172,7 @@ public class PluggableSchemaResolver implements EntityResolver {
@Override
public String toString() {
- return "EntityResolver using mappings " + getSchemaMappings();
+ return "EntityResolver using schema mappings " + getSchemaMappings();
}
}
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java b/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java
index 5388a6afa07..33438b0c8e5 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.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.
@@ -19,7 +19,6 @@ package org.springframework.jms.connection;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -58,11 +57,11 @@ public class JmsResourceHolder extends ResourceHolderSupport {
private boolean frozen = false;
- private final List S getSession(Class sessionType) {
return getSession(sessionType, null);
}
+ /**
+ * Return this resource holder's Session of the given type
+ * for the given connection, or {@code null} if none.
+ */
@Nullable
- public Session getSession(Class extends Session> sessionType, @Nullable Connection connection) {
- List S getSession(Class sessionType, @Nullable Connection connection) {
+ LinkedList