Eliminate all Javadoc warnings

- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
This commit is contained in:
Chris Beams
2012-12-11 11:56:38 +01:00
parent 8f90b487e2
commit f26534700a
72 changed files with 217 additions and 221 deletions

View File

@@ -294,7 +294,7 @@ public abstract class CollectionFactory {
/**
* Create the most approximate map for the given map.
* <p>Creates a TreeMap or linked Map for a SortedMap or Map, respectively.
* @param collectionType the desired type of the target Map
* @param mapType the desired type of the target Map
* @param initialCapacity the initial capacity
* @return the new Map instance
* @see java.util.TreeMap

View File

@@ -18,7 +18,6 @@ package org.springframework.core.convert.converter;
import java.util.Comparator;
import java.util.Map;
import java.util.Map.Entry;
import org.springframework.core.convert.ConversionService;
import org.springframework.util.Assert;
@@ -44,7 +43,6 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
/**
* Create a new {@link ConvertingComparator} instance.
*
* @param comparator the underlying comparator used to compare the converted values
* @param converter the converter
*/
@SuppressWarnings("unchecked")
@@ -86,8 +84,8 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
}
/**
* Create a new {@link ConvertingComparator} that compares {@link Map.Entry map
* entries} based on their {@link Map.Entry#getKey() keys}.
* Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry
* map * entries} based on their {@link java.util.Map.Entry#getKey() keys}.
*
* @param comparator the underlying comparator used to compare keys
* @return a new {@link ConvertingComparator} instance
@@ -96,15 +94,15 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
Comparator<K> comparator) {
return new ConvertingComparator<Map.Entry<K,V>, K>(comparator, new Converter<Map.Entry<K, V>, K>() {
public K convert(Entry<K, V> source) {
public K convert(Map.Entry<K, V> source) {
return source.getKey();
}
});
}
/**
* Create a new {@link ConvertingComparator} that compares {@link Map.Entry map
* entries} based on their {@link Map.Entry#getValue() values}.
* Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry
* map entries} based on their {@link java.util.Map.Entry#getValue() values}.
*
* @param comparator the underlying comparator used to compare values
* @return a new {@link ConvertingComparator} instance
@@ -113,7 +111,7 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
Comparator<V> comparator) {
return new ConvertingComparator<Map.Entry<K,V>, V>(comparator, new Converter<Map.Entry<K, V>, V>() {
public V convert(Entry<K, V> source) {
public V convert(Map.Entry<K, V> source) {
return source.getValue();
}
});

View File

@@ -33,7 +33,6 @@ import org.springframework.util.Assert;
* @author Juergen Hoeller
* @author Costin Leau
* @since 3.0
* @see org.jboss.virtual.VirtualFile
* @see org.jboss.vfs.VirtualFile
*/
public class VfsResource extends AbstractResource {

View File

@@ -404,8 +404,8 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
/**
* Array of references indexed using the low order bits from the hash. This
* property should only be set via {@link #setReferences(Reference[])} to ensure
* that the resizeThreshold is maintained.
* property should only be set via {@link #setReferences} to ensure that the
* {@code resizeThreshold} is maintained.
*/
private volatile Reference<K, V>[] references;

View File

@@ -36,8 +36,8 @@ import org.springframework.util.ClassUtils;
/**
* Convenience methods for working with the StAX API.
*
* <p>In particular, methods for using StAX ({@link javax.xml.stream}) in combination with the TrAX API
* ({@link javax.xml.transform}), and converting StAX readers/writers into SAX readers/handlers and vice-versa.
* <p>In particular, methods for using StAX ({@code javax.xml.stream}) in combination with the TrAX API
* ({@code javax.xml.transform}), and converting StAX readers/writers into SAX readers/handlers and vice-versa.
*
* @author Arjen Poutsma
* @author Juergen Hoeller