diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8101dd9c..da347c14 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -49,4 +49,4 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven - run: mvn verify -e -B -V + run: mvn verify javadoc:javadoc -e -B -V diff --git a/pom.xml b/pom.xml index 7e414e57..e3f738d9 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ limitations under the License. org.apache.maven.plugins maven-javadoc-plugin - 3.0.0 + 3.2.0 diff --git a/src/main/java/org/codehaus/plexus/util/Base64.java b/src/main/java/org/codehaus/plexus/util/Base64.java index dd504552..120feb8f 100644 --- a/src/main/java/org/codehaus/plexus/util/Base64.java +++ b/src/main/java/org/codehaus/plexus/util/Base64.java @@ -26,7 +26,7 @@ * @see RFC 2045 * @author Apache Software Foundation * @since 1.0-dev - * @version $Id$ + * */ public class Base64 { diff --git a/src/main/java/org/codehaus/plexus/util/CachedMap.java b/src/main/java/org/codehaus/plexus/util/CachedMap.java index 0d399291..c77d2180 100644 --- a/src/main/java/org/codehaus/plexus/util/CachedMap.java +++ b/src/main/java/org/codehaus/plexus/util/CachedMap.java @@ -415,7 +415,7 @@ public Set entrySet() } /** - * Compares the specified object with this map for equality. Returns true if the given object is also a map + * Compares the specified object with this map for equality. Returns true if the given object is also a map * and the two Maps represent the same mappings. * * @param o object to be compared for equality with this map. @@ -437,4 +437,4 @@ public int hashCode() { return _backingMap.hashCode(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/CollectionUtils.java b/src/main/java/org/codehaus/plexus/util/CollectionUtils.java index d7e745b4..b16200fd 100644 --- a/src/main/java/org/codehaus/plexus/util/CollectionUtils.java +++ b/src/main/java/org/codehaus/plexus/util/CollectionUtils.java @@ -28,7 +28,7 @@ /** * @author olamy - * @version $Id$ + * */ public class CollectionUtils { @@ -44,6 +44,8 @@ public class CollectionUtils * * @param dominantMap Dominant Map. * @param recessiveMap Recessive Map. + * @param type + * @param type * @return The result map with combined dominant and recessive values. */ public static Map mergeMaps( Map dominantMap, Map recessiveMap ) @@ -64,7 +66,7 @@ public static Map mergeMaps( Map dominantMap, Map reces return recessiveMap; } - Map result = new HashMap(); + Map result = new HashMap<>(); // Grab the keys from the dominant and recessive maps. Set dominantMapKeys = dominantMap.keySet(); @@ -94,6 +96,8 @@ public static Map mergeMaps( Map dominantMap, Map reces * order. * * @param maps An array of Maps to merge. + * @param type + * @param type * @return Map The result Map produced after the merging process. */ public static Map mergeMaps( Map[] maps ) @@ -122,22 +126,24 @@ else if ( maps.length == 1 ) } /** - * Returns a {@link Collection} containing the intersection of the given {@link Collection}s. *

+ * Returns a {@link Collection} containing the intersection of the given {@link Collection}s. + *

* The cardinality of each element in the returned {@link Collection} will be equal to the minimum of the * cardinality of that element in the two given {@link Collection}s. * * @param a The first collection * @param b The second collection + * @param the type * @see Collection#retainAll * @return The intersection of a and b, never null */ public static Collection intersection( final Collection a, final Collection b ) { - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList<>(); Map mapa = getCardinalityMap( a ); Map mapb = getCardinalityMap( b ); - Set elts = new HashSet( a ); + Set elts = new HashSet<>( a ); elts.addAll( b ); for ( E obj : elts ) { @@ -150,18 +156,19 @@ public static Collection intersection( final Collection a, final Colle } /** - * Returns a {@link Collection} containing a - b. The cardinality of each element e in + * Returns a {@link Collection} containing a - b. The cardinality of each element e in * the returned {@link Collection} will be the cardinality of e in a minus the cardinality of e * in b, or zero, whichever is greater. * * @param a The start collection * @param b The collection that will be subtracted + * @param the type * @see Collection#removeAll * @return The result of the subtraction */ public static Collection subtract( final Collection a, final Collection b ) { - ArrayList list = new ArrayList( a ); + ArrayList list = new ArrayList<>( a ); for ( T aB : b ) { list.remove( aB ); @@ -172,14 +179,15 @@ public static Collection subtract( final Collection a, final Collectio /** * Returns a {@link Map} mapping each unique element in the given {@link Collection} to an {@link Integer} * representing the number of occurrences of that element in the {@link Collection}. An entry that maps to - * null indicates that the element does not appear in the given {@link Collection}. + * null indicates that the element does not appear in the given {@link Collection}. * * @param col The collection to count cardinalities for + * @param the type * @return A map of counts, indexed on each element in the collection */ public static Map getCardinalityMap( final Collection col ) { - HashMap count = new HashMap(); + HashMap count = new HashMap<>(); for ( E obj : col ) { Integer c = count.get( obj ); @@ -226,10 +234,7 @@ private static int getFreq( final E obj, final Map freqMap ) return o; } } - catch ( NullPointerException ignore ) - { - } - catch ( NoSuchElementException ignore ) + catch ( NullPointerException | NoSuchElementException ignore ) { } return 0; diff --git a/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java b/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java index 74bdf957..8e1fda24 100644 --- a/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java +++ b/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java @@ -21,7 +21,7 @@ /** * Observes the actions of a {@link DirectoryWalker}. * - * @version $Id$ + * * @see DirectoryWalker */ public interface DirectoryWalkListener diff --git a/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java b/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java index 40f3c3cc..2ffa4b0a 100644 --- a/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java +++ b/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java @@ -25,7 +25,7 @@ /** * DirectoryWalker * - * @version $Id$ + * */ public class DirectoryWalker { diff --git a/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java b/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java index 6f8d1424..341dc80d 100644 --- a/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java +++ b/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java @@ -76,7 +76,7 @@ * @author Dmitri Plotnikov * @author Stephen Colebourne * @since 1.0 - * @version $Id$ + * */ public class ExceptionUtils { @@ -158,6 +158,7 @@ public static Throwable getCause( Throwable throwable ) *

* * @param throwable The exception to introspect for a cause. + * @param methodNames the methods names to match * @return The cause of the Throwable. * @throws NullPointerException if the method names array is null or contains null * @throws NullPointerException if the throwable is null @@ -343,7 +344,7 @@ public static int getThrowableCount( Throwable throwable ) */ public static Throwable[] getThrowables( Throwable throwable ) { - List list = new ArrayList(); + List list = new ArrayList<>(); while ( throwable != null ) { list.add( throwable ); @@ -357,7 +358,9 @@ public static Throwable[] getThrowables( Throwable throwable ) * Delegates to {@link #indexOfThrowable(Throwable, Class, int)}, starting the search at the beginning of the * exception chain. *

- * + * @param throwable the exception to inspect + * @param type Class to look for + * @return index of the stack matching the type * @see #indexOfThrowable(Throwable, Class, int) */ public static int indexOfThrowable( Throwable throwable, Class type ) @@ -406,6 +409,8 @@ public static int indexOfThrowable( Throwable throwable, Class type, int fromInd * exception and continues with stack frames until the wrapper exception is caught and wrapped again, etc. *

* The method is equivalent to t.printStackTrace() for throwables that don't have nested causes. + * @param t the exception + * @param stream the stream */ public static void printRootCauseStackTrace( Throwable t, PrintStream stream ) { @@ -419,6 +424,7 @@ public static void printRootCauseStackTrace( Throwable t, PrintStream stream ) /** * Equivalent to printRootCauseStackTrace(t, System.err) + * @param t the exception */ public static void printRootCauseStackTrace( Throwable t ) { @@ -427,6 +433,8 @@ public static void printRootCauseStackTrace( Throwable t ) /** * Same as printRootCauseStackTrace(t, stream), except it takes a PrintWriter as an argument. + * @param t the cause + * @param writer the writer */ public static void printRootCauseStackTrace( Throwable t, PrintWriter writer ) { @@ -441,12 +449,14 @@ public static void printRootCauseStackTrace( Throwable t, PrintWriter writer ) /** * Creates a compact stack trace for the root cause of the supplied throwable. See * printRootCauseStackTrace(Throwable t, PrintStream s) + * @param t the cause + * @return the Stack */ public static String[] getRootCauseStackTrace( Throwable t ) { Throwable[] throwables = getThrowables( t ); int count = throwables.length; - ArrayList frames = new ArrayList(); + ArrayList frames = new ArrayList<>(); List nextTrace = getStackFrameList( throwables[count - 1] ); for ( int i = count; --i >= 0; ) { diff --git a/src/main/java/org/codehaus/plexus/util/Expand.java b/src/main/java/org/codehaus/plexus/util/Expand.java index db81df4a..ffc74628 100644 --- a/src/main/java/org/codehaus/plexus/util/Expand.java +++ b/src/main/java/org/codehaus/plexus/util/Expand.java @@ -71,7 +71,7 @@ * @author Stefan Bodewig * @author Magesh Umasankar * @since Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" name="unwar" - * @version $Id$ + * */ public class Expand { @@ -93,12 +93,6 @@ public void execute() expandFile( source, dest ); } - /* - * This method is to be overridden by extending unarchival tasks. - */ - /** - * Description of the Method - */ protected void expandFile( final File srcF, final File dir ) throws Exception { @@ -116,9 +110,6 @@ protected void expandFile( final File srcF, final File dir ) } } - /** - * Description of the Method - */ protected void extractFile( File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory ) throws Exception @@ -188,7 +179,7 @@ public void setSrc( File s ) } /** - * Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive? + * @param b Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive? */ public void setOverwrite( boolean b ) { diff --git a/src/main/java/org/codehaus/plexus/util/FileUtils.java b/src/main/java/org/codehaus/plexus/util/FileUtils.java index 7cd1ddcf..8d74d775 100644 --- a/src/main/java/org/codehaus/plexus/util/FileUtils.java +++ b/src/main/java/org/codehaus/plexus/util/FileUtils.java @@ -82,7 +82,7 @@ /** *

This class provides basic facilities for manipulating files and file paths.

* - *

Path-related methods

+ * Path-related methods * *

Methods exist to retrieve the components of a typical file path. For example * /www/hosted/mysite/index.html, can be broken into: @@ -95,7 +95,7 @@ *

There are also methods to {@link #catPath concatenate two paths}, {@link #resolveFile resolve a path relative to a * File} and {@link #normalize} a path.

- *

File-related methods

+ * File-related methods * *

There are methods to create a {@link #toFile File from a URL}, copy a {@link #copyFileToDirectory File to a * directory}, copy a {@link #copyFile File to another File}, copy a {@link #copyURLToFile URL's contents to a File}, as @@ -112,7 +112,7 @@ * @author Christoph.Reck * @author Peter Donald * @author Jeff Turner - * @version $Id$ + * */ public class FileUtils { @@ -988,6 +988,7 @@ public static void copyFileToDirectoryIfModified( final File source, final File * @param sourceBase The basedir used for the directory scan * @param dirs The getIncludedDirs from the dirscanner * @param destination The base dir of the output structure + * @throws IOException io issue */ public static void mkDirs( final File sourceBase, String[] dirs, final File destination ) throws IOException @@ -1696,7 +1697,7 @@ public static long sizeOfDirectory( final File directory ) * @param includes the includes pattern, comma separated * @param excludes the excludes pattern, comma separated * @return a list of File objects - * @throws IOException + * @throws IOException io issue * @see #getFileNames(File, String, String, boolean) */ public static List getFiles( File directory, String includes, String excludes ) @@ -1713,7 +1714,7 @@ public static List getFiles( File directory, String includes, String exclu * @param excludes the excludes pattern, comma separated * @param includeBasedir true to include the base dir in each file * @return a list of File objects - * @throws IOException + * @throws IOException io issue * @see #getFileNames(File, String, String, boolean) */ public static List getFiles( File directory, String includes, String excludes, boolean includeBasedir ) @@ -1739,7 +1740,7 @@ public static List getFiles( File directory, String includes, String exclu * @param excludes the excludes pattern, comma separated * @param includeBasedir true to include the base dir in each String of file * @return a list of files as String - * @throws IOException + * @throws IOException io issue */ public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir ) throws IOException @@ -1756,7 +1757,7 @@ public static List getFileNames( File directory, String includes, String * @param includeBasedir true to include the base dir in each String of file * @param isCaseSensitive true if case sensitive * @return a list of files as String - * @throws IOException + * @throws IOException io issue */ public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir, boolean isCaseSensitive ) @@ -1773,7 +1774,7 @@ public static List getFileNames( File directory, String includes, String * @param excludes the excludes pattern, comma separated * @param includeBasedir true to include the base dir in each String of file * @return a list of directories as String - * @throws IOException + * @throws IOException io issue */ public static List getDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir ) @@ -1791,7 +1792,7 @@ public static List getDirectoryNames( File directory, String includes, S * @param includeBasedir true to include the base dir in each String of file * @param isCaseSensitive true if case sensitive * @return a list of directories as String - * @throws IOException + * @throws IOException io issue */ public static List getDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir, boolean isCaseSensitive ) @@ -1811,7 +1812,7 @@ public static List getDirectoryNames( File directory, String includes, S * @param getFiles true if get files * @param getDirectories true if get directories * @return a list of files as String - * @throws IOException + * @throws IOException io issue */ public static List getFileAndDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir, boolean isCaseSensitive, diff --git a/src/main/java/org/codehaus/plexus/util/IOUtil.java b/src/main/java/org/codehaus/plexus/util/IOUtil.java index 0bbd1fd2..3fab8411 100644 --- a/src/main/java/org/codehaus/plexus/util/IOUtil.java +++ b/src/main/java/org/codehaus/plexus/util/IOUtil.java @@ -118,7 +118,7 @@ * * @author Peter Donald * @author Jeff Turner - * @version $Id$ + * * @since 4.0 */ @@ -149,6 +149,9 @@ private IOUtil() /** * Copy bytes from an InputStream to an OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final InputStream input, final OutputStream output ) throws IOException @@ -158,8 +161,10 @@ public static void copy( final InputStream input, final OutputStream output ) /** * Copy bytes from an InputStream to an OutputStream. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final InputStream input, final OutputStream output, final int bufferSize ) throws IOException @@ -174,6 +179,9 @@ public static void copy( final InputStream input, final OutputStream output, fin /** * Copy chars from a Reader to a Writer. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final Reader input, final Writer output ) throws IOException @@ -183,8 +191,10 @@ public static void copy( final Reader input, final Writer output ) /** * Copy chars from a Reader to a Writer. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final Reader input, final Writer output, final int bufferSize ) throws IOException @@ -209,6 +219,9 @@ public static void copy( final Reader input, final Writer output, final int buff /** * Copy and convert bytes from an InputStream to chars on a Writer. The platform's default * encoding is used for the byte-to-char conversion. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output ) throws IOException @@ -219,8 +232,10 @@ public static void copy( final InputStream input, final Writer output ) /** * Copy and convert bytes from an InputStream to chars on a Writer. The platform's default * encoding is used for the byte-to-char conversion. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output, final int bufferSize ) throws IOException @@ -232,10 +247,12 @@ public static void copy( final InputStream input, final Writer output, final int /** * Copy and convert bytes from an InputStream to chars on a Writer, using the specified * encoding. - * + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output, final String encoding ) throws IOException @@ -247,11 +264,13 @@ public static void copy( final InputStream input, final Writer output, final Str /** * Copy and convert bytes from an InputStream to chars on a Writer, using the specified * encoding. - * + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final InputStream input, final Writer output, final String encoding, final int bufferSize ) throws IOException @@ -264,8 +283,10 @@ public static void copy( final InputStream input, final Writer output, final Str // InputStream -> String /** - * Get the contents of an InputStream as a String. The platform's default encoding is used for the + * @return Get the contents of an InputStream as a String. The platform's default encoding is used for the * byte-to-char conversion. + * @param input to convert + * @throws IOException io issue */ public static String toString( final InputStream input ) throws IOException @@ -274,10 +295,11 @@ public static String toString( final InputStream input ) } /** - * Get the contents of an InputStream as a String. The platform's default encoding is used for the + * @return Get the contents of an InputStream as a String. The platform's default encoding is used for the * byte-to-char conversion. - * + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final InputStream input, final int bufferSize ) throws IOException @@ -288,11 +310,12 @@ public static String toString( final InputStream input, final int bufferSize ) } /** - * Get the contents of an InputStream as a String. - * + * @return Get the contents of an InputStream as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. + * @throws IOException io issue */ public static String toString( final InputStream input, final String encoding ) throws IOException @@ -301,12 +324,13 @@ public static String toString( final InputStream input, final String encoding ) } /** - * Get the contents of an InputStream as a String. - * + * @return Get the contents of an InputStream as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final InputStream input, final String encoding, final int bufferSize ) throws IOException @@ -320,7 +344,9 @@ public static String toString( final InputStream input, final String encoding, f // InputStream -> byte[] /** - * Get the contents of an InputStream as a byte[]. + * @return Get the contents of an InputStream as a byte[]. + * @param input to convert + * @throws IOException io issue */ public static byte[] toByteArray( final InputStream input ) throws IOException @@ -329,9 +355,10 @@ public static byte[] toByteArray( final InputStream input ) } /** - * Get the contents of an InputStream as a byte[]. - * + * @return Get the contents of an InputStream as a byte[]. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static byte[] toByteArray( final InputStream input, final int bufferSize ) throws IOException @@ -351,6 +378,9 @@ public static byte[] toByteArray( final InputStream input, final int bufferSize /** * Serialize chars from a Reader to bytes on an OutputStream, and flush the * OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final Reader input, final OutputStream output ) throws IOException @@ -361,8 +391,10 @@ public static void copy( final Reader input, final OutputStream output ) /** * Serialize chars from a Reader to bytes on an OutputStream, and flush the * OutputStream. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final Reader input, final OutputStream output, final int bufferSize ) throws IOException @@ -377,7 +409,9 @@ public static void copy( final Reader input, final OutputStream output, final in /////////////////////////////////////////////////////////////// // Reader -> String /** - * Get the contents of a Reader as a String. + * @return Get the contents of a Reader as a String. + * @param input to convert + * @throws IOException io issue */ public static String toString( final Reader input ) throws IOException @@ -386,9 +420,10 @@ public static String toString( final Reader input ) } /** - * Get the contents of a Reader as a String. - * + * @return Get the contents of a Reader as a String. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final Reader input, final int bufferSize ) throws IOException @@ -401,7 +436,9 @@ public static String toString( final Reader input, final int bufferSize ) /////////////////////////////////////////////////////////////// // Reader -> byte[] /** - * Get the contents of a Reader as a byte[]. + * @return Get the contents of a Reader as a byte[]. + * @param input to convert + * @throws IOException io issue */ public static byte[] toByteArray( final Reader input ) throws IOException @@ -410,9 +447,10 @@ public static byte[] toByteArray( final Reader input ) } /** - * Get the contents of a Reader as a byte[]. - * + * @return Get the contents of a Reader as a byte[]. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static byte[] toByteArray( final Reader input, final int bufferSize ) throws IOException @@ -433,6 +471,9 @@ public static byte[] toByteArray( final Reader input, final int bufferSize ) /** * Serialize chars from a String to bytes on an OutputStream, and flush the * OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final String input, final OutputStream output ) throws IOException @@ -443,8 +484,10 @@ public static void copy( final String input, final OutputStream output ) /** * Serialize chars from a String to bytes on an OutputStream, and flush the * OutputStream. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final String input, final OutputStream output, final int bufferSize ) throws IOException @@ -462,6 +505,9 @@ public static void copy( final String input, final OutputStream output, final in /** * Copy chars from a String to a Writer. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final String input, final Writer output ) throws IOException @@ -474,9 +520,11 @@ public static void copy( final String input, final Writer output ) * to passing a {@link java.io.BufferedInputStream} and {@link java.io.BufferedOutputStream} to * {@link #copy(InputStream, OutputStream)}, and flushing the output stream afterwards. The streams are not closed * after the copy. - * + * @param input to convert + * @param output the result * @deprecated Buffering streams is actively harmful! See the class description as to why. Use * {@link #copy(InputStream, OutputStream)} instead. + * @throws IOException io issue */ @Deprecated public static void bufferedCopy( final InputStream input, final OutputStream output ) @@ -491,7 +539,9 @@ public static void bufferedCopy( final InputStream input, final OutputStream out /////////////////////////////////////////////////////////////// // String -> byte[] /** - * Get the contents of a String as a byte[]. + * @return Get the contents of a String as a byte[]. + * @param input to convert + * @throws IOException io issue */ public static byte[] toByteArray( final String input ) throws IOException @@ -500,9 +550,10 @@ public static byte[] toByteArray( final String input ) } /** - * Get the contents of a String as a byte[]. - * + * @return Get the contents of a String as a byte[]. + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static byte[] toByteArray( final String input, final int bufferSize ) throws IOException @@ -523,6 +574,9 @@ public static byte[] toByteArray( final String input, final int bufferSize ) /** * Copy and convert bytes from a byte[] to chars on a Writer. The platform's default * encoding is used for the byte-to-char conversion. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output ) throws IOException @@ -533,8 +587,10 @@ public static void copy( final byte[] input, final Writer output ) /** * Copy and convert bytes from a byte[] to chars on a Writer. The platform's default * encoding is used for the byte-to-char conversion. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output, final int bufferSize ) throws IOException @@ -546,10 +602,12 @@ public static void copy( final byte[] input, final Writer output, final int buff /** * Copy and convert bytes from a byte[] to chars on a Writer, using the specified * encoding. - * + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output, final String encoding ) throws IOException @@ -561,11 +619,13 @@ public static void copy( final byte[] input, final Writer output, final String e /** * Copy and convert bytes from a byte[] to chars on a Writer, using the specified * encoding. - * + * @param input to convert + * @param output the result * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final byte[] input, final Writer output, final String encoding, final int bufferSize ) throws IOException @@ -578,8 +638,10 @@ public static void copy( final byte[] input, final Writer output, final String e // byte[] -> String /** - * Get the contents of a byte[] as a String. The platform's default encoding is used for the + * @return Get the contents of a byte[] as a String. The platform's default encoding is used for the * byte-to-char conversion. + * @param input to convert + * @throws IOException io issue */ public static String toString( final byte[] input ) throws IOException @@ -588,10 +650,11 @@ public static String toString( final byte[] input ) } /** - * Get the contents of a byte[] as a String. The platform's default encoding is used for the + * @return Get the contents of a byte[] as a String. The platform's default encoding is used for the * byte-to-char conversion. - * + * @param input to convert * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static String toString( final byte[] input, final int bufferSize ) throws IOException @@ -602,11 +665,12 @@ public static String toString( final byte[] input, final int bufferSize ) } /** - * Get the contents of a byte[] as a String. - * + * @return Get the contents of a byte[] as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. + * @throws IOException io issue */ public static String toString( final byte[] input, final String encoding ) throws IOException @@ -615,12 +679,14 @@ public static String toString( final byte[] input, final String encoding ) } /** - * Get the contents of a byte[] as a String. - * + * @return the contents of a byte[] as a String. + * @param input to convert * @param encoding The name of a supported character encoding. See the * IANA Charset Registry for a list of valid * encoding types. * @param bufferSize Size of internal buffer to use. + * + * @throws IOException io issue */ public static String toString( final byte[] input, final String encoding, final int bufferSize ) throws IOException @@ -635,6 +701,9 @@ public static String toString( final byte[] input, final String encoding, final /** * Copy bytes from a byte[] to an OutputStream. + * @param input to convert + * @param output the result + * @throws IOException io issue */ public static void copy( final byte[] input, final OutputStream output ) throws IOException @@ -644,8 +713,10 @@ public static void copy( final byte[] input, final OutputStream output ) /** * Copy bytes from a byte[] to an OutputStream. - * + * @param input to convert + * @param output the result * @param bufferSize Size of internal buffer to use. + * @throws IOException io issue */ public static void copy( final byte[] input, final OutputStream output, final int bufferSize ) throws IOException @@ -659,6 +730,7 @@ public static void copy( final byte[] input, final OutputStream output, final in * @param input1 the first stream * @param input2 the second stream * @return true if the content of the streams are equal or they both don't exist, false otherwise + * @throws IOException io issue */ public static boolean contentEquals( final InputStream input1, final InputStream input2 ) throws IOException diff --git a/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java b/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java index b22ff887..8129018f 100644 --- a/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java +++ b/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java @@ -90,7 +90,7 @@ public class LineOrientedInterpolatingReader * @param context keyword/value pairs for interpolation. * @param startDelim character sequence which (possibly) begins a token. * @param endDelim character sequence which ends a token. - * @param escapeSeq + * @param escapeSeq escape sequence */ public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim, String escapeSeq ) @@ -471,4 +471,4 @@ private String findAndReplaceUnlessEscaped( String rawLine, String search, Strin return lineBuffer.toString(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/NioFiles.java b/src/main/java/org/codehaus/plexus/util/NioFiles.java index 50cdeb72..eb62bac7 100644 --- a/src/main/java/org/codehaus/plexus/util/NioFiles.java +++ b/src/main/java/org/codehaus/plexus/util/NioFiles.java @@ -51,7 +51,7 @@ public static void chmod( File file, int mode ) @SuppressWarnings( { "OctalInteger", "MagicNumber" } ) private static Set getPermissions( int mode ) { - Set perms = new HashSet(); + Set perms = new HashSet<>(); // add owners permission if ( ( mode & 0400 ) > 0 ) { @@ -106,7 +106,7 @@ public static long getLastModified( File file ) * * @param symlink A file that is a symlink * @return A file that is the target of the symlink - * @throws java.io.IOException + * @throws java.io.IOException io issue */ public static File readSymbolicLink( File symlink ) diff --git a/src/main/java/org/codehaus/plexus/util/Os.java b/src/main/java/org/codehaus/plexus/util/Os.java index fce9f5d7..b4ed2882 100644 --- a/src/main/java/org/codehaus/plexus/util/Os.java +++ b/src/main/java/org/codehaus/plexus/util/Os.java @@ -65,7 +65,7 @@ * @author Magesh Umasankar * @author Brian Fox * @since 1.0 - * @version $Revision$ + * */ public class Os { @@ -208,9 +208,10 @@ public void setVersion( String version ) } /** - * Determines if the current OS matches the type of that set in setFamily. - * + * @return Determines if the current OS matches the type of that set in setFamily. + * * @see Os#setFamily(String) + * @throws Exception any errir */ public boolean eval() throws Exception diff --git a/src/main/java/org/codehaus/plexus/util/PathTool.java b/src/main/java/org/codehaus/plexus/util/PathTool.java index a64556c7..b8392cdb 100644 --- a/src/main/java/org/codehaus/plexus/util/PathTool.java +++ b/src/main/java/org/codehaus/plexus/util/PathTool.java @@ -25,7 +25,7 @@ * @author Pete Kazmier * @author Vincent Massol * @author Vincent Siveton - * @version $Id$ + * */ public class PathTool { @@ -34,7 +34,7 @@ public class PathTool * links within pages of a web site. It provides similar functionality to Anakia's $relativePath * context variable. The arguments to this method may contain either forward or backward slashes as file separators. * The relative path returned is formed using forward slashes as it is expected this path is to be used as a link in - * a web page (again mimicking Anakia's behavior).

+ * a web page (again mimicking Anakia's behavior).

* *

This method is thread-safe.

* @@ -169,8 +169,8 @@ public static final String getDirectoryComponent( String filename ) * PathTool.calculateLink( "../index.html", "http://plexus.codehaus.org/plexus-utils" ) = "http://plexus.codehaus.org/plexus-utils/../index.html" * * - * @param link - * @param relativePath + * @param link main link + * @param relativePath relative * @return String */ public static final String calculateLink( String link, String relativePath ) @@ -239,8 +239,8 @@ public static final String calculateLink( String link, String relativePath ) * "http://plexus.codehaus.org/" = "../../" * * - * @param oldPath - * @param newPath + * @param oldPath main path + * @param newPath second path * @return a relative web path from oldPath. */ public static final String getRelativeWebPath( final String oldPath, final String newPath ) @@ -278,8 +278,8 @@ public static final String getRelativeWebPath( final String oldPath, final Strin * * Note: On Windows based system, the / character should be replaced by \ character. * - * @param oldPath - * @param newPath + * @param oldPath main path + * @param newPath second path * @return a relative file path from oldPath. */ public static final String getRelativeFilePath( final String oldPath, final String newPath ) diff --git a/src/main/java/org/codehaus/plexus/util/ReaderFactory.java b/src/main/java/org/codehaus/plexus/util/ReaderFactory.java index 70389d68..46041a20 100644 --- a/src/main/java/org/codehaus/plexus/util/ReaderFactory.java +++ b/src/main/java/org/codehaus/plexus/util/ReaderFactory.java @@ -36,7 +36,7 @@ * @author Herve Boutemy * @see Charset * @see Supported encodings - * @version $Id$ + * * @since 1.4.3 */ public class ReaderFactory diff --git a/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java b/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java index d43d62a6..e83488cc 100644 --- a/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java +++ b/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java @@ -32,7 +32,7 @@ * @author Michal Maczka * @author Jesse McConnell * @author Trygve Laugstøl - * @version $Id$ + * */ public final class ReflectionUtils { @@ -63,7 +63,7 @@ public static Field getFieldByNameIncludingSuperclasses( String fieldName, Class public static List getFieldsIncludingSuperclasses( Class clazz ) { - List fields = new ArrayList( Arrays.asList( clazz.getDeclaredFields() ) ); + List fields = new ArrayList<>( Arrays.asList( clazz.getDeclaredFields() ) ); Class superclass = clazz.getSuperclass(); @@ -104,13 +104,14 @@ public static Method getSetter( String fieldName, Class clazz ) } /** - * Finds all setters in the given class and super classes. + * @return all setters in the given class and super classes. + * @param clazz the Class */ public static List getSetters( Class clazz ) { Method[] methods = clazz.getMethods(); - List list = new ArrayList(); + List list = new ArrayList<>(); for ( Method method : methods ) { @@ -124,7 +125,8 @@ public static List getSetters( Class clazz ) } /** - * Returns the class of the argument to the setter. Will throw an RuntimeException if the method isn't a setter. + * @param method the method + * @return the class of the argument to the setter. Will throw an RuntimeException if the method isn't a setter. */ public static Class getSetterType( Method method ) { @@ -144,10 +146,10 @@ public static Class getSetterType( Method method ) /** * attempts to set the value to the variable in the object passed in * - * @param object - * @param variable - * @param value - * @throws IllegalAccessException + * @param object see name + * @param variable see name + * @param value see name + * @throws IllegalAccessException if error */ public static void setVariableValueInObject( Object object, String variable, Object value ) throws IllegalAccessException @@ -161,9 +163,10 @@ public static void setVariableValueInObject( Object object, String variable, Obj /** * Generates a map of the fields and values on a given object, also pulls from superclasses - * + * @param variable field name * @param object the object to generate the list of fields from * @return map containing the fields and their values + * @throws IllegalAccessException cannot access */ public static Object getValueIncludingSuperclasses( String variable, Object object ) throws IllegalAccessException @@ -181,11 +184,12 @@ public static Object getValueIncludingSuperclasses( String variable, Object obje * * @param object the object to generate the list of fields from * @return map containing the fields and their values + * @throws IllegalAccessException cannot access */ public static Map getVariablesAndValuesIncludingSuperclasses( Object object ) throws IllegalAccessException { - Map map = new HashMap(); + Map map = new HashMap<>(); gatherVariablesAndValuesIncludingSuperclasses( object, map ); diff --git a/src/main/java/org/codehaus/plexus/util/Scanner.java b/src/main/java/org/codehaus/plexus/util/Scanner.java index 14af3a9d..20bf85fb 100644 --- a/src/main/java/org/codehaus/plexus/util/Scanner.java +++ b/src/main/java/org/codehaus/plexus/util/Scanner.java @@ -88,7 +88,7 @@ public interface Scanner /** * Use a filename comparator in each directory when scanning. * - * @param filenameComparator + * @param filenameComparator the Comparator instance to use * @since 3.3.0 */ void setFilenameComparator( Comparator filenameComparator ); diff --git a/src/main/java/org/codehaus/plexus/util/SelectorUtils.java b/src/main/java/org/codehaus/plexus/util/SelectorUtils.java index 950524ab..2686cfee 100644 --- a/src/main/java/org/codehaus/plexus/util/SelectorUtils.java +++ b/src/main/java/org/codehaus/plexus/util/SelectorUtils.java @@ -69,7 +69,7 @@ * @author Arnout J. Kuiper ajkuiper@wxs.nl * @author Magesh Umasankar * @author Bruce Atherton - * @version $Id$ + * * @since 1.5 */ public final class SelectorUtils @@ -93,7 +93,7 @@ private SelectorUtils() } /** - * Retrieves the manager of the Singleton. + * @return Retrieves the manager of the Singleton. */ public static SelectorUtils getInstance() { diff --git a/src/main/java/org/codehaus/plexus/util/StringOutputStream.java b/src/main/java/org/codehaus/plexus/util/StringOutputStream.java index b4051925..ef22b575 100644 --- a/src/main/java/org/codehaus/plexus/util/StringOutputStream.java +++ b/src/main/java/org/codehaus/plexus/util/StringOutputStream.java @@ -23,7 +23,7 @@ * Wraps a String as an OutputStream. * * @author Emmanuel Venisse - * @version $Id$ + * * @deprecated As of version 1.5.2 this class should no longer be used because it does not properly handle character * encoding. Instead, use {@link java.io.ByteArrayOutputStream#toString(String)}. */ diff --git a/src/main/java/org/codehaus/plexus/util/StringUtils.java b/src/main/java/org/codehaus/plexus/util/StringUtils.java index b52a5a3b..2e6a2f3f 100644 --- a/src/main/java/org/codehaus/plexus/util/StringUtils.java +++ b/src/main/java/org/codehaus/plexus/util/StringUtils.java @@ -80,7 +80,7 @@ * @author Alexander Day Chaffee * @author Vincent Siveton * @since 1.0 - * @version $Id$ + * */ public class StringUtils { @@ -140,7 +140,6 @@ public static String trim( String str ) * * @param str String target to delete whitespace from * @return the String without whitespaces - * @throws NullPointerException */ public static String deleteWhitespace( String str ) { @@ -578,7 +577,9 @@ public static String[] split( String str ) } /** - * @see #split(String, String, int) + * @param text The string to parse. + * @param separator Characters used as the delimiters. If null, splits on whitespace. + * @return an array of parsed Strings */ public static String[] split( String text, String separator ) { @@ -892,7 +893,7 @@ public static String overlayString( String text, String overlay, int start, int /** *

* Center a String in a larger String of size n. - *

+ *

*

* Uses spaces as the value to buffer the String with. Equivalent to center(str, size, " "). *

@@ -2141,14 +2142,14 @@ private static void reverseArray( Object[] array ) // -------------------------------------------------------------------------- /** - * Turn "Now is the time for all good men" into "Now is the time for..." + * @return Turn "Now is the time for all good men" into "Now is the time for..." *

* Specifically: *

* If str is less than max characters long, return it. Else abbreviate it to (substring(str, 0, max-3) + "..."). If * maxWidth is less than 3, throw an IllegalArgumentException. In no case will it return a string of length greater * than maxWidth. - * + * @param s string * @param maxWidth maximum length of result string **/ public static String abbreviate( String s, int maxWidth ) @@ -2157,12 +2158,12 @@ public static String abbreviate( String s, int maxWidth ) } /** - * Turn "Now is the time for all good men" into "...is the time for..." - *

+ * @return Turn "Now is the time for all good men" into "...is the time for..." + * * Works like abbreviate(String, int), but allows you to specify a "left edge" offset. Note that this left edge is * not necessarily going to be the leftmost character in the result, or the first character following the ellipses, * but it will appear somewhere in the result. In no case will it return a string of length greater than maxWidth. - * + * @param s string * @param offset left edge of source string * @param maxWidth maximum length of result string **/ @@ -2207,7 +2208,8 @@ public static String abbreviate( String s, int offset, int maxWidth ) * second string, starting from where it's different from the first.) *

* E.g. strdiff("i am a machine", "i am a robot") -> "robot" - * + * @param s1 string + * @param s2 string * @return the portion of s2 where it differs from s1; returns the empty string ("") if they are equal **/ public static String difference( String s1, String s2 ) @@ -2225,7 +2227,8 @@ public static String difference( String s1, String s2 ) *

* E.g. strdiff("i am a machine", "i am a robot") -> 7 *

- * + * @param s1 string + * @param s2 string * @return the index where s2 and s1 begin to differ; -1 if they are equal **/ public static int differenceAt( String s1, String s2 ) @@ -2340,8 +2343,8 @@ public static String addAndDeHump( String view ) * StringUtils.quoteAndEscape("a\"bc", '\'') = 'a\"bc' * * - * @param source - * @param quoteChar + * @param source the source String + * @param quoteChar the char used to quote * @return the String quoted and escaped * @since 1.5.1 * @see #quoteAndEscape(String, char, char[], char[], char, boolean) @@ -2356,9 +2359,9 @@ public static String quoteAndEscape( String source, char quoteChar ) * Quote and escape a String with the given character, handling null. *

* - * @param source - * @param quoteChar - * @param quotingTriggers + * @param source the source String + * @param quoteChar the char used to quote + * @param quotingTriggers chars generating a quote * @return the String quoted and escaped * @since 1.5.1 * @see #quoteAndEscape(String, char, char[], char[], char, boolean) @@ -2369,11 +2372,11 @@ public static String quoteAndEscape( String source, char quoteChar, char[] quoti } /** - * @param source - * @param quoteChar - * @param escapedChars - * @param escapeChar - * @param force + * @param source the source String + * @param quoteChar the char used to quote + * @param escapedChars chars to escape + * @param escapeChar char used for escaping + * @param force force the quoting * @return the String quoted and escaped * @since 1.5.1 * @see #quoteAndEscape(String, char, char[], char[], char, boolean) @@ -2385,12 +2388,12 @@ public static String quoteAndEscape( String source, char quoteChar, final char[] } /** - * @param source - * @param quoteChar - * @param escapedChars - * @param quotingTriggers - * @param escapeChar - * @param force + * @param source the source String + * @param quoteChar the char used to quote + * @param escapedChars chars to escape + * @param quotingTriggers chars generating a quote + * @param escapeChar char used for escaping + * @param force force the quoting * @return the String quoted and escaped * @since 1.5.1 */ @@ -2401,12 +2404,12 @@ public static String quoteAndEscape( String source, char quoteChar, final char[] } /** - * @param source - * @param quoteChar - * @param escapedChars - * @param quotingTriggers - * @param escapePattern - * @param force + * @param source the source String + * @param quoteChar the char used to quote + * @param escapedChars chars to escape + * @param quotingTriggers chars generating a quote + * @param escapePattern pattern used for escaping + * @param force force the quoting * @return the String quoted and escaped * @since 3.0.4 */ @@ -2456,9 +2459,9 @@ else if ( !escaped.equals( source ) ) } /** - * @param source - * @param escapedChars - * @param escapeChar + * @param source the source String + * @param escapedChars chars to escape + * @param escapeChar char used for escaping * @return the String escaped * @since 1.5.1 */ @@ -2468,9 +2471,9 @@ public static String escape( String source, final char[] escapedChars, char esca } /** - * @param source - * @param escapedChars - * @param escapePattern + * @param source the source String + * @param escapedChars chars to escape + * @param escapePattern pattern used for escaping * @return the String escaped * @since 3.0.4 */ diff --git a/src/main/java/org/codehaus/plexus/util/SweeperPool.java b/src/main/java/org/codehaus/plexus/util/SweeperPool.java index dcfa0e71..0a2a97a4 100644 --- a/src/main/java/org/codehaus/plexus/util/SweeperPool.java +++ b/src/main/java/org/codehaus/plexus/util/SweeperPool.java @@ -23,7 +23,7 @@ * disposed first. * * @author Bert van Brakel - * @version $Id$ + * */ public class SweeperPool { @@ -54,17 +54,16 @@ public class SweeperPool /** * There are a number of settings to control how the pool operates. - *
    - *
  • minSize - this is the size the pool is trimmed to
  • - *
  • triggerSize - this determines if the pool is trimmed when the sweeper runs. If the pool size is - * greater or equal than this value then the pool is trimmed to minSize.
  • - *
  • maxSize - if the pool has reached this size, any objects added are immediately disposed. If the - * pool is this size when the sweeper runs, then the pool is also trimmed to minSize irrespective of - * the triggerSize.
  • - *
  • sweepInterval - how often the sweeper runs. Is actually the time since the sweeper last finished - * a pass. 0 if the sweeper should not run.
  • - *
- + * @param maxSize if the pool has reached this size, any objects added are immediately disposed. If the + * pool is this size when the sweeper runs, then the pool is also trimmed to minSize irrespective of + * the triggerSize. + * @param minSize - this is the size the pool is trimmed to + * @param triggerSize - this determines if the pool is trimmed when the sweeper runs. If the pool size is + * greater or equal than this value then the pool is trimmed to minSize. + * + * @param sweepInterval how often the sweeper runs. Is actually the time since the sweeper last finished + * a pass. 0 if the sweeper should not run. + * @param intialCapacity the intial capacity *

Any value less than 0 is automatically converted to 0

*/ public SweeperPool( int maxSize, int minSize, int intialCapacity, int sweepInterval, int triggerSize ) @@ -85,18 +84,12 @@ public SweeperPool( int maxSize, int minSize, int intialCapacity, int sweepInter private int saneConvert( int value ) { - if ( value < 0 ) - { - return 0; - } - else - { - return value; - } + return Math.max( value, 0 ); } /** * Return the pooled object + * @return first available object from the pool */ public synchronized Object get() { @@ -225,7 +218,7 @@ public synchronized void trim() * Override this to be notified of object disposal. Called after the object has been removed. Occurs when the pool * is trimmed. * - * @param obj + * @param obj the Object */ public void objectDisposed( Object obj ) { @@ -234,7 +227,7 @@ public void objectDisposed( Object obj ) /** * Override this to be notified of object addition. Called before object is to be added. * - * @param obj + * @param obj the Object */ public void objectAdded( Object obj ) { @@ -244,7 +237,7 @@ public void objectAdded( Object obj ) * Override this to be notified of object retrieval. Called after object removed from the pool, but before returned * to the client. * - * @param obj + * @param obj the Object */ public void objectRetrieved( Object obj ) { diff --git a/src/main/java/org/codehaus/plexus/util/WriterFactory.java b/src/main/java/org/codehaus/plexus/util/WriterFactory.java index 229f1082..87a4283d 100644 --- a/src/main/java/org/codehaus/plexus/util/WriterFactory.java +++ b/src/main/java/org/codehaus/plexus/util/WriterFactory.java @@ -35,7 +35,7 @@ * @author Herve Boutemy * @see Charset * @see Supported encodings - * @version $Id$ + * * @since 1.4.4 */ public class WriterFactory diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java index 9e8179c3..0a861a75 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineCallable.java @@ -27,6 +27,6 @@ public interface CommandLineCallable extends Callable { @Override - public Integer call() + Integer call() throws CommandLineException; } diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java index bf36f527..9d0a439e 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java @@ -18,7 +18,7 @@ /** * @author Trygve Laugstøl - * @version $Id$ + * */ public class CommandLineException extends Exception diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java index 20514e8a..9d90c674 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineTimeOutException.java @@ -22,24 +22,17 @@ /** * @author olamy * @since 1.5.9 - * @version $Id$ + * */ public class CommandLineTimeOutException extends CommandLineException { - /** - * @param message - */ public CommandLineTimeOutException( String message ) { super( message ); } - /** - * @param message - * @param cause - */ public CommandLineTimeOutException( String message, Throwable cause ) { super( message, cause ); diff --git a/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java b/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java index 9de3970e..4a556c84 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java +++ b/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java @@ -29,7 +29,7 @@ /** * @author Trygve Laugstøl - * @version $Id$ + * */ public abstract class CommandLineUtils { @@ -500,7 +500,8 @@ else if ( " ".equals( nextTok ) ) * If the argument doesn't include spaces or quotes, return it as is. If it contains double quotes, use single * quotes - else surround the argument by double quotes. *

- * + * @param argument the argument + * @return the transformed command line * @throws CommandLineException if the argument contains both, single and double quotes. * @deprecated Use {@link StringUtils#quoteAndEscape(String, char, char[], char[], char, boolean)}, * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or @@ -522,7 +523,9 @@ public static String quote( String argument ) * If the argument doesn't include spaces or quotes, return it as is. If it contains double quotes, use single * quotes - else surround the argument by double quotes. *

- * + * @param argument see name + * @param wrapExistingQuotes see name + * @return the transformed command line * @throws CommandLineException if the argument contains both, single and double quotes. * @deprecated Use {@link StringUtils#quoteAndEscape(String, char, char[], char[], char, boolean)}, * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or @@ -537,6 +540,12 @@ public static String quote( String argument, boolean wrapExistingQuotes ) } /** + * @param argument the argument + * @param escapeSingleQuotes see name + * @param escapeDoubleQuotes see name + * @param wrapExistingQuotes see name + * @return the transformed command line + * @throws CommandLineException some trouble * @deprecated Use {@link StringUtils#quoteAndEscape(String, char, char[], char[], char, boolean)}, * {@link StringUtils#quoteAndEscape(String, char, char[], char, boolean)}, or * {@link StringUtils#quoteAndEscape(String, char)} instead. diff --git a/src/main/java/org/codehaus/plexus/util/cli/Commandline.java b/src/main/java/org/codehaus/plexus/util/cli/Commandline.java index 1d92e2e1..c06147a9 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/Commandline.java +++ b/src/main/java/org/codehaus/plexus/util/cli/Commandline.java @@ -109,7 +109,7 @@ public class Commandline @Deprecated protected static final String WINDOWS = "Windows"; - protected Vector arguments = new Vector(); + protected Vector arguments = new Vector<>(); // protected Vector envVars = new Vector(); // synchronized added to preserve synchronize of Vector class @@ -136,7 +136,8 @@ public class Commandline * Create a new command line object. Shell is autodetected from operating system Shell usage is only desirable when * generating code for remote execution. * - * @param toProcess + * @param toProcess sh to process + * @param shell Shell to use */ public Commandline( String toProcess, Shell shell ) { @@ -164,6 +165,7 @@ public Commandline( String toProcess, Shell shell ) /** * Create a new command line object. Shell is autodetected from operating system Shell usage is only desirable when * generating code for remote execution. + * @param shell the Shell */ public Commandline( Shell shell ) { @@ -173,7 +175,7 @@ public Commandline( Shell shell ) /** * Create a new command line object, given a command following POSIX sh quoting rules * - * @param toProcess + * @param toProcess the process */ public Commandline( String toProcess ) { @@ -239,7 +241,7 @@ public class Marker } /** - *

Return the number of arguments that preceded this marker.

+ * @return the number of arguments that preceded this marker. * *

The name of the executable - if set - is counted as the very first argument.

*/ @@ -307,6 +309,7 @@ public Argument createArgument() * @param insertAtStart if true, the argument is inserted at the beginning of the list of args, otherwise it is * appended. * @deprecated Use {@link Commandline#createArg(boolean)} instead + * @return Argument the argument Object */ @Deprecated public Argument createArgument( boolean insertAtStart ) @@ -338,7 +341,7 @@ public Arg createArg() } /** - *

Creates an argument object and adds it to our list of args.

+ * @return Creates an argument object and adds it to our list of args. * *

Each commandline object has at most one instance of the argument class.

* @@ -360,8 +363,7 @@ public Arg createArg( boolean insertAtStart ) } /** - * Adds an argument object to our list of args. - * + * @param argument the argument * @see #addArg(Arg,boolean) */ public void addArg( Arg argument ) @@ -371,7 +373,7 @@ public void addArg( Arg argument ) /** * Adds an argument object to our list of args. - * + * @param argument the argument * @param insertAtStart if true, the argument is inserted at the beginning of the list of args, otherwise it is * appended. */ @@ -389,6 +391,7 @@ public void addArg( Arg argument, boolean insertAtStart ) /** * Sets the executable to run. + * @param executable the executable */ public void setExecutable( String executable ) { @@ -432,6 +435,8 @@ public void addArguments( String[] line ) /** * Add an environment variable + * @param name name + * @param value value */ public void addEnvironment( String name, String value ) { @@ -441,6 +446,7 @@ public void addEnvironment( String name, String value ) /** * Add system environment variables + * @throws Exception if error */ public void addSystemEnvironment() throws Exception @@ -458,7 +464,8 @@ public void addSystemEnvironment() } /** - * Return the list of environment variables + * @return String[] Return the list of environment variables + * @throws CommandLineException if error */ public String[] getEnvironmentVariables() throws CommandLineException @@ -484,8 +491,8 @@ public String[] getEnvironmentVariables() } /** - * Returns the executable and all defined arguments.
- * For Windows Family, {@link Commandline#getShellCommandline()} is returned + * @return Returns the executable and all defined arguments. + * For Windows Family, {@link Commandline#getShellCommandline()} is returned */ public String[] getCommandline() { @@ -498,8 +505,8 @@ public String[] getCommandline() } /** - * Returns the executable and all defined arguments.
- * + * Returns the executable and all defined arguments. + * @return the command line as array not escaped neither quoted */ public String[] getRawCommandline() { @@ -519,6 +526,7 @@ public String[] getRawCommandline() /** * Returns the shell, executable and all defined arguments. Shell usage is only desirable when generating code for * remote execution. + * @return the command line as array */ public String[] getShellCommandline() { @@ -529,11 +537,11 @@ public String[] getShellCommandline() } /** - * Returns all arguments defined by addLine, addValue or the argument object. + * @return Returns all arguments defined by addLine, addValue or the argument object. */ public String[] getArguments() { - Vector result = new Vector( arguments.size() * 2 ); + Vector result = new Vector<>( arguments.size() * 2 ); for ( int i = 0; i < arguments.size(); i++ ) { Arg arg = arguments.elementAt( i ); @@ -594,11 +602,11 @@ public void clearArgs() } /** - *

Return a marker.

- * + * *

This marker can be used to locate a position on the commandline - to insert something for example - when all * parameters have been set. *

+ * @return Return a marker. */ public Marker createMarker() { @@ -607,6 +615,7 @@ public Marker createMarker() /** * Sets execution directory. + * @param path the working directory as String */ public void setWorkingDirectory( String path ) { @@ -616,6 +625,7 @@ public void setWorkingDirectory( String path ) /** * Sets execution directory. + * @param workingDirectory the File used as working directory */ public void setWorkingDirectory( File workingDirectory ) { @@ -637,6 +647,8 @@ public File getWorkingDirectory() /** * Executes the command. + * @return the Process + * @throws CommandLineException if error */ public Process execute() throws CommandLineException @@ -709,7 +721,7 @@ public Properties getSystemEnvVars() * Allows to set the shell to be used in this command line. Shell usage is only desirable when generating code for * remote execution. * - * @param shell + * @param shell Shell to use * @since 1.2 */ public void setShell( Shell shell ) @@ -722,6 +734,7 @@ public void setShell( Shell shell ) * execution. * * @since 1.2 + * @return the Shell */ public Shell getShell() { @@ -729,6 +742,9 @@ public Shell getShell() } /** + * @param toProcess the process + * @return the command line arguments + * @throws Exception if error happen * @deprecated Use {@link CommandLineUtils#translateCommandline(String)} instead. */ @Deprecated @@ -739,6 +755,9 @@ public static String[] translateCommandline( String toProcess ) } /** + * @param argument the argument + * @return the quote arg + * @throws CommandLineException if error happen * @deprecated Use {@link CommandLineUtils#quote(String)} instead. */ @Deprecated @@ -750,6 +769,8 @@ public static String quoteArgument( String argument ) /** * @deprecated Use {@link CommandLineUtils#toString(String[])} instead. + * @param line the lines + * @return lines as single String */ @Deprecated public static String toString( String[] line ) diff --git a/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java b/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java index c36f64ee..802dfb02 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java @@ -20,7 +20,7 @@ /** * @author Emmanuel Venisse - * @version $Id$ + * */ public class DefaultConsumer implements StreamConsumer diff --git a/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java b/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java index c260e883..2db89002 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java @@ -22,7 +22,7 @@ * The java.util.StringTokenizer is horribly broken. Given the string 1,,,3,,4 (, delim) It will return 1,3,4 Which is * clearly wrong - 1,EMPTY,EMPTY,3,EMPTY,4 is what it should return * - * @version $Id$ + * */ public final class EnhancedStringTokenizer { diff --git a/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java b/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java index 9bc888a3..e01bda2c 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java @@ -62,7 +62,7 @@ * * @author Florin Vancea * @author Paul Julius - * @version $Id$ + * */ public interface StreamConsumer { diff --git a/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java b/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java index dd0d7a1c..270d7d8b 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java +++ b/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java @@ -24,7 +24,7 @@ * Read from an InputStream and write the output to an OutputStream. * * @author Trygve Laugstøl - * @version $Id$ + * */ public class StreamFeeder extends AbstractStreamHandler @@ -121,6 +121,7 @@ public void close() /** * @since 3.1.0 + * @return the Exception */ public Throwable getException() { diff --git a/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java b/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java index b5e0a0dc..12126e88 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java +++ b/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java @@ -81,7 +81,7 @@ * * @author Florin Vancea * @author Paul Julius - * @version $Id$ + * * @since June 11, 2001 */ public class StreamPumper diff --git a/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java b/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java index 97b715f0..ed24136e 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java +++ b/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java @@ -21,7 +21,7 @@ /** * @author Jason van Zyl - * @version $Id$ + * */ public class WriterStreamConsumer implements StreamConsumer diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java index e955eecc..089bc6fd 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java @@ -23,7 +23,7 @@ /** * @author Jason van Zyl - * @version $Id$ + * */ public class BourneShell extends Shell diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java index 50ecbd68..aa0af43a 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java @@ -26,7 +26,7 @@ * * @author Carlos Sanchez * @since 1.2 - * @version $Id$ + * */ public class CmdShell extends Shell diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java index 5ca7e875..4aa4c2af 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java @@ -23,7 +23,7 @@ * * @author Carlos Sanchez * @since 1.2 - * @version $Id$ + * */ public class CommandShell extends Shell diff --git a/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java b/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java index 2150be01..6082849c 100644 --- a/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java +++ b/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java @@ -32,7 +32,7 @@ * * @author Carlos Sanchez * @since 1.2 - * @version $Id$ + * */ public class Shell implements Cloneable @@ -70,7 +70,7 @@ public class Shell /** * Toggle unconditional quoting * - * @param unconditionallyQuote + * @param unconditionallyQuote see name */ public void setUnconditionalQuoting( boolean unconditionallyQuote ) { @@ -80,7 +80,7 @@ public void setUnconditionalQuoting( boolean unconditionallyQuote ) /** * Set the command to execute the shell (eg. COMMAND.COM, /bin/bash,...) * - * @param shellCommand + * @param shellCommand see name */ public void setShellCommand( String shellCommand ) { @@ -90,7 +90,7 @@ public void setShellCommand( String shellCommand ) /** * Get the command to execute the shell * - * @return + * @return the command */ public String getShellCommand() { @@ -100,7 +100,7 @@ public String getShellCommand() /** * Set the shell arguments when calling a command line (not the executable arguments) (eg. /X /C for CMD.EXE) * - * @param shellArgs + * @param shellArgs see name */ public void setShellArgs( String[] shellArgs ) { @@ -109,9 +109,7 @@ public void setShellArgs( String[] shellArgs ) } /** - * Get the shell arguments - * - * @return + * @return the shell arguments */ public String[] getShellArgs() { @@ -328,7 +326,8 @@ public boolean isQuotedExecutableEnabled() } /** - * Sets the executable to run. + * + * @param executable Sets the executable to run. */ public void setExecutable( String executable ) { @@ -345,7 +344,7 @@ public String getExecutable() } /** - * Sets execution directory. + * @param path Sets execution directory. */ public void setWorkingDirectory( String path ) { @@ -356,7 +355,7 @@ public void setWorkingDirectory( String path ) } /** - * Sets execution directory. + * @param workingDir Sets execution directory. */ public void setWorkingDirectory( File workingDir ) { diff --git a/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java b/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java index 53c2c657..e350af9d 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java +++ b/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java @@ -37,9 +37,6 @@ public List getCycle() return cycle; } - /** - * @return - */ public String cycleToString() { final StringBuilder buffer = new StringBuilder(); diff --git a/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java b/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java index 5b135343..6f810043 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java +++ b/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java @@ -24,7 +24,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class CycleDetector { @@ -39,7 +39,7 @@ public static List hasCycle( final DAG graph ) { final List vertices = graph.getVertices(); - final Map vertexStateMap = new HashMap(); + final Map vertexStateMap = new HashMap<>(); List retValue = null; @@ -63,13 +63,13 @@ public static List hasCycle( final DAG graph ) * This method will be called when an edge leading to given vertex was added and we want to check if introduction of * this edge has not resulted in apparition of cycle in the graph * - * @param vertex - * @param vertexStateMap - * @return + * @param vertex the vertex + * @param vertexStateMap the vertex Map + * @return the found cycle */ public static List introducesCycle( final Vertex vertex, final Map vertexStateMap ) { - final LinkedList cycleStack = new LinkedList(); + final LinkedList cycleStack = new LinkedList<>(); final boolean hasCycle = dfsVisit( vertex, cycleStack, vertexStateMap ); @@ -97,16 +97,11 @@ public static List introducesCycle( final Vertex vertex, final Map introducesCycle( final Vertex vertex ) { - final Map vertexStateMap = new HashMap(); + final Map vertexStateMap = new HashMap<>(); return introducesCycle( vertex, vertexStateMap ); } - /** - * @param vertex - * @param vertexStateMap - * @return - */ private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) { final Integer state = vertexStateMap.get( vertex ); @@ -114,11 +109,6 @@ private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) { final Integer state = vertexStateMap.get( vertex ); @@ -158,4 +148,4 @@ else if ( isVisiting( v, vertexStateMap ) ) return false; } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/dag/DAG.java b/src/main/java/org/codehaus/plexus/util/dag/DAG.java index 2e75e8c7..4d0f9a45 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/DAG.java +++ b/src/main/java/org/codehaus/plexus/util/dag/DAG.java @@ -27,7 +27,7 @@ * DAG = Directed Acyclic Graph * * @author Michal Maczka - * @version $Id$ + * * TODO this class should be renamed from DAG to Dag */ public class DAG @@ -42,12 +42,12 @@ public class DAG /** * Maps vertex's label to vertex */ - private Map vertexMap = new HashMap(); + private Map vertexMap = new HashMap<>(); /** * Conatin list of all vertices */ - private List vertexList = new ArrayList(); + private List vertexList = new ArrayList<>(); // ------------------------------------------------------------ // Constructors @@ -66,7 +66,7 @@ public DAG() // ------------------------------------------------------------ /** - * @return + * @return the vertices */ public List getVertices() { @@ -75,6 +75,7 @@ public List getVertices() /** * @deprecated instead use {@link #getVertices()} + * @return the vertices */ @Deprecated public List getVerticies() @@ -187,8 +188,8 @@ public boolean hasEdge( final String label1, final String label2 ) } /** - * @param label - * @return + * @param label see name + * @return the childs */ public List getChildLabels( final String label ) { @@ -198,8 +199,8 @@ public List getChildLabels( final String label ) } /** - * @param label - * @return + * @param label see name + * @return the parents */ public List getParentLabels( final String label ) { @@ -223,7 +224,7 @@ public Object clone() /** * Indicates if there is at least one edge leading to or from vertex of given label - * + * @param label the label * @return true if this vertex is connected with other vertex,false otherwise */ public boolean isConnected( final String label ) @@ -252,7 +253,7 @@ public List getSuccessorLabels( final String label ) // optimization. if ( vertex.isLeaf() ) { - retValue = new ArrayList( 1 ); + retValue = new ArrayList<>( 1 ); retValue.add( label ); } diff --git a/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java b/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java index 1552c55f..b2736255 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java +++ b/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java @@ -23,7 +23,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class TopologicalSorter { @@ -35,10 +35,9 @@ public class TopologicalSorter private final static Integer VISITED = 2; /** - * @param graph + * @param graph the graph * @return List of String (vertex labels) */ - public static List sort( final DAG graph ) { return dfs( graph ); @@ -47,7 +46,7 @@ public static List sort( final DAG graph ) public static List sort( final Vertex vertex ) { // we need to use addFirst method so we will use LinkedList explicitly - final List retValue = new LinkedList(); + final List retValue = new LinkedList<>(); dfsVisit( vertex, new HashMap(), retValue ); @@ -57,8 +56,8 @@ public static List sort( final Vertex vertex ) private static List dfs( final DAG graph ) { // we need to use addFirst method so we will use LinkedList explicitly - final List retValue = new LinkedList(); - final Map vertexStateMap = new HashMap(); + final List retValue = new LinkedList<>(); + final Map vertexStateMap = new HashMap<>(); for ( Vertex vertex : graph.getVertices() ) { @@ -71,11 +70,6 @@ private static List dfs( final DAG graph ) return retValue; } - /** - * @param vertex - * @param vertexStateMap - * @return - */ private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) { final Integer state = vertexStateMap.get( vertex ); diff --git a/src/main/java/org/codehaus/plexus/util/dag/Vertex.java b/src/main/java/org/codehaus/plexus/util/dag/Vertex.java index b8081b48..489b6185 100644 --- a/src/main/java/org/codehaus/plexus/util/dag/Vertex.java +++ b/src/main/java/org/codehaus/plexus/util/dag/Vertex.java @@ -22,7 +22,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class Vertex implements Cloneable, Serializable @@ -32,17 +32,14 @@ public class Vertex // ------------------------------------------------------------ private String label = null; - List children = new ArrayList(); + List children = new ArrayList<>(); - List parents = new ArrayList(); + List parents = new ArrayList<>(); // ------------------------------------------------------------ // Constructors // ------------------------------------------------------------ - /** - * - */ public Vertex( final String label ) { this.label = label; @@ -52,33 +49,21 @@ public Vertex( final String label ) // Accessors // ------------------------------------------------------------ - /** - * @return - */ public String getLabel() { return label; } - /** - * @param vertex - */ public void addEdgeTo( final Vertex vertex ) { children.add( vertex ); } - /** - * @param vertex - */ public void removeEdgeTo( final Vertex vertex ) { children.remove( vertex ); } - /** - * @param vertex - */ public void addEdgeFrom( final Vertex vertex ) { parents.add( vertex ); @@ -101,7 +86,7 @@ public List getChildren() */ public List getChildLabels() { - final List retValue = new ArrayList( children.size() ); + final List retValue = new ArrayList<>( children.size() ); for ( Vertex vertex : children ) { @@ -127,7 +112,7 @@ public List getParents() */ public List getParentLabels() { - final List retValue = new ArrayList( parents.size() ); + final List retValue = new ArrayList<>( parents.size() ); for ( Vertex vertex : parents ) { diff --git a/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java b/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java index 387dc68a..6e0c8be2 100644 --- a/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java +++ b/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java @@ -29,7 +29,7 @@ * @author Bob McWhirter * @author Attila Szegedi * @author Geir Magnusson Jr. - * @version $Id$ + * */ public class ClassMap { @@ -50,12 +50,13 @@ private static final class CacheMiss /** * Cache of Methods, or CACHE_MISS, keyed by method name and actual arguments used to find it. */ - private Map methodCache = new Hashtable(); + private Map methodCache = new Hashtable<>(); private final MethodMap methodMap = new MethodMap(); /** * Standard constructor + * @param clazz the Class */ public ClassMap( Class clazz ) { @@ -78,6 +79,10 @@ Class getCachedClass() * it'll be a Method, in which case, we return it.

* *

If nothing is found, then we must actually go and introspect the method from the MethodMap.

+ * @param name method name + * @param params method params + * @return the find Method or null + * @throws org.codehaus.plexus.util.introspection.MethodMap.AmbiguousException if ambiguous name */ public Method findMethod( String name, Object[] params ) throws MethodMap.AmbiguousException diff --git a/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java b/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java index b6069f95..51420cca 100644 --- a/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java +++ b/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java @@ -30,7 +30,7 @@ * @author Christoph Reck * @author Geir Magnusson Jr. * @author Attila Szegedi - * @version $Id$ + * */ public class MethodMap { diff --git a/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java b/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java index e4603f3d..656c8201 100644 --- a/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java +++ b/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java @@ -37,7 +37,7 @@ * * @author Jason van Zyl * @author Vincent Siveton - * @version $Id$ + * * @see http://struts.apache.org/1.x/struts-taglib/indexedprops.html */ @@ -175,6 +175,7 @@ public static Object evaluate( String expression, Object root ) * * @param expression not null expression * @param root not null object + * @param trimRootToken root start * @return the object defined by the expression * @throws Exception if any */ diff --git a/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java b/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java index b8207cbe..bfa5c471 100644 --- a/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java +++ b/src/main/java/org/codehaus/plexus/util/io/InputStreamFacade.java @@ -26,7 +26,9 @@ public interface InputStreamFacade { /** - * Retrieves the actual {@link InputStream}. The caller must assume, that this method may be invoked only once. + * The caller must assume, that this method may be invoked only once. + * @return Retrieves the actual {@link InputStream}. + * @throws IOException if io issue */ InputStream getInputStream() throws IOException; diff --git a/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java b/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java index f4adcdf5..4f3a9d84 100644 --- a/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java +++ b/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java @@ -50,6 +50,7 @@ public Reflector() * * @param theClass The class to instantiate * @param params The parameters to pass to the constructor + * @param the type * @return The instantiated object * @throws ReflectorException In case anything goes wrong here... */ @@ -94,15 +95,7 @@ public T newInstance( Class theClass, Object[] params ) return con.newInstance( params ); } - catch ( InstantiationException ex ) - { - throw new ReflectorException( ex ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InstantiationException | InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } @@ -114,6 +107,7 @@ public T newInstance( Class theClass, Object[] params ) * * @param theClass The class to retrieve the singleton of * @param initParams The parameters to pass to the constructor + * @param the type * @return The singleton object * @throws ReflectorException In case anything goes wrong here... */ @@ -135,11 +129,7 @@ public T getSingleton( Class theClass, Object[] initParams ) // noinspection unchecked return (T) method.invoke( null, initParams ); } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } @@ -193,11 +183,7 @@ public Object invoke( Object target, String methodName, Object[] params ) return method.invoke( target, params ); } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } @@ -213,19 +199,7 @@ public Object getStaticField( Class targetClass, String fieldName ) return field.get( null ); } - catch ( SecurityException e ) - { - throw new ReflectorException( e ); - } - catch ( NoSuchFieldException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalArgumentException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalAccessException e ) + catch ( SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e ) { throw new ReflectorException( e ); } @@ -331,11 +305,7 @@ public Object invokeStatic( Class targetClass, String methodName, Object[] param return method.invoke( null, params ); } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) + catch ( InvocationTargetException | IllegalAccessException ex ) { throw new ReflectorException( ex ); } @@ -346,6 +316,7 @@ public Object invokeStatic( Class targetClass, String methodName, Object[] param * * @param targetClass The class to get the constructor from * @param params The classes of the parameters which the constructor should match. + * @param the type * @return the Constructor object that matches. * @throws ReflectorException In case we can't retrieve the proper constructor. */ @@ -496,6 +467,7 @@ public Object getObjectProperty( Object target, String propertyName ) * * @param targetClass The class to get the method from * @param params The classes of the parameters which the method should match. + * @param methodName the method name * @return the Method object that matches. * @throws ReflectorException In case we can't retrieve the proper method. */ @@ -615,8 +587,8 @@ private Map> getConstructorMap( Class theClass ) if ( classMethods == null ) { - classMethods = new HashMap>(); - methodMap = new HashMap(); + classMethods = new HashMap<>(); + methodMap = new HashMap<>(); classMethods.put( methodName, methodMap ); classMaps.put( className, classMethods ); } @@ -630,7 +602,7 @@ private Map> getConstructorMap( Class theClass ) if ( methodMap == null ) { - methodMap = new HashMap(); + methodMap = new HashMap<>(); classMethods.put( methodName, methodMap ); } } @@ -639,4 +611,4 @@ private Map> getConstructorMap( Class theClass ) return methodMap; } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java index 279e3cef..85835210 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java @@ -20,7 +20,7 @@ import java.io.Writer; /** - * @version $Id$ + * */ public class CompactXMLWriter extends PrettyPrintXMLWriter diff --git a/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java index df14f8e9..c4387317 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java @@ -27,7 +27,7 @@ /** * Implementation of XMLWriter which emits nicely formatted documents. * - * @version $Id$ + * */ public class PrettyPrintXMLWriter implements XMLWriter diff --git a/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java index d3851035..488103d4 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java @@ -28,7 +28,7 @@ * Write to an MXSerializer. * * @author Brett Porter - * @version $Id$ + * */ public class SerializerXMLWriter implements XMLWriter diff --git a/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java b/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java index 3f7680be..364849ba 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java @@ -17,7 +17,7 @@ */ /** - * @version $Id$ + * */ public interface XMLWriter { diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java b/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java index 9864d3df..2d662f56 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlReader.java @@ -312,6 +312,7 @@ public XmlReader( InputStream is, String httpContentType ) * @param is InputStream to create the reader from. * @param httpContentType content-type header to use for the resolution of the charset encoding. * @param lenient indicates if the charset encoding detection should be relaxed. + * @param defaultEncoding encoding to use * @throws IOException thrown if there is a problem reading the file. * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java index 2c561405..5c26aa98 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamReader.java @@ -201,6 +201,7 @@ public XmlStreamReader( InputStream is, String httpContentType ) * @param is InputStream to create the reader from. * @param httpContentType content-type header to use for the resolution of the charset encoding. * @param lenient indicates if the charset encoding detection should be relaxed. + * @param defaultEncoding encoding to use * @throws IOException thrown if there is a problem reading the file. * @throws XmlStreamReaderException thrown if the charset encoding could not be determined according to the specs. */ diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java index 2dfcc5f0..cf4e4be7 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlStreamWriter.java @@ -33,7 +33,7 @@ * the XML document written to the stream. * * @author Herve Boutemy - * @version $Id$ + * * @since 1.4.4 */ public class XmlStreamWriter diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java b/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java index 54318004..73464b8e 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlUtil.java @@ -35,7 +35,7 @@ * Common XML utilities methods. * * @author Vincent Siveton - * @version $Id$ + * * @since 1.5.7 */ public class XmlUtil diff --git a/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java b/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java index a392b0d0..22527a1b 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java +++ b/src/main/java/org/codehaus/plexus/util/xml/XmlWriterUtil.java @@ -22,7 +22,7 @@ * Utility class for the XmlWriter class. * * @author Vincent Siveton - * @version $Id$ + * */ public class XmlWriterUtil { @@ -63,7 +63,7 @@ public static void writeLineBreak( XMLWriter writer, int repeat ) * Convenience method to repeat CRLF and to indent the writer by 2. * * @param writer not null - * @param repeat + * @param repeat space repeat * @param indent positive number * @see #DEFAULT_INDENTATION_SIZE * @see #writeLineBreak(XMLWriter, int, int, int) @@ -77,7 +77,7 @@ public static void writeLineBreak( XMLWriter writer, int repeat, int indent ) * Convenience method to repeat CRLF and to indent the writer by indentSize. * * @param writer not null - * @param repeat + * @param repeat repeat time * @param indent positive number * @param indentSize positive number */ @@ -131,7 +131,7 @@ public static void writeCommentLineBreak( XMLWriter writer, int columnSize ) * 80. * * @param writer not null - * @param comment + * @param comment the comment * @see #DEFAULT_INDENTATION_SIZE * @see #writeComment(XMLWriter, String, int, int) */ @@ -145,7 +145,7 @@ public static void writeComment( XMLWriter writer, String comment ) * 80 and is indented by indent using 2 as indentation size. * * @param writer not null - * @param comment + * @param comment the comment * @param indent positive number * @see #DEFAULT_INDENTATION_SIZE * @see #writeComment(XMLWriter, String, int, int) @@ -160,7 +160,7 @@ public static void writeComment( XMLWriter writer, String comment, int indent ) * 80 and is indented by indent using indentSize. * * @param writer not null - * @param comment + * @param comment the comment * @param indent positive number * @param indentSize positive number * @see #DEFAULT_COLUMN_LINE @@ -176,7 +176,7 @@ public static void writeComment( XMLWriter writer, String comment, int indent, i * columnSize and is indented by indent using indentSize. * * @param writer not null - * @param comment + * @param comment the comment * @param indent positive number * @param indentSize positive number * @param columnSize positive number @@ -266,7 +266,7 @@ public static void writeComment( XMLWriter writer, String comment, int indent, i * Convenience method to write XML comments between two comments line break. The XML comment block is not indented. * * @param writer not null - * @param comment + * @param comment the comment * @see #DEFAULT_INDENTATION_SIZE * @see #writeCommentText(XMLWriter, String, int, int) */ @@ -280,7 +280,7 @@ public static void writeCommentText( XMLWriter writer, String comment ) * by indent using 2 as indentation size. * * @param writer not null - * @param comment + * @param comment the comment * @param indent positive number * @see #DEFAULT_INDENTATION_SIZE * @see #writeCommentText(XMLWriter, String, int, int) @@ -295,7 +295,7 @@ public static void writeCommentText( XMLWriter writer, String comment, int inden * indent using indentSize. * * @param writer not null - * @param comment + * @param comment the comment * @param indent positive number * @param indentSize positive number * @see #DEFAULT_COLUMN_LINE @@ -311,7 +311,7 @@ public static void writeCommentText( XMLWriter writer, String comment, int inden * by indent using indentSize. The column size could be also be specified. * * @param writer not null - * @param comment + * @param comment comment * @param indent positive number * @param indentSize positive number * @param columnSize positive number diff --git a/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java b/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java index 1660f9a7..db628e41 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java +++ b/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java @@ -30,7 +30,7 @@ import java.util.Map; /** - * @version $Id$ NOTE: remove all the util code in here when separated, this class should be pure data. + * NOTE: remove all the util code in here when separated, this class should be pure data. */ public class Xpp3Dom implements Serializable @@ -88,11 +88,13 @@ public class Xpp3Dom public Xpp3Dom( String name ) { this.name = name; - childList = new ArrayList(); + childList = new ArrayList<>(); } /** * @since 3.2.0 + * @param inputLocation The input location. + * @param name The name of the Dom. */ public Xpp3Dom( String name, Object inputLocation ) { @@ -102,6 +104,7 @@ public Xpp3Dom( String name, Object inputLocation ) /** * Copy constructor. + * @param src The source Dom. */ public Xpp3Dom( Xpp3Dom src ) { @@ -110,6 +113,8 @@ public Xpp3Dom( Xpp3Dom src ) /** * Copy constructor with alternative name. + * @param src The source Dom. + * @param name The name of the Dom. */ public Xpp3Dom( Xpp3Dom src, String name ) { @@ -329,6 +334,7 @@ public void setParent( Xpp3Dom parent ) /** * @since 3.2.0 + * @return input location */ public Object getInputLocation() { @@ -337,6 +343,7 @@ public Object getInputLocation() /** * @since 3.2.0 + * @param inputLocation input location to set */ public void setInputLocation( Object inputLocation ) { @@ -524,6 +531,7 @@ else if ( it.hasNext() ) * @param recessive The recessive DOM, which will be merged into the dominant DOM * @param childMergeOverride Overrides attribute flags to force merging or appending of child elements into the * dominant DOM + * @return merged DOM */ public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boolean childMergeOverride ) { @@ -543,6 +551,7 @@ public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boolean * @see #SELF_COMBINATION_MODE_ATTRIBUTE * @param dominant The dominant DOM into which the recessive value/attributes/children will be merged * @param recessive The recessive DOM, which will be merged into the dominant DOM + * @return merged DOM */ public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive ) { diff --git a/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java b/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java index ffe108d5..6749dd25 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java +++ b/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java @@ -28,7 +28,7 @@ import java.util.List; /** - * @version $Id$ + * */ public class Xpp3DomBuilder { @@ -41,7 +41,12 @@ public static Xpp3Dom build( Reader reader ) } /** + * @param reader the reader + * @param locationBuilder the builder * @since 3.2.0 + * @return DOM + * @throws XmlPullParserException xml exception + * @throws IOException io */ public static Xpp3Dom build( Reader reader, InputLocationBuilder locationBuilder ) throws XmlPullParserException, IOException @@ -82,7 +87,13 @@ public static Xpp3Dom build( Reader reader, boolean trim ) } /** + * @param reader the reader + * @param trim to trim + * @param locationBuilder the builder * @since 3.2.0 + * @return DOM + * @throws XmlPullParserException xml exception + * @throws IOException io */ public static Xpp3Dom build( Reader reader, boolean trim, InputLocationBuilder locationBuilder ) throws XmlPullParserException, IOException @@ -118,13 +129,19 @@ public static Xpp3Dom build( XmlPullParser parser, boolean trim ) /** * @since 3.2.0 + * @param locationBuilder builder + * @param parser the parser + * @param trim do trim + * @return DOM + * @throws XmlPullParserException xml exception + * @throws IOException io */ public static Xpp3Dom build( XmlPullParser parser, boolean trim, InputLocationBuilder locationBuilder ) throws XmlPullParserException, IOException { - List elements = new ArrayList(); + List elements = new ArrayList<>(); - List values = new ArrayList(); + List values = new ArrayList<>(); int eventType = parser.getEventType(); diff --git a/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomUtils.java b/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomUtils.java index 90213329..b94cfe84 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomUtils.java +++ b/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomUtils.java @@ -55,7 +55,7 @@ public class Xpp3DomUtils * In case of complex XML structures, combining can be done based on keys. * This is a comma separated list of attribute names. * - * @Since 3.4.0 + * @since 3.4.0 */ public static final String KEYS_COMBINATION_MODE_ATTRIBUTE = "combine.keys"; @@ -194,7 +194,7 @@ private static void mergeIntoXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boole else if ( isNotEmpty( keysValue ) ) { String[] keys = keysValue.split( "," ); - Map recessiveKeyValues = new HashMap( keys.length ); + Map recessiveKeyValues = new HashMap<>( keys.length ); for ( String key : keys ) { recessiveKeyValues.put( key, recessiveChild.getAttribute( key ) ); @@ -202,7 +202,7 @@ else if ( isNotEmpty( keysValue ) ) for ( Xpp3Dom dominantChild : dominant.getChildren() ) { - Map dominantKeyValues = new HashMap( keys.length ); + Map dominantKeyValues = new HashMap<>( keys.length ); for ( String key : keys ) { dominantKeyValues.put( key, dominantChild.getAttribute( key ) ); @@ -243,6 +243,7 @@ else if ( isNotEmpty( keysValue ) ) * @param recessive The recessive DOM, which will be merged into the dominant DOM * @param childMergeOverride Overrides attribute flags to force merging or appending of child elements into the * dominant DOM + * @return merged DOM */ public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boolean childMergeOverride ) { @@ -262,6 +263,7 @@ public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boolean * @see #SELF_COMBINATION_MODE_ATTRIBUTE * @param dominant The dominant DOM into which the recessive value/attributes/children will be merged * @param recessive The recessive DOM, which will be merged into the dominant DOM + * @return merged DOM */ public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive ) { diff --git a/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java b/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java index c257a22f..91770cab 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java +++ b/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java @@ -20,7 +20,7 @@ import java.io.Writer; /** - * @version $Id$ + * */ public class Xpp3DomWriter { diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java b/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java index 475fe7a4..6874eefa 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java @@ -220,9 +220,7 @@ protected void ensureElementsCapacity() // protected int attributeValueStart[]; // protected int attributeValueEnd[]; - /** - * Make sure that in attributes temporary array is enough space. - */ + // Make sure that in attributes temporary array is enough space. protected void ensureAttributesCapacity( int size ) { final int attrPosSize = attributeName != null ? attributeName.length : 0; @@ -312,10 +310,10 @@ protected void ensureNamespacesCapacity( int size ) } } - /** - * simplistic implementation of hash function that has constant time to compute - so it also means - * diminishing hash quality for long strings but for XML parsing it should be good enough ... - */ + + // simplistic implementation of hash function that has constant time to compute - so it also means + // diminishing hash quality for long strings but for XML parsing it should be good enough ... + protected static final int fastHash( char ch[], int off, int len ) { if ( len == 0 ) @@ -536,7 +534,7 @@ public void setupFromTemplate() * * @param name a String * @param state a boolean - * @throws XmlPullParserException + * @throws XmlPullParserException issue */ @Override public void setFeature( String name, boolean state ) @@ -1252,8 +1250,10 @@ && getNamespace() != null && !namespace.equals( getNamespace() ) ? " and" : "" ) } /** - * Skip sub tree that is currently parser positioned on.
+ *

Skip sub tree that is currently parser positioned on.

* NOTE: parser must be on START_TAG and when function returns parser will be positioned on corresponding END_TAG + * @throws XmlPullParserException issue + * @throws IOException io */ public void skipSubTree() throws XmlPullParserException, IOException @@ -4100,12 +4100,7 @@ private static boolean isSupplementaryCodePoint( int codePoint ) return ( MIN_SUPPLEMENTARY_CODE_POINT <= codePoint && MAX_CODE_POINT >= codePoint ); } - /** - * TODO add javadoc - * - * @param codePoint - * @return - */ + // TODO add javadoc public static char[] toChars( int codePoint ) { if ( !isValidCodePoint( codePoint ) ) diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java b/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java index 6724be84..cd1edc59 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java @@ -1342,7 +1342,7 @@ else if ( ch < 32 ) } } - /** simple utility method -- good for debugging */ + // simple utility method -- good for debugging protected static final String printable( String s ) { if ( s == null ) diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java index 7c2e139f..a5f06c14 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java @@ -343,7 +343,8 @@ public interface XmlPullParser * Example: call setFeature(FEATURE_PROCESS_NAMESPACES, true) in order to switch on namespace processing. The * initial settings correspond to the properties requested from the XML Pull Parser factory. If none were requested, * all features are deactivated by default. - * + * @param name feature name + * @param state feature state * @exception XmlPullParserException If the feature is not supported or can not be set * @exception IllegalArgumentException If string with the feature name is null */ @@ -359,14 +360,15 @@ void setFeature( String name, boolean state ) * @return The value of the feature. * @exception IllegalArgumentException if string the feature name is null */ - boolean getFeature( String name ); /** * Set the value of a property. The property name is any fully-qualified URI. - * + * @param name property name + * @param value property value * @exception XmlPullParserException If the property is not supported or can not be set * @exception IllegalArgumentException If string with the property name is null + * @throws XmlPullParserException parsing issue */ void setProperty( String name, Object value ) throws XmlPullParserException; @@ -385,6 +387,8 @@ void setProperty( String name, Object value ) * Set the input source for parser to the given reader and resets the parser. The event type is set to the initial * value START_DOCUMENT. Setting the reader to null will just stop parsing and reset parser state, allowing the * parser to free internal resources such as parsing buffers. + * @param in the Reader + * @throws XmlPullParserException parsing issue */ void setInput( Reader in ) throws XmlPullParserException; @@ -401,12 +405,13 @@ void setInput( Reader in ) * * @param inputStream contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null). * @param inputEncoding if not null it MUST be used as encoding for inputStream + * @throws XmlPullParserException parsing issue */ void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException; /** - * Returns the input encoding if known, null otherwise. If setInput(InputStream, inputEncoding) was called with an + * @return the input encoding if known, null otherwise. If setInput(InputStream, inputEncoding) was called with an * inputEncoding value other than null, this value must be returned from this method. Otherwise, if inputEncoding is * null and the parser supports the encoding detection feature * (http://xmlpull.org/v1/doc/features.html#detect-encoding), it must return the detected encoding. If @@ -436,16 +441,18 @@ void setInput( InputStream inputStream, String inputEncoding ) * Note: The list of pre-defined entity names will always contain standard XML entities such as amp * (&amp;), lt (&lt;), gt (&gt;), quot (&quot;), and apos (&apos;). Those cannot be redefined by * this method! - * + * @param entityName entity name + * @param replacementText remplacement * @see #setInput * @see #FEATURE_PROCESS_DOCDECL * @see #FEATURE_VALIDATION + * @throws XmlPullParserException parsing issue */ void defineEntityReplacementText( String entityName, String replacementText ) throws XmlPullParserException; /** - * Returns the numbers of elements in the namespace stack for the given depth. If namespaces are not enabled, 0 is + * @return the numbers of elements in the namespace stack for the given depth. If namespaces are not enabled, 0 is * returned. *

* NOTE: when parser is on END_TAG then it is allowed to call this function with getDepth()+1 argument to @@ -468,32 +475,39 @@ void defineEntityReplacementText( String entityName, String replacementText ) * @see #getNamespaceUri * @see #getNamespace() * @see #getNamespace(String) + * @param depth depth + * @throws XmlPullParserException parsing issue */ int getNamespaceCount( int depth ) throws XmlPullParserException; /** - * Returns the namespace prefix for the given position in the namespace stack. Default namespace declaration + * @return Returns the namespace prefix for the given position in the namespace stack. Default namespace declaration * (xmlns='...') will have null as prefix. If the given index is out of range, an exception is thrown. - *

+ * * Please note: when the parser is on an END_TAG, namespace prefixes that were declared in the corresponding * START_TAG are still accessible although they are no longer in scope. + * namespace prefix + * @param pos namespace stack position + * @throws XmlPullParserException parsing issue */ String getNamespacePrefix( int pos ) throws XmlPullParserException; /** - * Returns the namespace URI for the given position in the namespace stack If the position is out of range, an + * @return Returns the namespace URI for the given position in the namespace stack If the position is out of range, an * exception is thrown. - *

+ * * NOTE: when parser is on END_TAG then namespace prefixes that were declared in corresponding START_TAG are * still accessible even though they are not in scope + * @throws XmlPullParserException parsing issue + * @param pos namespace stack position */ String getNamespaceUri( int pos ) throws XmlPullParserException; /** - * Returns the URI corresponding to the given prefix, depending on current state of the parser. + * @return the URI corresponding to the given prefix, depending on current state of the parser. *

* If the prefix was not declared in the current scope, null is returned. The default namespace is included in the * namespace table and is available via getNamespace (null). @@ -515,7 +529,7 @@ String getNamespaceUri( int pos ) * The 'xml' prefix is bound to "http://www.w3.org/XML/1998/namespace", as defined in the * Namespaces in XML specification. Analogous, the * 'xmlns' prefix is resolved to http://www.w3.org/2000/xmlns/ - * + * @param prefix given prefix * @see #getNamespaceCount * @see #getNamespacePrefix * @see #getNamespaceUri @@ -526,7 +540,7 @@ String getNamespaceUri( int pos ) // miscellaneous reporting methods /** - * Returns the current depth of the element. Outside the root element, the depth is 0. The depth is incremented by 1 + * @return the current depth of the element. Outside the root element, the depth is 0. The depth is incremented by 1 * when a start tag is reached. The depth is decremented AFTER the end tag event was observed. * *

@@ -542,7 +556,7 @@ String getNamespaceUri( int pos )
     int getDepth();
 
     /**
-     * Returns a short text describing the current parser state, including the position, a description of the current
+     * @return a short text describing the current parser state, including the position, a description of the current
      * event and the data source if known. This method is especially useful to provide meaningful error messages and for
      * debugging purposes.
      */
@@ -568,19 +582,20 @@ String getNamespaceUri( int pos )
     // TEXT related methods
 
     /**
-     * Checks whether the current TEXT event contains only whitespace characters. For IGNORABLE_WHITESPACE, this is
+     * @return Checks whether the current TEXT event contains only whitespace characters. For IGNORABLE_WHITESPACE, this is
      * always true. For TEXT and CDSECT, false is returned when the current event text contains at least one non-white
      * space character. For any other event type an exception is thrown.
      * 

* Please note: non-validating parsers are not able to distinguish whitespace and ignorable whitespace, * except from whitespace outside the root element. Ignorable whitespace is reported as separate event, which is * exposed via nextToken only. + * @throws XmlPullParserException parsing issue */ boolean isWhitespace() throws XmlPullParserException; /** - * Returns the text content of the current event as String. The value returned depends on current event type, for + * @return the text content of the current event as String. The value returned depends on current event type, for * example for TEXT event it is element content (this is typical case when next() is used). See description of * nextToken() for detailed description of possible returned values for different types of events. *

@@ -617,14 +632,14 @@ boolean isWhitespace() // START_TAG / END_TAG shared methods /** - * Returns the namespace URI of the current element. The default namespace is represented as empty string. If + * @return the namespace URI of the current element. The default namespace is represented as empty string. If * namespaces are not enabled, an empty String ("") is always returned. The current event must be START_TAG or * END_TAG; otherwise, null is returned. */ String getNamespace(); /** - * For START_TAG or END_TAG events, the (local) name of the current element is returned when namespaces are enabled. + * @return For START_TAG or END_TAG events, the (local) name of the current element is returned when namespaces are enabled. * When namespace processing is disabled, the raw name is returned. For ENTITY_REF events, the entity name is * returned. If the current event is not START_TAG, END_TAG, or ENTITY_REF, null is returned. *

@@ -634,15 +649,16 @@ boolean isWhitespace() String getName(); /** - * Returns the prefix of the current element. If the element is in the default namespace (has no prefix), null is + * @return the prefix of the current element. If the element is in the default namespace (has no prefix), null is * returned. If namespaces are not enabled, or the current event is not START_TAG or END_TAG, null is returned. */ String getPrefix(); /** - * Returns true if the current event is START_TAG and the tag is degenerated (e.g. <foobar/>). + * @return true if the current event is START_TAG and the tag is degenerated (e.g. <foobar/>). *

* NOTE: if the parser is not on START_TAG, an exception will be thrown. + * @throws XmlPullParserException parsing issue */ boolean isEmptyElementTag() throws XmlPullParserException; @@ -651,7 +667,7 @@ boolean isEmptyElementTag() // START_TAG Attributes retrieval methods /** - * Returns the number of attributes of the current start tag, or -1 if the current event type is not START_TAG + * @return the number of attributes of the current start tag, or -1 if the current event type is not START_TAG * * @see #getAttributeNamespace * @see #getAttributeName @@ -749,16 +765,17 @@ boolean isEmptyElementTag() // actual parsing methods /** - * Returns the type of the current event (START_TAG, END_TAG, TEXT, etc.) + * @return the type of the current event (START_TAG, END_TAG, TEXT, etc.) * * @see #next() * @see #nextToken() + * @throws XmlPullParserException parsing issue */ int getEventType() throws XmlPullParserException; /** - * Get next parsing event - element content wil be coalesced and only one TEXT event must be returned for whole + * @return Get next parsing event - element content wil be coalesced and only one TEXT event must be returned for whole * element content (comments and processing instructions will be ignored and entity references must be expanded or * exception mus be thrown if entity reference can not be expanded). If element content is empty (content is "") * then no TEXT event will be reported. @@ -771,8 +788,9 @@ int getEventType() * @see #TEXT * @see #END_TAG * @see #END_DOCUMENT + * @throws XmlPullParserException parsing issue + * @throws IOException io issue */ - int next() throws XmlPullParserException, IOException; @@ -788,7 +806,7 @@ int next() * is enabled exact content of START_TAG, END_TAG, DOCDECL and PROCESSING_INSTRUCTION is available. *

* Here is the list of tokens that can be returned from nextToken() and what getText() and getTextCharacters() - * returns: + * @return *

*
START_DOCUMENT *
null @@ -854,7 +872,8 @@ int next() *

* NOTE: XMLDecl (<?xml ...?>) is not reported but its content is available through optional * properties (see class description above). - * + * @throws XmlPullParserException parsing issue + * @throws IOException io issue * @see #next * @see #START_TAG * @see #TEXT @@ -884,6 +903,11 @@ int nextToken() * || ( name != null && !name.equals( getName() ) ) ) * throw new XmlPullParserException( "expected " + TYPES[type] + getPositionDescription() ); *

+ * @param type type + * @param name name + * @param namespace namespace + * @throws XmlPullParserException parsing issue + * @throws IOException io issue */ void require( int type, String namespace, String name ) throws XmlPullParserException, IOException; @@ -935,6 +959,9 @@ void require( int type, String namespace, String name ) * throw new XmlPullParserException( "parser must be on START_TAG or TEXT to read text", this, null ); * } * + * @return see description + * @throws XmlPullParserException parsing issue + * @throws IOException io issue */ String nextText() throws XmlPullParserException, IOException; @@ -957,6 +984,10 @@ String nextText() * } * return eventType; * + * @return see description + * @throws XmlPullParserException parsing issue + * @throws + * IOException io issue */ int nextTag() throws XmlPullParserException, IOException; diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java index 61cf66c3..ff23754f 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java @@ -51,7 +51,7 @@ public XmlPullParserException( String msg, XmlPullParser parser, Throwable chain /** * @deprecated Use the generic getCause() method - * @return + * @return the cause */ @Deprecated public Throwable getDetail() diff --git a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java index d7668d74..46ef492f 100644 --- a/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java +++ b/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java @@ -37,7 +37,8 @@ public interface XmlSerializer * defined in * http://www.xmlpull.org/v1/doc/features.html. If feature is not recognized or can not be set then * IllegalStateException MUST be thrown. - * + * @param name feature name + * @param state feature state * @exception IllegalStateException If the feature is not supported or can not be set */ void setFeature( String name, boolean state ) @@ -59,7 +60,8 @@ void setFeature( String name, boolean state ) * optional properties are defined in * http://www.xmlpull.org/v1/doc/properties.html. If property is not recognized or can not be set then * IllegalStateException MUST be thrown. - * + * @param name property name + * @param value property value * @exception IllegalStateException if the property is not supported or can not be set */ void setProperty( String name, Object value ) @@ -77,14 +79,22 @@ void setProperty( String name, Object value ) /** * Set to use binary output stream with given encoding. + * @param os out + * @param encoding encoding + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ void setOutput( OutputStream os, String encoding ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Set the output to the given writer. + * @param writer Set the output to the given writer. *

* WARNING no information about encoding is available! + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ void setOutput( Writer writer ) throws IOException, IllegalArgumentException, IllegalStateException; @@ -92,6 +102,11 @@ void setOutput( Writer writer ) /** * Write <?xml declaration with encoding (if encoding not null) and standalone flag (if standalone not null) * This method can only be called just after setOutput. + * @param encoding document encoding + * @param standalone standalone flag value + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ void startDocument( String encoding, Boolean standalone ) throws IOException, IllegalArgumentException, IllegalStateException; @@ -99,6 +114,9 @@ void startDocument( String encoding, Boolean standalone ) /** * Finish writing. All unclosed start tags will be closed and output will be flushed. After calling this method no * more output can be serialized until next call to setOutput() + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ void endDocument() throws IOException, IllegalArgumentException, IllegalStateException; @@ -119,12 +137,15 @@ void endDocument() * * @param prefix must be not null (or IllegalArgumentException is thrown) * @param namespace must be not null + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ void setPrefix( String prefix, String namespace ) throws IOException, IllegalArgumentException, IllegalStateException; /** - * Return namespace that corresponds to given prefix If there is no prefix bound to this namespace return null but + * @return namespace that corresponds to given prefix If there is no prefix bound to this namespace return null but * if generatePrefix is false then return generated prefix. *

* NOTE: if the prefix is empty string "" and default namespace is bound to this prefix then empty string @@ -132,12 +153,15 @@ void setPrefix( String prefix, String namespace ) *

* NOTE: prefixes "xml" and "xmlns" are already bound will have values as defined * Namespaces in XML specification + * @param namespace the namespace + * @param generatePrefix to generate the missing prefix + * @throws IllegalArgumentException if null */ String getPrefix( String namespace, boolean generatePrefix ) throws IllegalArgumentException; /** - * Returns the current depth of the element. Outside the root element, the depth is 0. The depth is incremented by 1 + * @return the current depth of the element. Outside the root element, the depth is 0. The depth is incremented by 1 * when startTag() is called. The depth is decremented after the call to endTag() event was observed. * *

@@ -179,6 +203,12 @@ String getPrefix( String namespace, boolean generatePrefix )
      * setPrefix() immediately before this method. If namespace is null no namespace prefix is printed but just name. If
      * namespace is empty string then serializer will make sure that default empty namespace is declared (in XML 1.0
      * xmlns='') or throw IllegalStateException if default namespace is already bound to non-empty string.
+     * @param namespace ns
+     * @param name tag name
+     * @return XmlSerializer
+     * @throws IOException io
+     * @throws IllegalArgumentException if null
+     * @throws IllegalStateException illegal use
      */
     XmlSerializer startTag( String namespace, String name )
         throws IOException, IllegalArgumentException, IllegalStateException;
@@ -187,16 +217,28 @@ XmlSerializer startTag( String namespace, String name )
      * Write an attribute. Calls to attribute() MUST follow a call to startTag() immediately. If there is no prefix
      * defined for the given namespace, a prefix will be defined automatically. If namespace is null or empty string no
      * namespace prefix is printed but just name.
+     * @param name attribute name
+     * @param value attribute value
+     * @param namespace namespace to use
+     * @return XmlSerializer
+     * @throws IOException io
+     * @throws IllegalArgumentException if null
+     * @throws IllegalStateException illegal use
      */
     XmlSerializer attribute( String namespace, String name, String value )
         throws IOException, IllegalArgumentException, IllegalStateException;
 
     /**
      * Write end tag. Repetition of namespace and name is just for avoiding errors.
-     * 

* Background: in kXML endTag had no arguments, and non matching tags were very difficult to find... If * namespace is null no namespace prefix is printed but just name. If namespace is empty string then serializer will * make sure that default empty namespace is declared (in XML 1.0 xmlns=''). + * @param namespace ns + * @param name tag name + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ XmlSerializer endTag( String namespace, String name ) throws IOException, IllegalArgumentException, IllegalStateException; @@ -255,13 +297,24 @@ XmlSerializer endTag( String namespace, String name ) // throws IOException, IllegalArgumentException, IllegalStateException; /** - * Writes text, where special XML chars are escaped automatically + * @param text Writes text, where special XML chars are escaped automatically + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ XmlSerializer text( String text ) throws IOException, IllegalArgumentException, IllegalStateException; /** * Writes text, where special XML chars are escaped automatically + * @param buf characters + * @param len lenght + * @param start start + * @return XmlSerializer + * @throws IOException io + * @throws IllegalArgumentException if null + * @throws IllegalStateException illegal use */ XmlSerializer text( char[] buf, int start, int len ) throws IOException, IllegalArgumentException, IllegalStateException; @@ -290,6 +343,7 @@ void ignorableWhitespace( String text ) *

* NOTE: if there is need to close start tag (so no more attribute() calls are allowed) but without flushing * output call method text() with empty string (text("")). + * @throws IOException io */ void flush() throws IOException; diff --git a/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java b/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java index 8d556e5e..45c7329d 100644 --- a/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java +++ b/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java @@ -24,7 +24,7 @@ *

* * @author Bert van Brakel - * @version $Revision$ + * */ public abstract class AbstractTestThread implements Runnable diff --git a/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java b/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java index f29dd418..6a326c4b 100644 --- a/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java @@ -46,7 +46,7 @@ * * @author Peter Donald * @author Matthew Hawthorne - * @version $Id$ + * * @see FileUtils */ public final class FileUtilsTest diff --git a/src/test/java/org/codehaus/plexus/util/PathToolTest.java b/src/test/java/org/codehaus/plexus/util/PathToolTest.java index e7f01ba8..4b9985a9 100644 --- a/src/test/java/org/codehaus/plexus/util/PathToolTest.java +++ b/src/test/java/org/codehaus/plexus/util/PathToolTest.java @@ -22,7 +22,7 @@ /** * @author Vincent Siveton - * @version $Id$ + * */ public class PathToolTest { diff --git a/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java b/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java index 5d07271b..cc76544a 100644 --- a/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java +++ b/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java @@ -20,7 +20,7 @@ /** * @author Ben Walding - * @version $Id$ + * */ public class StringInputStreamTest extends TestCase diff --git a/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java b/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java index 42f1a75b..56df66a7 100644 --- a/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java +++ b/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java @@ -29,7 +29,7 @@ * Test string utils. * * @author Brett Porter - * @version $Id$ + * */ public class StringUtilsTest { diff --git a/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java b/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java index 9dd1a41f..c080d7d0 100644 --- a/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java +++ b/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java @@ -33,7 +33,7 @@ * Created on 21/06/2003 * * @author Bert van Brakel - * @version $Revision$ + * */ public class SweeperPoolTest { diff --git a/src/test/java/org/codehaus/plexus/util/TestThreadManager.java b/src/test/java/org/codehaus/plexus/util/TestThreadManager.java index bfc79229..7c954296 100644 --- a/src/test/java/org/codehaus/plexus/util/TestThreadManager.java +++ b/src/test/java/org/codehaus/plexus/util/TestThreadManager.java @@ -29,7 +29,7 @@ *

* * @author Bert van Brakel - * @version $Revision$ + * */ public class TestThreadManager { diff --git a/src/test/java/org/codehaus/plexus/util/Tracer.java b/src/test/java/org/codehaus/plexus/util/Tracer.java index df6fd63a..334f85ff 100644 --- a/src/test/java/org/codehaus/plexus/util/Tracer.java +++ b/src/test/java/org/codehaus/plexus/util/Tracer.java @@ -26,7 +26,7 @@ *

* * @author Bert van Brakel - * @version $Revision$ + * */ public class Tracer { diff --git a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java index 4d0c9ad9..8fd33944 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java @@ -25,7 +25,7 @@ /** * @author Jason van Zyl - * @version $Id$ + * */ public class CycleDetectedExceptionTest { diff --git a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java index df52fe0e..45db6bed 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java @@ -28,7 +28,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class CycleDetectorTest { diff --git a/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java b/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java index 0ff1269c..a4210045 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java @@ -28,7 +28,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class DAGTest { diff --git a/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java b/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java index 67afbbeb..36bdf1f9 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java @@ -25,7 +25,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class TopologicalSorterTest { diff --git a/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java b/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java index 0044795b..d5ab0cd1 100644 --- a/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java +++ b/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java @@ -22,7 +22,7 @@ /** * @author Michal Maczka - * @version $Id$ + * */ public class VertexTest { diff --git a/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java b/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java index 39b3f9fa..0eb34b6c 100644 --- a/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java +++ b/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java @@ -33,7 +33,7 @@ /** * @author Jason van Zyl - * @version $Id$ + * */ public class ReflectionValueExtractorTest { @@ -552,4 +552,4 @@ public void testRootPropertyRegression() Object evalued = ReflectionValueExtractor.evaluate( "description", project ); assertNotNull( evalued ); } -} \ No newline at end of file +} diff --git a/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java b/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java index c8f1c4aa..ed75fd58 100644 --- a/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java +++ b/src/test/java/org/codehaus/plexus/util/reflection/ReflectorTest.java @@ -23,7 +23,7 @@ /** * @author Jörg Schaible - * @version $Id$ + * */ public class ReflectorTest { diff --git a/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java b/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java index 128d004f..1d5b046e 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriterTest.java @@ -39,7 +39,7 @@ * * @author Vincent Siveton * @author Gabriel Belingueres - * @version $Id$ + * */ public class PrettyPrintXMLWriterTest { diff --git a/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java b/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java index 25ee91ae..91b6a7f7 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/XmlUtilTest.java @@ -39,7 +39,7 @@ * Test the {@link XmlUtil} class. * * @author Vincent Siveton - * @version $Id$ + * */ public class XmlUtilTest { diff --git a/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java b/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java index 6c4fe638..34d99297 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/XmlWriterUtilTest.java @@ -31,7 +31,7 @@ /** * @author Vincent Siveton - * @version $Id$ + * */ public class XmlWriterUtilTest { diff --git a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java index 0c8e5a17..f8ac0489 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java @@ -33,7 +33,7 @@ * Test the Xpp3DomBuilder. * * @author Brett Porter - * @version $Id$ + * */ public class Xpp3DomBuilderTest { diff --git a/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java b/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java index c0754126..5b685e8e 100644 --- a/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java +++ b/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java @@ -28,7 +28,7 @@ /** * @author Trygve Laugstøl - * @version $Id$ + * */ public class MXParserTest {