Skip to content

Commit 5c20c97

Browse files
committed
Polishing
1 parent 82f1340 commit 5c20c97

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -29,8 +29,8 @@
2929
* Generic auto proxy creator that builds AOP proxies for specific beans
3030
* based on detected Advisors for each bean.
3131
*
32-
* <p>Subclasses must implement the abstract {@link #findCandidateAdvisors()}
33-
* method to return a list of Advisors applying to any object. Subclasses can
32+
* <p>Subclasses may override the {@link #findCandidateAdvisors()} method to
33+
* return a custom list of Advisors applying to any object. Subclasses can
3434
* also override the inherited {@link #shouldSkip} method to exclude certain
3535
* objects from auto-proxying.
3636
*
@@ -153,7 +153,7 @@ protected List<Advisor> sortAdvisors(List<Advisor> advisors) {
153153
* <p>The default implementation is empty.
154154
* <p>Typically used to add Advisors that expose contextual information
155155
* required by some of the later advisors.
156-
* @param candidateAdvisors Advisors that have already been identified as
156+
* @param candidateAdvisors the Advisors that have already been identified as
157157
* applying to a given bean
158158
*/
159159
protected void extendAdvisors(List<Advisor> candidateAdvisors) {

spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java

Lines changed: 4 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-2019 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.
@@ -27,7 +27,7 @@
2727
import org.springframework.core.io.Resource;
2828

2929
/**
30-
* EntityResolver implementation for the Spring beans DTD,
30+
* {@link EntityResolver} implementation for the Spring beans DTD,
3131
* to load the DTD from the Spring class path (or JAR file).
3232
*
3333
* <p>Fetches "spring-beans-2.0.dtd" from the class path resource
@@ -57,6 +57,7 @@ public InputSource resolveEntity(String publicId, String systemId) throws IOExce
5757
logger.trace("Trying to resolve XML entity with public ID [" + publicId +
5858
"] and system ID [" + systemId + "]");
5959
}
60+
6061
if (systemId != null && systemId.endsWith(DTD_EXTENSION)) {
6162
int lastPathSeparator = systemId.lastIndexOf('/');
6263
int dtdNameStart = systemId.indexOf(DTD_NAME, lastPathSeparator);
@@ -80,11 +81,10 @@ public InputSource resolveEntity(String publicId, String systemId) throws IOExce
8081
logger.debug("Could not resolve beans DTD [" + systemId + "]: not found in classpath", ex);
8182
}
8283
}
83-
8484
}
8585
}
8686

87-
// Use the default behavior -> download from website or wherever.
87+
// Fall back to the parser's default behavior.
8888
return null;
8989
}
9090

spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -37,15 +37,15 @@
3737
* {@link EntityResolver} implementation that attempts to resolve schema URLs into
3838
* local {@link ClassPathResource classpath resources} using a set of mappings files.
3939
*
40-
* <p>By default, this class will look for mapping files in the classpath using the pattern:
41-
* {@code META-INF/spring.schemas} allowing for multiple files to exist on the
42-
* classpath at any one time.
40+
* <p>By default, this class will look for mapping files in the classpath using the
41+
* pattern: {@code META-INF/spring.schemas} allowing for multiple files to exist on
42+
* the classpath at any one time.
4343
*
44-
* The format of {@code META-INF/spring.schemas} is a properties
45-
* file where each line should be of the form {@code systemId=schema-location}
46-
* where {@code schema-location} should also be a schema file in the classpath.
47-
* Since systemId is commonly a URL, one must be careful to escape any ':' characters
48-
* which are treated as delimiters in properties files.
44+
* <p>The format of {@code META-INF/spring.schemas} is a properties file where each line
45+
* should be of the form {@code systemId=schema-location} where {@code schema-location}
46+
* should also be a schema file in the classpath. Since systemId is commonly a URL,
47+
* one must be careful to escape any ':' characters which are treated as delimiters
48+
* in properties files.
4949
*
5050
* <p>The pattern for the mapping files can be overidden using the
5151
* {@link #PluggableSchemaResolver(ClassLoader, String)} constructor
@@ -100,6 +100,7 @@ public PluggableSchemaResolver(ClassLoader classLoader, String schemaMappingsLoc
100100
this.schemaMappingsLocation = schemaMappingsLocation;
101101
}
102102

103+
103104
@Override
104105
public InputSource resolveEntity(String publicId, String systemId) throws IOException {
105106
if (logger.isTraceEnabled()) {
@@ -127,6 +128,8 @@ public InputSource resolveEntity(String publicId, String systemId) throws IOExce
127128
}
128129
}
129130
}
131+
132+
// Fall back to the parser's default behavior.
130133
return null;
131134
}
132135

@@ -165,7 +168,7 @@ private Map<String, String> getSchemaMappings() {
165168

166169
@Override
167170
public String toString() {
168-
return "EntityResolver using mappings " + getSchemaMappings();
171+
return "EntityResolver using schema mappings " + getSchemaMappings();
169172
}
170173

171174
}

0 commit comments

Comments
 (0)