Skip to content

Commit 01d82ae

Browse files
authored
Fix Javadoc build with Java 11 (#88)
* remove svn id * fix javadoc * remove svn tokens * fix javadoc with jdk14 Signed-off-by: olivier lamy <[email protected]>
1 parent 787141a commit 01d82ae

File tree

86 files changed

+594
-434
lines changed

Some content is hidden

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

86 files changed

+594
-434
lines changed

.github/workflows/maven.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
java-version: ${{ matrix.java }}
5050

5151
- name: Build with Maven
52-
run: mvn verify -e -B -V
52+
run: mvn verify javadoc:javadoc -e -B -V

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ limitations under the License.
8181
<plugin>
8282
<groupId>org.apache.maven.plugins</groupId>
8383
<artifactId>maven-javadoc-plugin</artifactId>
84-
<version>3.0.0</version>
84+
<version>3.2.0</version>
8585
</plugin>
8686
</plugins>
8787
</pluginManagement>

src/main/java/org/codehaus/plexus/util/Base64.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
2727
* @author Apache Software Foundation
2828
* @since 1.0-dev
29-
* @version $Id$
29+
*
3030
*/
3131
public class Base64
3232
{

src/main/java/org/codehaus/plexus/util/CachedMap.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ public Set entrySet()
415415
}
416416

417417
/**
418-
* Compares the specified object with this map for equality. Returns <tt>true</tt> if the given object is also a map
418+
* Compares the specified object with this map for equality. Returns <code>true</code> if the given object is also a map
419419
* and the two Maps represent the same mappings.
420420
*
421421
* @param o object to be compared for equality with this map.
@@ -437,4 +437,4 @@ public int hashCode()
437437
{
438438
return _backingMap.hashCode();
439439
}
440-
}
440+
}

src/main/java/org/codehaus/plexus/util/CollectionUtils.java

+18-13
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
/**
3030
* @author <a href="mailto:[email protected]">olamy</a>
31-
* @version $Id$
31+
*
3232
*/
3333
public class CollectionUtils
3434
{
@@ -44,6 +44,8 @@ public class CollectionUtils
4444
*
4545
* @param dominantMap Dominant Map.
4646
* @param recessiveMap Recessive Map.
47+
* @param <K> type
48+
* @param <V> type
4749
* @return The result map with combined dominant and recessive values.
4850
*/
4951
public static <K, V> Map<K, V> mergeMaps( Map<K, V> dominantMap, Map<K, V> recessiveMap )
@@ -64,7 +66,7 @@ public static <K, V> Map<K, V> mergeMaps( Map<K, V> dominantMap, Map<K, V> reces
6466
return recessiveMap;
6567
}
6668

67-
Map<K, V> result = new HashMap<K, V>();
69+
Map<K, V> result = new HashMap<>();
6870

6971
// Grab the keys from the dominant and recessive maps.
7072
Set<K> dominantMapKeys = dominantMap.keySet();
@@ -94,6 +96,8 @@ public static <K, V> Map<K, V> mergeMaps( Map<K, V> dominantMap, Map<K, V> reces
9496
* order.
9597
*
9698
* @param maps An array of Maps to merge.
99+
* @param <K> type
100+
* @param <V> type
97101
* @return Map The result Map produced after the merging process.
98102
*/
99103
public static <K, V> Map<K, V> mergeMaps( Map<K, V>[] maps )
@@ -122,22 +126,24 @@ else if ( maps.length == 1 )
122126
}
123127

124128
/**
125-
* Returns a {@link Collection} containing the intersection of the given {@link Collection}s.
126129
* <p>
130+
* Returns a {@link Collection} containing the intersection of the given {@link Collection}s.
131+
* </p>
127132
* The cardinality of each element in the returned {@link Collection} will be equal to the minimum of the
128133
* cardinality of that element in the two given {@link Collection}s.
129134
*
130135
* @param a The first collection
131136
* @param b The second collection
137+
* @param <E> the type
132138
* @see Collection#retainAll
133139
* @return The intersection of a and b, never null
134140
*/
135141
public static <E> Collection<E> intersection( final Collection<E> a, final Collection<E> b )
136142
{
137-
ArrayList<E> list = new ArrayList<E>();
143+
ArrayList<E> list = new ArrayList<>();
138144
Map<E, Integer> mapa = getCardinalityMap( a );
139145
Map<E, Integer> mapb = getCardinalityMap( b );
140-
Set<E> elts = new HashSet<E>( a );
146+
Set<E> elts = new HashSet<>( a );
141147
elts.addAll( b );
142148
for ( E obj : elts )
143149
{
@@ -150,18 +156,19 @@ public static <E> Collection<E> intersection( final Collection<E> a, final Colle
150156
}
151157

152158
/**
153-
* Returns a {@link Collection} containing <tt><i>a</i> - <i>b</i></tt>. The cardinality of each element <i>e</i> in
159+
* Returns a {@link Collection} containing <code>a - b</code>. The cardinality of each element <i>e</i> in
154160
* the returned {@link Collection} will be the cardinality of <i>e</i> in <i>a</i> minus the cardinality of <i>e</i>
155161
* in <i>b</i>, or zero, whichever is greater.
156162
*
157163
* @param a The start collection
158164
* @param b The collection that will be subtracted
165+
* @param <T> the type
159166
* @see Collection#removeAll
160167
* @return The result of the subtraction
161168
*/
162169
public static <T> Collection<T> subtract( final Collection<T> a, final Collection<T> b )
163170
{
164-
ArrayList<T> list = new ArrayList<T>( a );
171+
ArrayList<T> list = new ArrayList<>( a );
165172
for ( T aB : b )
166173
{
167174
list.remove( aB );
@@ -172,14 +179,15 @@ public static <T> Collection<T> subtract( final Collection<T> a, final Collectio
172179
/**
173180
* Returns a {@link Map} mapping each unique element in the given {@link Collection} to an {@link Integer}
174181
* representing the number of occurrences of that element in the {@link Collection}. An entry that maps to
175-
* <tt>null</tt> indicates that the element does not appear in the given {@link Collection}.
182+
* <code>null</code> indicates that the element does not appear in the given {@link Collection}.
176183
*
177184
* @param col The collection to count cardinalities for
185+
* @param <E> the type
178186
* @return A map of counts, indexed on each element in the collection
179187
*/
180188
public static <E> Map<E, Integer> getCardinalityMap( final Collection<E> col )
181189
{
182-
HashMap<E, Integer> count = new HashMap<E, Integer>();
190+
HashMap<E, Integer> count = new HashMap<>();
183191
for ( E obj : col )
184192
{
185193
Integer c = count.get( obj );
@@ -226,10 +234,7 @@ private static <E> int getFreq( final E obj, final Map<E, Integer> freqMap )
226234
return o;
227235
}
228236
}
229-
catch ( NullPointerException ignore )
230-
{
231-
}
232-
catch ( NoSuchElementException ignore )
237+
catch ( NullPointerException | NoSuchElementException ignore )
233238
{
234239
}
235240
return 0;

src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Observes the actions of a {@link DirectoryWalker}.
2323
*
24-
* @version $Id$
24+
*
2525
* @see DirectoryWalker
2626
*/
2727
public interface DirectoryWalkListener

src/main/java/org/codehaus/plexus/util/DirectoryWalker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* DirectoryWalker
2727
*
28-
* @version $Id$
28+
*
2929
*/
3030
public class DirectoryWalker
3131
{

src/main/java/org/codehaus/plexus/util/ExceptionUtils.java

+14-4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
* @author Dmitri Plotnikov
7777
* @author Stephen Colebourne
7878
* @since 1.0
79-
* @version $Id$
79+
*
8080
*/
8181
public class ExceptionUtils
8282
{
@@ -158,6 +158,7 @@ public static Throwable getCause( Throwable throwable )
158158
* </p>
159159
*
160160
* @param throwable The exception to introspect for a cause.
161+
* @param methodNames the methods names to match
161162
* @return The cause of the <code>Throwable</code>.
162163
* @throws NullPointerException if the method names array is null or contains null
163164
* @throws NullPointerException if the throwable is null
@@ -343,7 +344,7 @@ public static int getThrowableCount( Throwable throwable )
343344
*/
344345
public static Throwable[] getThrowables( Throwable throwable )
345346
{
346-
List<Throwable> list = new ArrayList<Throwable>();
347+
List<Throwable> list = new ArrayList<>();
347348
while ( throwable != null )
348349
{
349350
list.add( throwable );
@@ -357,7 +358,9 @@ public static Throwable[] getThrowables( Throwable throwable )
357358
* Delegates to {@link #indexOfThrowable(Throwable, Class, int)}, starting the search at the beginning of the
358359
* exception chain.
359360
* </p>
360-
*
361+
* @param throwable the exception to inspect
362+
* @param type <code>Class</code> to look for
363+
* @return index of the stack matching the type
361364
* @see #indexOfThrowable(Throwable, Class, int)
362365
*/
363366
public static int indexOfThrowable( Throwable throwable, Class type )
@@ -406,6 +409,8 @@ public static int indexOfThrowable( Throwable throwable, Class type, int fromInd
406409
* exception and continues with stack frames until the wrapper exception is caught and wrapped again, etc.
407410
* <p>
408411
* The method is equivalent to t.printStackTrace() for throwables that don't have nested causes.
412+
* @param t the exception
413+
* @param stream the stream
409414
*/
410415
public static void printRootCauseStackTrace( Throwable t, PrintStream stream )
411416
{
@@ -419,6 +424,7 @@ public static void printRootCauseStackTrace( Throwable t, PrintStream stream )
419424

420425
/**
421426
* Equivalent to printRootCauseStackTrace(t, System.err)
427+
* @param t the exception
422428
*/
423429
public static void printRootCauseStackTrace( Throwable t )
424430
{
@@ -427,6 +433,8 @@ public static void printRootCauseStackTrace( Throwable t )
427433

428434
/**
429435
* Same as printRootCauseStackTrace(t, stream), except it takes a PrintWriter as an argument.
436+
* @param t the cause
437+
* @param writer the writer
430438
*/
431439
public static void printRootCauseStackTrace( Throwable t, PrintWriter writer )
432440
{
@@ -441,12 +449,14 @@ public static void printRootCauseStackTrace( Throwable t, PrintWriter writer )
441449
/**
442450
* Creates a compact stack trace for the root cause of the supplied throwable. See
443451
* <code>printRootCauseStackTrace(Throwable t, PrintStream s)</code>
452+
* @param t the cause
453+
* @return the Stack
444454
*/
445455
public static String[] getRootCauseStackTrace( Throwable t )
446456
{
447457
Throwable[] throwables = getThrowables( t );
448458
int count = throwables.length;
449-
ArrayList<String> frames = new ArrayList<String>();
459+
ArrayList<String> frames = new ArrayList<>();
450460
List<String> nextTrace = getStackFrameList( throwables[count - 1] );
451461
for ( int i = count; --i >= 0; )
452462
{

src/main/java/org/codehaus/plexus/util/Expand.java

+2-11
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
* @author <a href="mailto:[email protected]">Stefan Bodewig</a>
7272
* @author <a href="mailto:[email protected]">Magesh Umasankar</a>
7373
* @since Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" name="unwar"
74-
* @version $Id$
74+
*
7575
*/
7676
public class Expand
7777
{
@@ -93,12 +93,6 @@ public void execute()
9393
expandFile( source, dest );
9494
}
9595

96-
/*
97-
* This method is to be overridden by extending unarchival tasks.
98-
*/
99-
/**
100-
* Description of the Method
101-
*/
10296
protected void expandFile( final File srcF, final File dir )
10397
throws Exception
10498
{
@@ -116,9 +110,6 @@ protected void expandFile( final File srcF, final File dir )
116110
}
117111
}
118112

119-
/**
120-
* Description of the Method
121-
*/
122113
protected void extractFile( File srcF, File dir, InputStream compressedInputStream, String entryName,
123114
Date entryDate, boolean isDirectory )
124115
throws Exception
@@ -188,7 +179,7 @@ public void setSrc( File s )
188179
}
189180

190181
/**
191-
* Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?
182+
* @param b Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?
192183
*/
193184
public void setOverwrite( boolean b )
194185
{

src/main/java/org/codehaus/plexus/util/FileUtils.java

+11-10
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
/**
8383
* <p>This class provides basic facilities for manipulating files and file paths.</p>
8484
*
85-
* <h3>Path-related methods</h3>
85+
* <b>Path-related methods</b>
8686
*
8787
* <p>Methods exist to retrieve the components of a typical file path. For example
8888
* <code>/www/hosted/mysite/index.html</code>, can be broken into:
@@ -95,7 +95,7 @@
9595
* <p>There are also methods to {@link #catPath concatenate two paths}, {@link #resolveFile resolve a path relative to a
9696
* File} and {@link #normalize} a path.</p>
9797
98-
* <h3>File-related methods</h3>
98+
* <b>File-related methods</b>
9999
*
100100
* <p>There are methods to create a {@link #toFile File from a URL}, copy a {@link #copyFileToDirectory File to a
101101
* directory}, copy a {@link #copyFile File to another File}, copy a {@link #copyURLToFile URL's contents to a File}, as
@@ -112,7 +112,7 @@
112112
* @author <a href="mailto:[email protected]">Christoph.Reck</a>
113113
* @author <a href="mailto:[email protected]">Peter Donald</a>
114114
* @author <a href="mailto:[email protected]">Jeff Turner</a>
115-
* @version $Id$
115+
*
116116
*/
117117
public class FileUtils
118118
{
@@ -988,6 +988,7 @@ public static void copyFileToDirectoryIfModified( final File source, final File
988988
* @param sourceBase The basedir used for the directory scan
989989
* @param dirs The getIncludedDirs from the dirscanner
990990
* @param destination The base dir of the output structure
991+
* @throws IOException io issue
991992
*/
992993
public static void mkDirs( final File sourceBase, String[] dirs, final File destination )
993994
throws IOException
@@ -1696,7 +1697,7 @@ public static long sizeOfDirectory( final File directory )
16961697
* @param includes the includes pattern, comma separated
16971698
* @param excludes the excludes pattern, comma separated
16981699
* @return a list of File objects
1699-
* @throws IOException
1700+
* @throws IOException io issue
17001701
* @see #getFileNames(File, String, String, boolean)
17011702
*/
17021703
public static List<File> getFiles( File directory, String includes, String excludes )
@@ -1713,7 +1714,7 @@ public static List<File> getFiles( File directory, String includes, String exclu
17131714
* @param excludes the excludes pattern, comma separated
17141715
* @param includeBasedir true to include the base dir in each file
17151716
* @return a list of File objects
1716-
* @throws IOException
1717+
* @throws IOException io issue
17171718
* @see #getFileNames(File, String, String, boolean)
17181719
*/
17191720
public static List<File> getFiles( File directory, String includes, String excludes, boolean includeBasedir )
@@ -1739,7 +1740,7 @@ public static List<File> getFiles( File directory, String includes, String exclu
17391740
* @param excludes the excludes pattern, comma separated
17401741
* @param includeBasedir true to include the base dir in each String of file
17411742
* @return a list of files as String
1742-
* @throws IOException
1743+
* @throws IOException io issue
17431744
*/
17441745
public static List<String> getFileNames( File directory, String includes, String excludes, boolean includeBasedir )
17451746
throws IOException
@@ -1756,7 +1757,7 @@ public static List<String> getFileNames( File directory, String includes, String
17561757
* @param includeBasedir true to include the base dir in each String of file
17571758
* @param isCaseSensitive true if case sensitive
17581759
* @return a list of files as String
1759-
* @throws IOException
1760+
* @throws IOException io issue
17601761
*/
17611762
public static List<String> getFileNames( File directory, String includes, String excludes, boolean includeBasedir,
17621763
boolean isCaseSensitive )
@@ -1773,7 +1774,7 @@ public static List<String> getFileNames( File directory, String includes, String
17731774
* @param excludes the excludes pattern, comma separated
17741775
* @param includeBasedir true to include the base dir in each String of file
17751776
* @return a list of directories as String
1776-
* @throws IOException
1777+
* @throws IOException io issue
17771778
*/
17781779
public static List<String> getDirectoryNames( File directory, String includes, String excludes,
17791780
boolean includeBasedir )
@@ -1791,7 +1792,7 @@ public static List<String> getDirectoryNames( File directory, String includes, S
17911792
* @param includeBasedir true to include the base dir in each String of file
17921793
* @param isCaseSensitive true if case sensitive
17931794
* @return a list of directories as String
1794-
* @throws IOException
1795+
* @throws IOException io issue
17951796
*/
17961797
public static List<String> getDirectoryNames( File directory, String includes, String excludes,
17971798
boolean includeBasedir, boolean isCaseSensitive )
@@ -1811,7 +1812,7 @@ public static List<String> getDirectoryNames( File directory, String includes, S
18111812
* @param getFiles true if get files
18121813
* @param getDirectories true if get directories
18131814
* @return a list of files as String
1814-
* @throws IOException
1815+
* @throws IOException io issue
18151816
*/
18161817
public static List<String> getFileAndDirectoryNames( File directory, String includes, String excludes,
18171818
boolean includeBasedir, boolean isCaseSensitive,

0 commit comments

Comments
 (0)