Skip to content

Commit 96e4d3a

Browse files
committed
Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the `Xwerror` flag for the `javadoc` tool. In addition, we now use `Xdoclint:syntax` instead of `Xdoclint:none` in order to validate syntax within our Javadoc. This commit fixes all resulting Javadoc errors and warnings. This commit also upgrades to Undertow 2.2.12.Final and fixes the artifact names for exclusions for the Servlet and annotations APIs. The incorrect exclusion of the Servlet API resulted in the Servlet API being on the classpath twice for the javadoc task, which resulted in the following warnings in previous builds. javadoc: warning - Multiple sources of package comments found for package "javax.servlet" javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http" javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor" javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation" Closes gh-27480
1 parent 0404456 commit 96e4d3a

File tree

81 files changed

+251
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+251
-250
lines changed

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ configure(allprojects) { project ->
139139
entry 'tomcat-embed-core'
140140
entry 'tomcat-embed-websocket'
141141
}
142-
dependencySet(group: 'io.undertow', version: '2.2.10.Final') {
142+
dependencySet(group: 'io.undertow', version: '2.2.12.Final') {
143143
entry 'undertow-core'
144144
entry('undertow-websockets-jsr') {
145145
exclude group: "org.jboss.spec.javax.websocket", name: "jboss-websocket-api_1.1_spec"
146146
}
147147
entry('undertow-servlet') {
148-
exclude group: "org.jboss.spec.javax.servlet", name: "jboss-servlet-api_3.1_spec"
149-
exclude group: "org.jboss.spec.javax.annotation", name: "jboss-annotations-api_1.2_spec"
148+
exclude group: "org.jboss.spec.javax.servlet", name: "jboss-servlet-api_4.0_spec"
149+
exclude group: "org.jboss.spec.javax.annotation", name: "jboss-annotations-api_1.3_spec"
150150
}
151151
}
152152

@@ -371,7 +371,6 @@ configure([rootProject] + javaProjects) { project ->
371371
"https://docs.oracle.com/javaee/7/api/",
372372
"https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ
373373
"https://www.ibm.com/docs/api/v1/content/SSEQTP_8.5.5/com.ibm.websphere.javadoc.doc/web/apidocs/",
374-
"https://glassfish.java.net/nonav/docs/v3/api/",
375374
"https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
376375
"https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
377376
"https://tiles.apache.org/tiles-request/apidocs/",

gradle/docs.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ task api(type: Javadoc) {
4646
stylesheetFile = file("src/docs/api/stylesheet.css")
4747
splitIndex = true
4848
links(project.ext.javadocLinks)
49-
addStringOption('Xdoclint:none', '-quiet')
50-
if(JavaVersion.current().isJava9Compatible()) {
49+
addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint
50+
addBooleanOption('Xwerror', true) // fail build on Javadoc warnings
51+
if (JavaVersion.current().isJava9Compatible()) {
5152
addBooleanOption('html5', true)
5253
}
5354
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
/**
2626
* Convenient TargetSourceCreator using bean name prefixes to create one of three
2727
* well-known TargetSource types:
28-
* <li>: CommonsPool2TargetSource
29-
* <li>% ThreadLocalTargetSource
30-
* <li>! PrototypeTargetSource
28+
* <ul>
29+
* <li>: CommonsPool2TargetSource</li>
30+
* <li>% ThreadLocalTargetSource</li>
31+
* <li>! PrototypeTargetSource</li>
32+
* </ul>
3133
*
3234
* @author Rod Johnson
3335
* @author Stephane Nicoll

spring-beans/src/main/java/org/springframework/beans/BeanUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ public static PropertyDescriptor findPropertyForMethod(Method method, Class<?> c
540540

541541
/**
542542
* Find a JavaBeans PropertyEditor following the 'Editor' suffix convention
543-
* (e.g. "mypackage.MyDomainClass" -> "mypackage.MyDomainClassEditor").
543+
* (e.g. "mypackage.MyDomainClass" &rarr; "mypackage.MyDomainClassEditor").
544544
* <p>Compatible to the standard JavaBeans convention as implemented by
545545
* {@link java.beans.PropertyEditorManager} but isolated from the latter's
546546
* registered default editors for primitive types.

spring-beans/src/main/java/org/springframework/beans/PropertyAccessorUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ public static boolean matchesProperty(String registeredPath, String propertyPath
134134
/**
135135
* Determine the canonical name for the given property path.
136136
* Removes surrounding quotes from map keys:<br>
137-
* {@code map['key']} -> {@code map[key]}<br>
138-
* {@code map["key"]} -> {@code map[key]}
137+
* {@code map['key']} &rarr; {@code map[key]}<br>
138+
* {@code map["key"]} &rarr; {@code map[key]}
139139
* @param propertyName the bean property path
140140
* @return the canonical representation of the property path
141141
*/

spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingBean.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@
4747
* which uses this class to call a static initialization method:
4848
*
4949
* <pre class="code">
50-
* &lt;bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingBean">
51-
* &lt;property name="staticMethod" value="com.whatever.MyClass.init"/>
52-
* &lt;/bean></pre>
50+
* &lt;bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingBean"&gt;
51+
* &lt;property name="staticMethod" value="com.whatever.MyClass.init"/&gt;
52+
* &lt;/bean&gt;</pre>
5353
*
5454
* <p>An example of calling an instance method to start some server bean:
5555
*
5656
* <pre class="code">
57-
* &lt;bean id="myStarter" class="org.springframework.beans.factory.config.MethodInvokingBean">
58-
* &lt;property name="targetObject" ref="myServer"/>
59-
* &lt;property name="targetMethod" value="start"/>
60-
* &lt;/bean></pre>
57+
* &lt;bean id="myStarter" class="org.springframework.beans.factory.config.MethodInvokingBean"&gt;
58+
* &lt;property name="targetObject" ref="myServer"/&gt;
59+
* &lt;property name="targetMethod" value="start"/&gt;
60+
* &lt;/bean&gt;</pre>
6161
*
6262
* @author Juergen Hoeller
6363
* @since 4.0.3

spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@
5656
* which uses this class to call a static factory method:
5757
*
5858
* <pre class="code">
59-
* &lt;bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
60-
* &lt;property name="staticMethod" value="com.whatever.MyClassFactory.getInstance"/>
61-
* &lt;/bean></pre>
59+
* &lt;bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
60+
* &lt;property name="staticMethod" value="com.whatever.MyClassFactory.getInstance"/&gt;
61+
* &lt;/bean&gt;</pre>
6262
*
6363
* <p>An example of calling a static method then an instance method to get at a
6464
* Java system property. Somewhat verbose, but it works.
6565
*
6666
* <pre class="code">
67-
* &lt;bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
68-
* &lt;property name="targetClass" value="java.lang.System"/>
69-
* &lt;property name="targetMethod" value="getProperties"/>
70-
* &lt;/bean>
67+
* &lt;bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
68+
* &lt;property name="targetClass" value="java.lang.System"/&gt;
69+
* &lt;property name="targetMethod" value="getProperties"/&gt;
70+
* &lt;/bean&gt;
7171
*
72-
* &lt;bean id="javaVersion" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
73-
* &lt;property name="targetObject" ref="sysProps"/>
74-
* &lt;property name="targetMethod" value="getProperty"/>
75-
* &lt;property name="arguments" value="java.version"/>
76-
* &lt;/bean></pre>
72+
* &lt;bean id="javaVersion" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
73+
* &lt;property name="targetObject" ref="sysProps"/&gt;
74+
* &lt;property name="targetMethod" value="getProperty"/&gt;
75+
* &lt;property name="arguments" value="java.version"/&gt;
76+
* &lt;/bean&gt;</pre>
7777
*
7878
* @author Colin Sampaleanu
7979
* @author Juergen Hoeller

spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,22 @@
8383
* <p>A sample config in an XML-based
8484
* {@link org.springframework.beans.factory.BeanFactory} might look as follows:
8585
*
86-
* <pre class="code">&lt;beans>
86+
* <pre class="code">&lt;beans&gt;
8787
*
88-
* &lt;!-- Prototype bean since we have state -->
89-
* &lt;bean id="myService" class="a.b.c.MyService" singleton="false"/>
88+
* &lt;!-- Prototype bean since we have state --&gt;
89+
* &lt;bean id="myService" class="a.b.c.MyService" singleton="false"/&gt;
9090
*
91-
* &lt;!-- will lookup the above 'myService' bean by *TYPE* -->
91+
* &lt;!-- will lookup the above 'myService' bean by *TYPE* --&gt;
9292
* &lt;bean id="myServiceFactory"
93-
* class="org.springframework.beans.factory.config.ServiceLocatorFactoryBean">
94-
* &lt;property name="serviceLocatorInterface" value="a.b.c.ServiceFactory"/>
95-
* &lt;/bean>
93+
* class="org.springframework.beans.factory.config.ServiceLocatorFactoryBean"&gt;
94+
* &lt;property name="serviceLocatorInterface" value="a.b.c.ServiceFactory"/&gt;
95+
* &lt;/bean&gt;
9696
*
97-
* &lt;bean id="clientBean" class="a.b.c.MyClientBean">
98-
* &lt;property name="myServiceFactory" ref="myServiceFactory"/>
99-
* &lt;/bean>
97+
* &lt;bean id="clientBean" class="a.b.c.MyClientBean"&gt;
98+
* &lt;property name="myServiceFactory" ref="myServiceFactory"/&gt;
99+
* &lt;/bean&gt;
100100
*
101-
*&lt;/beans></pre>
101+
*&lt;/beans&gt;</pre>
102102
*
103103
* <p>The attendant {@code MyClientBean} class implementation might then
104104
* look something like this:
@@ -135,22 +135,22 @@
135135
* <p>A sample config in an XML-based
136136
* {@link org.springframework.beans.factory.BeanFactory} might look as follows:
137137
*
138-
* <pre class="code">&lt;beans>
138+
* <pre class="code">&lt;beans&gt;
139139
*
140-
* &lt;!-- Prototype beans since we have state (both extend MyService) -->
141-
* &lt;bean id="specialService" class="a.b.c.SpecialService" singleton="false"/>
142-
* &lt;bean id="anotherService" class="a.b.c.AnotherService" singleton="false"/>
140+
* &lt;!-- Prototype beans since we have state (both extend MyService) --&gt;
141+
* &lt;bean id="specialService" class="a.b.c.SpecialService" singleton="false"/&gt;
142+
* &lt;bean id="anotherService" class="a.b.c.AnotherService" singleton="false"/&gt;
143143
*
144144
* &lt;bean id="myServiceFactory"
145-
* class="org.springframework.beans.factory.config.ServiceLocatorFactoryBean">
146-
* &lt;property name="serviceLocatorInterface" value="a.b.c.ServiceFactory"/>
147-
* &lt;/bean>
145+
* class="org.springframework.beans.factory.config.ServiceLocatorFactoryBean"&gt;
146+
* &lt;property name="serviceLocatorInterface" value="a.b.c.ServiceFactory"/&gt;
147+
* &lt;/bean&gt;
148148
*
149-
* &lt;bean id="clientBean" class="a.b.c.MyClientBean">
150-
* &lt;property name="myServiceFactory" ref="myServiceFactory"/>
151-
* &lt;/bean>
149+
* &lt;bean id="clientBean" class="a.b.c.MyClientBean"&gt;
150+
* &lt;property name="myServiceFactory" ref="myServiceFactory"/&gt;
151+
* &lt;/bean&gt;
152152
*
153-
*&lt;/beans></pre>
153+
*&lt;/beans&gt;</pre>
154154
*
155155
* <p>The attendant {@code MyClientBean} class implementation might then
156156
* look something like this:

spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public abstract class YamlProcessor {
8686
* </pre>
8787
* when mapped with
8888
* <pre class="code">
89-
* setDocumentMatchers(properties ->
89+
* setDocumentMatchers(properties -&gt;
9090
* ("prod".equals(properties.getProperty("environment")) ? MatchStatus.FOUND : MatchStatus.NOT_FOUND));
9191
* </pre>
9292
* would end up as

spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ protected BeanWrapper instantiateBean(String beanName, RootBeanDefinition mbd) {
13421342
* @param beanName the name of the bean
13431343
* @param mbd the bean definition for the bean
13441344
* @param explicitArgs argument values passed in programmatically via the getBean method,
1345-
* or {@code null} if none (-> use constructor argument values from bean definition)
1345+
* or {@code null} if none (implying the use of constructor argument values from bean definition)
13461346
* @return a BeanWrapper for the new instance
13471347
* @see #getBean(String, Object[])
13481348
*/
@@ -1363,7 +1363,7 @@ protected BeanWrapper instantiateUsingFactoryMethod(
13631363
* @param mbd the bean definition for the bean
13641364
* @param ctors the chosen candidate constructors
13651365
* @param explicitArgs argument values passed in programmatically via the getBean method,
1366-
* or {@code null} if none (-> use constructor argument values from bean definition)
1366+
* or {@code null} if none (implying the use of constructor argument values from bean definition)
13671367
* @return a BeanWrapper for the new instance
13681368
*/
13691369
protected BeanWrapper autowireConstructor(

0 commit comments

Comments
 (0)