Author: hboutemy
Date: Sat Sep 27 07:01:33 2014
New Revision: 1627926

URL: http://svn.apache.org/r1627926
Log:
fixed errors reported by Checkstyle

Modified:
    maven/shared/trunk/maven-shared-utils/pom.xml
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PathTool.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/StringUtils.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/WriterFactory.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/StreamConsumer.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/IOUtil.java
    
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
    
maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java

Modified: maven/shared/trunk/maven-shared-utils/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/pom.xml?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/pom.xml (original)
+++ maven/shared/trunk/maven-shared-utils/pom.xml Sat Sep 27 07:01:33 2014
@@ -156,4 +156,19 @@
       </plugin>
     </plugins>
   </build>
+
+  <profiles>
+    <profile>
+      <id>reporting</id>
+      <reporting>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-checkstyle-plugin</artifactId>
+            <version>2.13</version>
+          </plugin>
+        </plugins>
+      </reporting>
+    </profile>
+  </profiles>
 </project>

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PathTool.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PathTool.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PathTool.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PathTool.java
 Sat Sep 27 07:01:33 2014
@@ -194,7 +194,7 @@ public class PathTool
      *         terminated with a forward slash.  A zero-length string is
      *         returned if: the filename is zero-length.
      */
-    private @Nonnull static String determineRelativePath( @Nonnull String 
filename, @Nonnull String separator )
+    @Nonnull private static String determineRelativePath( @Nonnull String 
filename, @Nonnull String separator )
     {
         if ( filename.length() == 0 )
         {
@@ -267,7 +267,8 @@ public class PathTool
         return path;
     }
 
-    private @Nonnull static String buildRelativePath( @Nonnull String toPath, 
@Nonnull String fromPath, final char separatorChar )
+    @Nonnull private static String buildRelativePath( @Nonnull String toPath, 
@Nonnull String fromPath,
+                                                      final char separatorChar 
)
     {
         // use tokeniser to traverse paths and for lazy checking
         StringTokenizer toTokeniser = new StringTokenizer( toPath, 
String.valueOf( separatorChar ) );

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
 Sat Sep 27 07:01:33 2014
@@ -29,7 +29,6 @@ import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.UnsupportedEncodingException;
 import java.net.URL;
-import java.nio.charset.Charset;
 import org.apache.commons.io.input.XmlStreamReader;
 
 import javax.annotation.Nonnull;
@@ -40,9 +39,8 @@ import javax.annotation.Nonnull;
  * XML, or specified.
  *
  * @author <a href="mailto:hbout...@apache.org";>Hervé Boutemy</a>
- * @see Charset
+ * @see java.nio.charset.Charset
  * @see <a 
href="http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html";>Supported
 encodings</a>
- * 
  */
 public class ReaderFactory
 {
@@ -50,7 +48,7 @@ public class ReaderFactory
      * ISO Latin Alphabet #1, also known as ISO-LATIN-1.
      * Every implementation of the Java platform is required to support this 
character encoding.
      *
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String ISO_8859_1 = "ISO-8859-1";
 
@@ -58,7 +56,7 @@ public class ReaderFactory
      * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin 
block of the Unicode character set.
      * Every implementation of the Java platform is required to support this 
character encoding.
      *
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String US_ASCII = "US-ASCII";
 
@@ -67,7 +65,7 @@ public class ReaderFactory
      * order accepted on input, big-endian used on output).
      * Every implementation of the Java platform is required to support this 
character encoding.
      *
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_16 = "UTF-16";
 
@@ -75,7 +73,7 @@ public class ReaderFactory
      * Sixteen-bit Unicode Transformation Format, big-endian byte order.
      * Every implementation of the Java platform is required to support this 
character encoding.
      *
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_16BE = "UTF-16BE";
 
@@ -83,7 +81,7 @@ public class ReaderFactory
      * Sixteen-bit Unicode Transformation Format, little-endian byte order.
      * Every implementation of the Java platform is required to support this 
character encoding.
      *
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_16LE = "UTF-16LE";
 
@@ -91,7 +89,7 @@ public class ReaderFactory
      * Eight-bit Unicode Transformation Format.
      * Every implementation of the Java platform is required to support this 
character encoding.
      *
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_8 = "UTF-8";
 
@@ -148,7 +146,7 @@ public class ReaderFactory
      * @param file not null file.
      * @return a reader instance for the input file using the default platform 
charset.
      * @throws FileNotFoundException if any.
-     * @see Charset#defaultCharset()
+     * @see java.nio.charset.Charset#defaultCharset()
      */
     public static Reader newPlatformReader( @Nonnull File file )
         throws FileNotFoundException

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/StringUtils.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/StringUtils.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/StringUtils.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/StringUtils.java
 Sat Sep 27 07:01:33 2014
@@ -79,7 +79,7 @@ public class StringUtils
      * @return the trimmed text (never <code>null</code>)
      * @see java.lang.String#trim()
      */
-    public @Nonnull static String clean( String str )
+    @Nonnull public static String clean( String str )
     {
         return ( str == null ? "" : str.trim() );
     }
@@ -108,7 +108,7 @@ public class StringUtils
      * @return the String without whitespaces
      * @throws NullPointerException
      */
-    public @Nonnull static String deleteWhitespace( @Nonnull String str )
+    @Nonnull public static String deleteWhitespace( @Nonnull String str )
     {
         StringBuilder buffer = new StringBuilder();
         int sz = str.length();
@@ -510,7 +510,7 @@ public class StringUtils
      * @param str the String to parse
      * @return an array of parsed Strings
      */
-    public @Nonnull static String[] split( @Nonnull String str )
+    @Nonnull public static String[] split( @Nonnull String str )
     {
         return split( str, null, -1 );
     }
@@ -518,7 +518,7 @@ public class StringUtils
     /**
      * @see #split(String, String, int)
      */
-    public @Nonnull static String[] split( @Nonnull String text, String 
separator )
+    @Nonnull public static String[] split( @Nonnull String text, String 
separator )
     {
         return split( text, separator, -1 );
     }
@@ -541,7 +541,7 @@ public class StringUtils
      *                  array.  A zero or negative value implies no limit.
      * @return an array of parsed Strings
      */
-    public @Nonnull static String[] split( @Nonnull String str, String 
separator, int max )
+    @Nonnull public static String[] split( @Nonnull String str, String 
separator, int max )
     {
         StringTokenizer tok;
         if ( separator == null )
@@ -599,7 +599,7 @@ public class StringUtils
      * @param array the array of values to concatenate.
      * @return the concatenated string.
      */
-    public @Nonnull static String concatenate( @Nonnull Object... array )
+    @Nonnull public static String concatenate( @Nonnull Object... array )
     {
         return join( array, "" );
     }
@@ -615,7 +615,7 @@ public class StringUtils
      * @param separator the separator character to use
      * @return the joined String
      */
-    public @Nonnull static String join( @Nonnull Object[] array, String 
separator )
+    @Nonnull public static String join( @Nonnull Object[] array, String 
separator )
     {
         if ( separator == null )
         {
@@ -647,7 +647,7 @@ public class StringUtils
      * @param separator the separator character to use
      * @return the joined String
      */
-    public @Nonnull static String join( @Nonnull Iterator<?> iterator, String 
separator )
+    @Nonnull public static String join( @Nonnull Iterator<?> iterator, String 
separator )
     {
         if ( separator == null )
         {
@@ -780,7 +780,7 @@ public class StringUtils
                 break;
             }
         }
-        buf.append( text, start, text.length());
+        buf.append( text, start, text.length() );
         return buf.toString();
     }
 
@@ -795,7 +795,7 @@ public class StringUtils
      * @throws NullPointerException if text or overlay is <code>null</code>
      */
     @SuppressWarnings( "ConstantConditions" )
-    public @Nonnull static String overlayString( @Nonnull String text, 
@Nonnull String overlay, int start, int end )
+    @Nonnull public static String overlayString( @Nonnull String text, 
@Nonnull String overlay, int start, int end )
     {
         if ( overlay == null )
         {
@@ -822,7 +822,7 @@ public class StringUtils
      * @return String containing centered String
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String center( @Nonnull String str, int size )
+    @Nonnull public static String center( @Nonnull String str, int size )
     {
         return center( str, size, " " );
     }
@@ -839,7 +839,7 @@ public class StringUtils
      * @throws NullPointerException if str or delim is <code>null</code>
      * @throws ArithmeticException  if delim is the empty String
      */
-    public @Nonnull static String center( @Nonnull String str, int size, 
@Nonnull String delim )
+    @Nonnull public static String center( @Nonnull String str, int size, 
@Nonnull String delim )
     {
         int sz = str.length();
         int p = size - sz;
@@ -862,7 +862,7 @@ public class StringUtils
      * @return String without chomped newline
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String chomp( @Nonnull String str )
+    @Nonnull public static String chomp( @Nonnull String str )
     {
         return chomp( str, "\n" );
     }
@@ -876,7 +876,7 @@ public class StringUtils
      * @return String without chomped ending
      * @throws NullPointerException if str or sep is <code>null</code>
      */
-    public @Nonnull static String chomp( @Nonnull String str, @Nonnull String 
sep )
+    @Nonnull public static String chomp( @Nonnull String str, @Nonnull String 
sep )
     {
         int idx = str.lastIndexOf( sep );
         if ( idx != -1 )
@@ -897,7 +897,7 @@ public class StringUtils
      * @return String without chomped ending
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String chompLast( @Nonnull String str )
+    @Nonnull public static String chompLast( @Nonnull String str )
     {
         return chompLast( str, "\n" );
     }
@@ -910,7 +910,7 @@ public class StringUtils
      * @return String without chomped ending
      * @throws NullPointerException if str or sep is <code>null</code>
      */
-    public @Nonnull static String chompLast( @Nonnull String str, @Nonnull 
String sep )
+    @Nonnull public static String chompLast( @Nonnull String str, @Nonnull 
String sep )
     {
         if ( str.length() == 0 )
         {
@@ -936,7 +936,7 @@ public class StringUtils
      * @return String chomped
      * @throws NullPointerException if str or sep is <code>null</code>
      */
-    public @Nonnull static String getChomp( @Nonnull String str, @Nonnull 
String sep )
+    @Nonnull public static String getChomp( @Nonnull String str, @Nonnull 
String sep )
     {
         int idx = str.lastIndexOf( sep );
         if ( idx == str.length() - sep.length() )
@@ -962,7 +962,7 @@ public class StringUtils
      * @return String without chomped beginning
      * @throws NullPointerException if str or sep is <code>null</code>
      */
-    public @Nonnull static String prechomp( @Nonnull String str, @Nonnull 
String sep )
+    @Nonnull public static String prechomp( @Nonnull String str, @Nonnull 
String sep )
     {
         int idx = str.indexOf( sep );
         if ( idx != -1 )
@@ -984,7 +984,7 @@ public class StringUtils
      * @return String prechomped
      * @throws NullPointerException if str or sep is <code>null</code>
      */
-    public @Nonnull static String getPrechomp( @Nonnull String str, String sep 
)
+    @Nonnull public static String getPrechomp( @Nonnull String str, String sep 
)
     {
         int idx = str.indexOf( sep );
         if ( idx != -1 )
@@ -1010,7 +1010,7 @@ public class StringUtils
      * @return String without last character
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String chop( @Nonnull String str )
+    @Nonnull public static String chop( @Nonnull String str )
     {
         if ( "".equals( str ) )
         {
@@ -1041,7 +1041,7 @@ public class StringUtils
      * @return String without newline
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String chopNewline( @Nonnull String str )
+    @Nonnull public static String chopNewline( @Nonnull String str )
     {
         int lastIdx = str.length() - 1;
         char last = str.charAt( lastIdx );
@@ -1074,7 +1074,7 @@ public class StringUtils
      * @return String with escaped values
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String escape( @Nonnull String str )
+    @Nonnull public static String escape( @Nonnull String str )
     {
         // improved with code from  cyberti...@cyberiantiger.org
         // unicode from him, and defaul for < 32's.
@@ -1171,7 +1171,7 @@ public class StringUtils
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
      * @throws NullPointerException       if str is <code>null</code>
      */
-    public @Nonnull static String repeat( @Nonnull String str, int repeat )
+    @Nonnull public static String repeat( @Nonnull String str, int repeat )
     {
         StringBuilder buffer = new StringBuilder( repeat * str.length() );
         for ( int i = 0; i < repeat; i++ )
@@ -1191,7 +1191,7 @@ public class StringUtils
      * @return right padded String
      * @throws NullPointerException if str is <code>null</code>
      */
-    public @Nonnull static String rightPad( @Nonnull String str, int size )
+    @Nonnull public static String rightPad( @Nonnull String str, int size )
     {
         return rightPad( str, size, " " );
     }
@@ -1208,7 +1208,7 @@ public class StringUtils
      * @throws NullPointerException if str or delim is <code>null</code>
      * @throws ArithmeticException  if delim is the empty String
      */
-    public @Nonnull static String rightPad( @Nonnull String str, int size, 
@Nonnull String delim )
+    @Nonnull public static String rightPad( @Nonnull String str, int size, 
@Nonnull String delim )
     {
         size = ( size - str.length() ) / delim.length();
         if ( size > 0 )
@@ -1228,7 +1228,7 @@ public class StringUtils
      * @return left padded String
      * @throws NullPointerException if str or delim is <code>null</code>
      */
-    public @Nonnull static String leftPad( @Nonnull String str, int size )
+    @Nonnull public static String leftPad( @Nonnull String str, int size )
     {
         return leftPad( str, size, " " );
     }
@@ -1243,7 +1243,7 @@ public class StringUtils
      * @throws NullPointerException if str or delim is null
      * @throws ArithmeticException  if delim is the empty string
      */
-    public @Nonnull static String leftPad( @Nonnull String str, int size, 
@Nonnull String delim )
+    @Nonnull public static String leftPad( @Nonnull String str, int size, 
@Nonnull String delim )
     {
         size = ( size - str.length() ) / delim.length();
         if ( size > 0 )
@@ -1883,7 +1883,7 @@ public class StringUtils
      * @return the passed in Object's toString, or blank if it was
      *         <code>null</code>
      */
-    public @Nonnull static String defaultString( Object obj )
+    @Nonnull public static String defaultString( Object obj )
     {
         return defaultString( obj, "" );
     }
@@ -1899,7 +1899,7 @@ public class StringUtils
      * @return the passed in string, or the default if it was
      *         <code>null</code>
      */
-    public @Nonnull static String defaultString( Object obj, @Nonnull String 
defaultString )
+    @Nonnull public static String defaultString( Object obj, @Nonnull String 
defaultString )
     {
         return ( obj == null ) ? defaultString : obj.toString();
     }
@@ -1935,7 +1935,7 @@ public class StringUtils
      * @param delimiter the delimiter to use
      * @return the reversed String
      */
-    public @Nonnull static String reverseDelimitedString( @Nonnull String str, 
String delimiter )
+    @Nonnull public static String reverseDelimitedString( @Nonnull String str, 
String delimiter )
     {
         // could implement manually, but simple way is to reuse other,
         // probably slower, methods.
@@ -1982,7 +1982,7 @@ public class StringUtils
      *
      * @param maxWidth maximum length of result string
      */
-    public @Nonnull static String abbreviate( @Nonnull String s, int maxWidth )
+    @Nonnull public static String abbreviate( @Nonnull String s, int maxWidth )
     {
         return abbreviate( s, 0, maxWidth );
     }
@@ -1999,7 +1999,7 @@ public class StringUtils
      * @param offset   left edge of source string
      * @param maxWidth maximum length of result string
      */
-    public @Nonnull static String abbreviate( @Nonnull String s, int offset, 
int maxWidth )
+    @Nonnull public static String abbreviate( @Nonnull String s, int offset, 
int maxWidth )
     {
         if ( maxWidth < 4 )
         {
@@ -2126,7 +2126,7 @@ public class StringUtils
      * @param replaceThis
      * @return humped String
      */
-    public @Nonnull static String removeAndHump( @Nonnull String data, 
@Nonnull String replaceThis )
+    @Nonnull public static String removeAndHump( @Nonnull String data, 
@Nonnull String replaceThis )
     {
         String temp;
 
@@ -2159,7 +2159,7 @@ public class StringUtils
      * @return data string with the first character transformed to uppercase
      * @throws NullPointerException if data is <code>null</code>
      */
-    public @Nonnull static String capitalizeFirstLetter( @Nonnull String data )
+    @Nonnull public static String capitalizeFirstLetter( @Nonnull String data )
     {
         char firstChar = data.charAt( 0 );
         char titleCase = Character.toTitleCase( firstChar );
@@ -2186,7 +2186,7 @@ public class StringUtils
      * @return data string with the first character transformed to lowercase
      * @throws NullPointerException if data is <code>null</code>
      */
-    public @Nonnull static String lowercaseFirstLetter( @Nonnull String data )
+    @Nonnull public static String lowercaseFirstLetter( @Nonnull String data )
     {
         char firstLetter = Character.toLowerCase( data.substring( 0, 1 
).charAt( 0 ) );
 
@@ -2203,7 +2203,7 @@ public class StringUtils
      * @param view
      * @return deHumped String
      */
-    public @Nonnull static String addAndDeHump( @Nonnull String view )
+    @Nonnull public static String addAndDeHump( @Nonnull String view )
     {
         StringBuilder sb = new StringBuilder();
 
@@ -2372,7 +2372,7 @@ public class StringUtils
      * @return a string with unique whitespace.
      * 
      */
-    public @Nonnull static String removeDuplicateWhitespace( @Nonnull String s 
)
+    @Nonnull public static String removeDuplicateWhitespace( @Nonnull String s 
)
     {
         StringBuilder result = new StringBuilder();
         int length = s.length();

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/WriterFactory.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/WriterFactory.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/WriterFactory.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/WriterFactory.java
 Sat Sep 27 07:01:33 2014
@@ -28,7 +28,6 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
-import java.nio.charset.Charset;
 import org.apache.maven.shared.utils.xml.XmlStreamWriter;
 
 
@@ -39,7 +38,7 @@ import javax.annotation.Nonnull;
  * XML, or specified.
  *
  * @author Hervé Boutemy
- * @see Charset
+ * @see java.nio.charset.Charset
  * @see <a 
href="http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html";>Supported
 encodings</a>
  * @version $Id$
  */
@@ -48,14 +47,14 @@ public class WriterFactory
     /**
      * ISO Latin Alphabet #1, also known as ISO-LATIN-1.
      * Every implementation of the Java platform is required to support this 
character encoding.
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String ISO_8859_1 = "ISO-8859-1";
 
     /**
      * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin 
block of the Unicode character set.
      * Every implementation of the Java platform is required to support this 
character encoding.
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String US_ASCII = "US-ASCII";
 
@@ -63,28 +62,28 @@ public class WriterFactory
      * Sixteen-bit Unicode Transformation Format, byte order specified by a 
mandatory initial byte-order mark (either
      * order accepted on input, big-endian used on output).
      * Every implementation of the Java platform is required to support this 
character encoding.
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_16 = "UTF-16";
 
     /**
      * Sixteen-bit Unicode Transformation Format, big-endian byte order.
      * Every implementation of the Java platform is required to support this 
character encoding.
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_16BE = "UTF-16BE";
 
     /**
      * Sixteen-bit Unicode Transformation Format, little-endian byte order.
      * Every implementation of the Java platform is required to support this 
character encoding.
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_16LE = "UTF-16LE";
 
     /**
      * Eight-bit Unicode Transformation Format.
      * Every implementation of the Java platform is required to support this 
character encoding.
-     * @see Charset
+     * @see java.nio.charset.Charset
      */
     public static final String UTF_8 = "UTF-8";
 
@@ -126,7 +125,7 @@ public class WriterFactory
      *
      * @param out not null output stream.
      * @return a writer instance for the output stream using the default 
platform charset.
-     * @see Charset#defaultCharset()
+     * @see java.nio.charset.Charset#defaultCharset()
      */
     public static Writer newPlatformWriter( @Nonnull OutputStream out )
     {
@@ -139,7 +138,7 @@ public class WriterFactory
      * @param file not null file.
      * @return a writer instance for the output file using the default 
platform charset.
      * @throws IOException if any.
-     * @see Charset#defaultCharset()
+     * @see java.nio.charset.Charset#defaultCharset()
      */
     public static Writer newPlatformWriter( @Nonnull File file )
         throws IOException

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/StreamConsumer.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/StreamConsumer.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/StreamConsumer.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/StreamConsumer.java
 Sat Sep 27 07:01:33 2014
@@ -35,5 +35,5 @@ public interface StreamConsumer
     /**
      * Called when the StreamPumper pumps a line from the Stream.
      */
-    public void consumeLine( String line );
+    void consumeLine( String line );
 }

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
 Sat Sep 27 07:01:33 2014
@@ -130,7 +130,7 @@ public class FileUtils
      * @return the default excludes pattern
      * @see DirectoryScanner#DEFAULTEXCLUDES
      */
-    public @Nonnull static String[] getDefaultExcludes()
+    @Nonnull public static String[] getDefaultExcludes()
     {
         return DirectoryScanner.DEFAULTEXCLUDES;
     }
@@ -149,7 +149,7 @@ public class FileUtils
      * @see DirectoryScanner#DEFAULTEXCLUDES
      * @see StringUtils#join(Object[], String)
      */
-    public @Nonnull static String getDefaultExcludesAsString()
+    @Nonnull public static String getDefaultExcludesAsString()
     {
         return StringUtils.join( DirectoryScanner.DEFAULTEXCLUDES, "," );
     }
@@ -161,7 +161,7 @@ public class FileUtils
      * @param filename the file path
      * @return The directory portion excluding the ending file separator.
      */
-    public @Nonnull static String dirname( @Nonnull String filename )
+    @Nonnull public static String dirname( @Nonnull String filename )
     {
         int i = filename.lastIndexOf( File.separator );
         return ( i >= 0 ? filename.substring( 0, i ) : "" );
@@ -173,7 +173,7 @@ public class FileUtils
      * @param filename the file path
      * @return The filename string with extension.
      */
-    public @Nonnull static String filename( @Nonnull String filename )
+    @Nonnull public static String filename( @Nonnull String filename )
     {
         int i = filename.lastIndexOf( File.separator );
         return ( i >= 0 ? filename.substring( i + 1 ) : filename );
@@ -187,7 +187,7 @@ public class FileUtils
      * @param filename the file path
      * @return the extension of the file
      */
-    public @Nonnull static String extension( @Nonnull String filename )
+    @Nonnull public static String extension( @Nonnull String filename )
     {
         // Ensure the last dot is after the last file separator
         int lastSep = filename.lastIndexOf( File.separatorChar );
@@ -232,7 +232,7 @@ public class FileUtils
      * @return the file content using the platform encoding.
      * @throws IOException if any
      */
-    public @Nonnull static String fileRead( @Nonnull String file )
+    @Nonnull public static String fileRead( @Nonnull String file )
         throws IOException
     {
         return fileRead( file, null );
@@ -244,7 +244,7 @@ public class FileUtils
      * @return the file content using the specified encoding.
      * @throws IOException if any
      */
-    private @Nonnull static String fileRead( @Nonnull String file, @Nullable 
String encoding )
+    @Nonnull private static String fileRead( @Nonnull String file, @Nullable 
String encoding )
         throws IOException
     {
         return fileRead( new File( file ), encoding );
@@ -257,7 +257,7 @@ public class FileUtils
      * @return the file content using the platform encoding.
      * @throws IOException if any
      */
-    public @Nonnull static String fileRead( @Nonnull File file )
+    @Nonnull public static String fileRead( @Nonnull File file )
         throws IOException
     {
         return fileRead( file, null );
@@ -269,7 +269,7 @@ public class FileUtils
      * @return the file content using the specified encoding.
      * @throws IOException if any
      */
-    public @Nonnull static String fileRead( @Nonnull File file, @Nullable 
String encoding )
+    @Nonnull public static String fileRead( @Nonnull File file, @Nullable 
String encoding )
         throws IOException
     {
         StringBuilder buf = new StringBuilder();
@@ -307,7 +307,7 @@ public class FileUtils
      *         An empty List if the file didn't exist.
      * @throws IOException
      */
-    public @Nonnull static String[] fileReadArray( @Nonnull File file )
+    @Nonnull public static String[] fileReadArray( @Nonnull File file )
         throws IOException
     {
         List<String> files = loadFile( file );
@@ -553,7 +553,7 @@ public class FileUtils
     /**
      * Private helper method for getFilesFromExtension()
      */
-    private @Nonnull static List<String> blendFilesToList( @Nonnull 
List<String> v, @Nonnull String...files )
+    @Nonnull private static List<String> blendFilesToList( @Nonnull 
List<String> v, @Nonnull String...files )
     {
         Collections.addAll( v, files );
 
@@ -689,7 +689,7 @@ public class FileUtils
      * @return the array of URLs
      * @throws IOException if an error occurs
      */
-    public @Nonnull static URL[] toURLs( @Nonnull final File... files )
+    @Nonnull public static URL[] toURLs( @Nonnull final File... files )
         throws IOException
     {
         final URL[] urls = new URL[files.length];
@@ -716,7 +716,7 @@ public class FileUtils
      * @param filename the path of the file
      * @return the filename minus extension
      */
-    public @Nonnull static String removeExtension( @Nonnull final String 
filename )
+    @Nonnull public static String removeExtension( @Nonnull final String 
filename )
     {
         String ext = extension( filename );
 
@@ -741,7 +741,7 @@ public class FileUtils
      * @param filename the path of the file
      * @return the extension of filename or "" if none
      */
-    public @Nonnull static String getExtension( @Nonnull final String filename 
)
+    @Nonnull public static String getExtension( @Nonnull final String filename 
)
     {
         return extension( filename );
     }
@@ -1384,7 +1384,7 @@ public class FileUtils
      * @throws IOException
      * @see #getFileNames(File, String, String, boolean)
      */
-    public @Nonnull static List<File> getFiles( @Nonnull File directory, 
@Nullable String includes, @Nullable String excludes )
+    @Nonnull public static List<File> getFiles( @Nonnull File directory, 
@Nullable String includes, @Nullable String excludes )
         throws IOException
     {
         return getFiles( directory, includes, excludes, true );
@@ -1401,7 +1401,7 @@ public class FileUtils
      * @throws IOException
      * @see #getFileNames(File, String, String, boolean)
      */
-    public @Nonnull static List<File> getFiles( @Nonnull File directory, 
@Nullable String includes, @Nullable  String excludes, boolean includeBasedir )
+    @Nonnull public static List<File> getFiles( @Nonnull File directory, 
@Nullable String includes, @Nullable  String excludes, boolean includeBasedir )
         throws IOException
     {
         List<String> fileNames = getFileNames( directory, includes, excludes, 
includeBasedir );
@@ -1427,7 +1427,7 @@ public class FileUtils
      * @return a list of files as String
      * @throws IOException
      */
-    public @Nonnull static List<String> getFileNames( @Nonnull File directory, 
@Nullable String includes, @Nullable  String excludes, boolean includeBasedir )
+    @Nonnull public static List<String> getFileNames( @Nonnull File directory, 
@Nullable String includes, @Nullable  String excludes, boolean includeBasedir )
         throws IOException
     {
         return getFileNames( directory, includes, excludes, includeBasedir, 
true );
@@ -1444,7 +1444,7 @@ public class FileUtils
      * @return a list of files as String
      * @throws IOException
      */
-    private @Nonnull static List<String> getFileNames( @Nonnull File 
directory, @Nullable String includes, @Nullable  String excludes, boolean 
includeBasedir,
+    @Nonnull private static List<String> getFileNames( @Nonnull File 
directory, @Nullable String includes, @Nullable  String excludes, boolean 
includeBasedir,
                                              boolean isCaseSensitive )
         throws IOException
     {
@@ -1462,7 +1462,7 @@ public class FileUtils
      * @return a list of directories as String
      * @throws IOException
      */
-    public @Nonnull static List<String> getDirectoryNames( @Nonnull File 
directory, @Nullable String includes, @Nullable String excludes,
+    @Nonnull public static List<String> getDirectoryNames( @Nonnull File 
directory, @Nullable String includes, @Nullable String excludes,
                                                   boolean includeBasedir )
         throws IOException
     {
@@ -1480,7 +1480,7 @@ public class FileUtils
      * @return a list of directories as String
      * @throws IOException
      */
-    public @Nonnull static List<String> getDirectoryNames( @Nonnull File 
directory, @Nullable String includes, @Nullable String excludes,
+    @Nonnull public static List<String> getDirectoryNames( @Nonnull File 
directory, @Nullable String includes, @Nullable String excludes,
                                                   boolean includeBasedir, 
boolean isCaseSensitive )
         throws IOException
     {
@@ -1499,7 +1499,7 @@ public class FileUtils
      * @param getDirectories  true if get directories
      * @return a list of files as String
      */
-    public @Nonnull static List<String> getFileAndDirectoryNames( File 
directory, @Nullable String includes, @Nullable String excludes,
+    @Nonnull public static List<String> getFileAndDirectoryNames( File 
directory, @Nullable String includes, @Nullable String excludes,
                                                          boolean 
includeBasedir, boolean isCaseSensitive,
                                                          boolean getFiles, 
boolean getDirectories )
     {
@@ -1877,7 +1877,7 @@ public class FileUtils
      * @return a List containing every every line not starting with # and not 
empty
      * @throws IOException if any
      */
-    public @Nonnull static List<String> loadFile( @Nonnull File file )
+    @Nonnull public static List<String> loadFile( @Nonnull File file )
         throws IOException
     {
         List<String> lines = new ArrayList<String>();

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/IOUtil.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/IOUtil.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/IOUtil.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/IOUtil.java
 Sat Sep 27 07:01:33 2014
@@ -23,7 +23,6 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -256,7 +255,7 @@ public final class IOUtil
      * Get the contents of an <code>InputStream</code> as a String.
      * The platform's default encoding is used for the byte-to-char conversion.
      */
-    public @Nonnull static String toString( @Nonnull final InputStream input )
+    @Nonnull public static String toString( @Nonnull final InputStream input )
         throws IOException
     {
         return toString( input, DEFAULT_BUFFER_SIZE );
@@ -268,7 +267,7 @@ public final class IOUtil
      *
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static String toString( @Nonnull final InputStream input, 
final int bufferSize )
+    @Nonnull public static String toString( @Nonnull final InputStream input, 
final int bufferSize )
         throws IOException
     {
         final StringWriter sw = new StringWriter();
@@ -283,7 +282,7 @@ public final class IOUtil
      *                 <a 
href="http://www.iana.org/assignments/character-sets";>IANA
      *                 Charset Registry</a> for a list of valid encoding types.
      */
-    public @Nonnull static String toString( @Nonnull final InputStream input, 
@Nonnull final String encoding )
+    @Nonnull public static String toString( @Nonnull final InputStream input, 
@Nonnull final String encoding )
         throws IOException
     {
         return toString( input, encoding, DEFAULT_BUFFER_SIZE );
@@ -297,7 +296,7 @@ public final class IOUtil
      *                   Charset Registry</a> for a list of valid encoding 
types.
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static String toString( @Nonnull final InputStream input, 
@Nonnull final String encoding, final int bufferSize )
+    @Nonnull public static String toString( @Nonnull final InputStream input, 
@Nonnull final String encoding, final int bufferSize )
         throws IOException
     {
         final StringWriter sw = new StringWriter();
@@ -311,7 +310,7 @@ public final class IOUtil
     /**
      * Get the contents of an <code>InputStream</code> as a 
<code>byte[]</code>.
      */
-    public @Nonnull static byte[] toByteArray( @Nonnull final InputStream 
input )
+    @Nonnull public static byte[] toByteArray( @Nonnull final InputStream 
input )
         throws IOException
     {
         return toByteArray( input, DEFAULT_BUFFER_SIZE );
@@ -322,7 +321,7 @@ public final class IOUtil
      *
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static byte[] toByteArray( @Nonnull final InputStream 
input, final int bufferSize )
+    @Nonnull public static byte[] toByteArray( @Nonnull final InputStream 
input, final int bufferSize )
         throws IOException
     {
         final ByteArrayOutputStream output = new ByteArrayOutputStream();
@@ -370,7 +369,7 @@ public final class IOUtil
     /**
      * Get the contents of a <code>Reader</code> as a String.
      */
-    public @Nonnull static String toString( @Nonnull final Reader input )
+    @Nonnull public static String toString( @Nonnull final Reader input )
         throws IOException
     {
         return toString( input, DEFAULT_BUFFER_SIZE );
@@ -381,7 +380,7 @@ public final class IOUtil
      *
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static String toString( @Nonnull final Reader input, final 
int bufferSize )
+    @Nonnull public static String toString( @Nonnull final Reader input, final 
int bufferSize )
         throws IOException
     {
         final StringWriter sw = new StringWriter();
@@ -395,7 +394,7 @@ public final class IOUtil
     /**
      * Get the contents of a <code>Reader</code> as a <code>byte[]</code>.
      */
-    public @Nonnull static byte[] toByteArray( @Nonnull final Reader input )
+    @Nonnull public static byte[] toByteArray( @Nonnull final Reader input )
         throws IOException
     {
         return toByteArray( input, DEFAULT_BUFFER_SIZE );
@@ -406,7 +405,7 @@ public final class IOUtil
      *
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static byte[] toByteArray( @Nonnull final Reader input, 
final int bufferSize )
+    @Nonnull public static byte[] toByteArray( @Nonnull final Reader input, 
final int bufferSize )
         throws IOException
     {
         ByteArrayOutputStream output = new ByteArrayOutputStream();
@@ -467,7 +466,7 @@ public final class IOUtil
     /**
      * Get the contents of a <code>String</code> as a <code>byte[]</code>.
      */
-    public @Nonnull static byte[] toByteArray( @Nonnull final String input )
+    @Nonnull public static byte[] toByteArray( @Nonnull final String input )
         throws IOException
     {
         return toByteArray( input, DEFAULT_BUFFER_SIZE );
@@ -478,7 +477,7 @@ public final class IOUtil
      *
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static byte[] toByteArray( @Nonnull final String input, 
final int bufferSize )
+    @Nonnull public static byte[] toByteArray( @Nonnull final String input, 
final int bufferSize )
         throws IOException
     {
         ByteArrayOutputStream output = new ByteArrayOutputStream();
@@ -557,7 +556,7 @@ public final class IOUtil
      * Get the contents of a <code>byte[]</code> as a String.
      * The platform's default encoding is used for the byte-to-char conversion.
      */
-    public @Nonnull static String toString( @Nonnull final byte[] input )
+    @Nonnull public static String toString( @Nonnull final byte[] input )
         throws IOException
     {
         return toString( input, DEFAULT_BUFFER_SIZE );
@@ -569,7 +568,7 @@ public final class IOUtil
      *
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static String toString( @Nonnull final byte[] input, final 
int bufferSize )
+    @Nonnull public static String toString( @Nonnull final byte[] input, final 
int bufferSize )
         throws IOException
     {
         final StringWriter sw = new StringWriter();
@@ -584,7 +583,7 @@ public final class IOUtil
      *                 <a 
href="http://www.iana.org/assignments/character-sets";>IANA
      *                 Charset Registry</a> for a list of valid encoding types.
      */
-    public @Nonnull static String toString( @Nonnull final byte[] input, 
@Nonnull final String encoding )
+    @Nonnull public static String toString( @Nonnull final byte[] input, 
@Nonnull final String encoding )
         throws IOException
     {
         return toString( input, encoding, DEFAULT_BUFFER_SIZE );
@@ -598,7 +597,7 @@ public final class IOUtil
      *                   Charset Registry</a> for a list of valid encoding 
types.
      * @param bufferSize Size of internal buffer to use.
      */
-    public @Nonnull static String toString( @Nonnull final byte[] input, 
@Nonnull final String encoding, final int bufferSize )
+    @Nonnull public static String toString( @Nonnull final byte[] input, 
@Nonnull final String encoding, final int bufferSize )
         throws IOException
     {
         final StringWriter sw = new StringWriter();

Modified: 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
 Sat Sep 27 07:01:33 2014
@@ -111,7 +111,7 @@ public class Xpp3Dom
         return name;
     }
 
-    public @Nonnull String getValue()
+    @Nonnull public String getValue()
     {
         return value;
     }

Modified: 
maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java?rev=1627926&r1=1627925&r2=1627926&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java
 (original)
+++ 
maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java
 Sat Sep 27 07:01:33 2014
@@ -115,9 +115,10 @@ public class DirectoryScannerTest
     }
 
     @Test
-    public void followSymlinks(){
+    public void followSymlinks()
+    {
         DirectoryScanner ds = new DirectoryScanner();
-        ds.setBasedir( new File("src/test/resources/symlinks/src/") );
+        ds.setBasedir( new File( "src/test/resources/symlinks/src/" ) );
         ds.setFollowSymlinks( false );
         ds.scan();
         List<String> included = Arrays.asList( ds.getIncludedFiles() );
@@ -125,7 +126,7 @@ public class DirectoryScannerTest
         ds.setFollowSymlinks( true );
         ds.scan();
         included = Arrays.asList( ds.getIncludedFiles() );
-        System.out.println( "includedFiles(symlinks  ) = " + included );
+        System.out.println( "  includedFiles(symlinks) = " + included );
     }
 
     @Test
@@ -304,7 +305,7 @@ public class DirectoryScannerTest
         Assert.assertEquals( 2, removedFiles.length );
     }
 
-    @Ignore("Enable this test to run performance checks")
+    @Ignore( "Enable this test to run performance checks" )
     @Test
     public void performanceTest()
         throws Exception


Reply via email to