Author: khmarbaise
Date: Thu Oct 1 17:25:22 2015
New Revision: 1706295
URL: http://svn.apache.org/viewvc?rev=1706295&view=rev
Log:
Cleaning up some checkstyle reported errors/warnings.
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Os.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PropertyUtils.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/cli/Arg.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineCallable.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineException.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/io/Java7Support.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/pull/XmlPullParserException.java
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Os.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Os.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Os.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Os.java
Thu Oct 1 17:25:22 2015
@@ -44,12 +44,24 @@ import java.util.Set;
*/
public class Os
{
+ /**
+ * The OS Name.
+ */
public static final String OS_NAME = System.getProperty( "os.name"
).toLowerCase( Locale.ENGLISH );
+ /**
+ * The OA architecture.
+ */
public static final String OS_ARCH = System.getProperty( "os.arch"
).toLowerCase( Locale.ENGLISH );
+ /**
+ * The OS version.
+ */
public static final String OS_VERSION = System.getProperty( "os.version"
).toLowerCase( Locale.ENGLISH );
+ /**
+ * The path separator.
+ */
public static final String PATH_SEP = System.getProperty( "path.separator"
);
/**
@@ -57,6 +69,9 @@ public class Os
*/
public static final String LINE_SEP = System.getProperty( "line.separator"
);
+ /**
+ * OS Family
+ */
public static final String OS_FAMILY = getOsFamily();
// store the valid families
@@ -140,6 +155,7 @@ public class Os
/**
* The set of valid families. This methods initializes the set until
* VALID_FAMILIES constant is set.
+ * @return The set of families.
*/
public static Set<String> getValidFamilies()
{
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PropertyUtils.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PropertyUtils.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PropertyUtils.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/PropertyUtils.java
Thu Oct 1 17:25:22 2015
@@ -19,14 +19,17 @@ package org.apache.maven.shared.utils;
* under the License.
*/
+import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Properties;
-import org.apache.maven.shared.utils.io.IOUtil;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import org.apache.maven.shared.utils.io.IOUtil;
+
/**
*
*/
@@ -38,6 +41,10 @@ public class PropertyUtils
// should throw new IllegalAccessError( "Utility class" );
}
+ /**
+ * @param url
+ * @return The loaded properties.
+ */
public static java.util.Properties loadProperties( @Nonnull java.net.URL
url )
{
try
@@ -51,7 +58,11 @@ public class PropertyUtils
return null;
}
- public static java.util.Properties loadProperties( @Nonnull java.io.File
file )
+ /**
+ * @param file
+ * @return The loaded properties.
+ */
+ public static Properties loadProperties( @Nonnull File file )
{
try
{
@@ -64,7 +75,11 @@ public class PropertyUtils
return null;
}
- public static java.util.Properties loadProperties( @Nullable
java.io.InputStream is )
+ /**
+ * @param is {@link InputStream}
+ * @return The loaded properties.
+ */
+ public static Properties loadProperties( @Nullable InputStream is )
{
try
{
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=1706295&r1=1706294&r2=1706295&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
Thu Oct 1 17:25:22 2015
@@ -1999,7 +1999,8 @@ public class StringUtils
* 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 to abbreviate.
* @param offset left edge of source string
* @param maxWidth maximum length of result string
*/
@@ -2286,7 +2287,6 @@ public class StringUtils
* @param escapeChar
* @param force
* @return the String quoted and escaped
- *
*/
public static String quoteAndEscape( @Nullable String source, char
quoteChar, @Nonnull final char[] escapedChars,
@Nonnull final char[]
quotingTriggers, char escapeChar, boolean force )
@@ -2338,7 +2338,6 @@ public class StringUtils
* @param escapedChars
* @param escapeChar
* @return the String escaped
- *
*/
public static String escape( @Nullable String source, @Nonnull final
char[] escapedChars, char escapeChar )
{
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/Arg.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/Arg.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/Arg.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/Arg.java
Thu Oct 1 17:25:22 2015
@@ -26,10 +26,19 @@ import java.io.File;
*/
public interface Arg
{
+ /**
+ * @param value Set the value.
+ */
void setValue( String value );
+ /**
+ * @param line
+ */
void setLine( String line );
+ /**
+ * @param value
+ */
void setFile( File value );
/**
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineCallable.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineCallable.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineCallable.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineCallable.java
Thu Oct 1 17:25:22 2015
@@ -29,6 +29,9 @@ import java.util.concurrent.Callable;
public interface CommandLineCallable
extends Callable<Integer>
{
+ /* (non-Javadoc)
+ * @see java.util.concurrent.Callable#call()
+ */
Integer call()
throws CommandLineException;
}
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineException.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineException.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineException.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineException.java
Thu Oct 1 17:25:22 2015
@@ -26,11 +26,23 @@ package org.apache.maven.shared.utils.cl
public class CommandLineException
extends Exception
{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1344773066470228441L;
+
+ /**
+ * @param message
+ */
public CommandLineException( String message )
{
super( message );
}
+ /**
+ * @param message
+ * @param cause
+ */
public CommandLineException( String message, Throwable cause )
{
super( message, cause );
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=1706295&r1=1706294&r2=1706295&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
Thu Oct 1 17:25:22 2015
@@ -657,7 +657,7 @@ public class FileUtils
* @return The equivalent <code>File</code> object, or <code>null</code>
if the URL's protocol
* is not <code>file</code>
*/
- public @Nullable static File toFile( final @Nullable URL url )
+ @Nullable public static File toFile( final @Nullable URL url )
{
if ( url == null || !url.getProtocol().equalsIgnoreCase( "file" ) )
{
@@ -942,7 +942,7 @@ public class FileUtils
* <li>an IO error occurs during copying</li>
* </ul>
*/
- private static void copyStreamToFile( @Nonnull final @WillClose
InputStream source,
+ private static void copyStreamToFile( @Nonnull @WillClose final
InputStream source,
@Nonnull final File destination )
throws IOException
{
@@ -991,7 +991,7 @@ public class FileUtils
* @param path the path to normalize
* @return the normalized String, or <code>null</code> if too many ..'s.
*/
- public static @Nonnull String normalize( @Nonnull final String path )
+ @Nonnull public static String normalize( @Nonnull final String path )
{
String normalized = path;
// Resolve occurrences of "//" in the normalized path
@@ -1046,7 +1046,7 @@ public class FileUtils
* @param filename Absolute or relative file path to resolve.
* @return The canonical <code>File</code> of <code>filename</code>.
*/
- public static @Nonnull File resolveFile( final File baseFile, @Nonnull
String filename )
+ @Nonnull public static File resolveFile( final File baseFile, @Nonnull
String filename )
{
String filenm = filename;
if ( '/' != File.separatorChar )
@@ -2014,7 +2014,7 @@ public class FileUtils
* @param file the file to check
*
*/
- public static boolean isSymbolicLink( final @Nonnull File file )
+ public static boolean isSymbolicLink( @Nonnull final File file )
throws IOException
{
if ( Java7Support.isAtLeastJava7() )
@@ -2032,7 +2032,7 @@ public class FileUtils
* always return false for java versions prior to 1.7.
*
*/
- public static boolean isSymbolicLinkForSure( final @Nonnull File file )
+ public static boolean isSymbolicLinkForSure( @Nonnull final File file )
throws IOException
{
return Java7Support.isAtLeastJava7() && Java7Support.isSymLink( file );
@@ -2056,7 +2056,7 @@ public class FileUtils
* @return true if the file is a symbolic link or if we're on some crappy
os.
* false if the file is not a symlink or we're not able to detect
it.
*/
- static boolean isSymbolicLinkLegacy( final @Nonnull File file )
+ static boolean isSymbolicLinkLegacy( @Nonnull final File file )
throws IOException
{
final File canonical = new File( file.getCanonicalPath() );
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=1706295&r1=1706294&r2=1706295&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
Thu Oct 1 17:25:22 2015
@@ -133,6 +133,7 @@ public final class IOUtil
/**
* Copy bytes from an <code>InputStream</code> to an
<code>OutputStream</code>.
+ * @throws IOException
*/
public static void copy( @Nonnull final InputStream input, @Nonnull final
OutputStream output )
throws IOException
@@ -144,6 +145,7 @@ public final class IOUtil
* Copy bytes from an <code>InputStream</code> to an
<code>OutputStream</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final InputStream input, @Nonnull final
OutputStream output,
final int bufferSize )
@@ -159,6 +161,7 @@ public final class IOUtil
/**
* Copy chars from a <code>Reader</code> to a <code>Writer</code>.
+ * @throws IOException
*/
public static void copy( @Nonnull final Reader input, @Nonnull final
Writer output )
throws IOException
@@ -170,6 +173,7 @@ public final class IOUtil
* Copy chars from a <code>Reader</code> to a <code>Writer</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final Reader input, @Nonnull final
Writer output, final int bufferSize )
throws IOException
@@ -195,6 +199,7 @@ public final class IOUtil
* Copy and convert bytes from an <code>InputStream</code> to chars on a
* <code>Writer</code>.
* The platform's default encoding is used for the byte-to-char conversion.
+ * @throws IOException
*/
public static void copy( @Nonnull final InputStream input, @Nonnull final
Writer output )
throws IOException
@@ -208,6 +213,7 @@ public final class IOUtil
* The platform's default encoding is used for the byte-to-char conversion.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final InputStream input, @Nonnull final
Writer output, final int bufferSize )
throws IOException
@@ -223,6 +229,7 @@ public final class IOUtil
* @param encoding The name of a supported character encoding. See the
* <a
href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
+ * @throws IOException
*/
public static void copy( @Nonnull final InputStream input, @Nonnull final
Writer output,
@Nonnull final String encoding )
@@ -240,6 +247,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.
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final InputStream input, @Nonnull final
Writer output,
@Nonnull final String encoding, final int
bufferSize )
@@ -255,6 +263,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.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final InputStream input )
throws IOException
@@ -267,6 +276,7 @@ public final class IOUtil
* The platform's default encoding is used for the byte-to-char conversion.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final InputStream input,
final int bufferSize )
throws IOException
@@ -282,6 +292,7 @@ public final class IOUtil
* @param encoding The name of a supported character encoding. See the
* <a
href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final InputStream input,
@Nonnull final String encoding )
throws IOException
@@ -296,6 +307,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.
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final InputStream input,
@Nonnull final String encoding,
final int bufferSize )
@@ -311,6 +323,7 @@ public final class IOUtil
/**
* Get the contents of an <code>InputStream</code> as a
<code>byte[]</code>.
+ * @throws IOException
*/
@Nonnull public static byte[] toByteArray( @Nonnull final InputStream
input )
throws IOException
@@ -322,6 +335,7 @@ public final class IOUtil
* Get the contents of an <code>InputStream</code> as a
<code>byte[]</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static byte[] toByteArray( @Nonnull final InputStream
input, final int bufferSize )
throws IOException
@@ -342,6 +356,7 @@ public final class IOUtil
/**
* Serialize chars from a <code>Reader</code> to bytes on an
<code>OutputStream</code>, and
* flush the <code>OutputStream</code>.
+ * @throws IOException
*/
public static void copy( @Nonnull final Reader input, @Nonnull final
OutputStream output )
throws IOException
@@ -354,6 +369,7 @@ public final class IOUtil
* flush the <code>OutputStream</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final Reader input, @Nonnull final
OutputStream output, final int bufferSize )
throws IOException
@@ -370,6 +386,7 @@ public final class IOUtil
/**
* Get the contents of a <code>Reader</code> as a String.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final Reader input )
throws IOException
@@ -381,6 +398,7 @@ public final class IOUtil
* Get the contents of a <code>Reader</code> as a String.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final Reader input, final
int bufferSize )
throws IOException
@@ -395,6 +413,7 @@ public final class IOUtil
/**
* Get the contents of a <code>Reader</code> as a <code>byte[]</code>.
+ * @throws IOException
*/
@Nonnull public static byte[] toByteArray( @Nonnull final Reader input )
throws IOException
@@ -406,6 +425,7 @@ public final class IOUtil
* Get the contents of a <code>Reader</code> as a <code>byte[]</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static byte[] toByteArray( @Nonnull final Reader input,
final int bufferSize )
throws IOException
@@ -426,6 +446,7 @@ public final class IOUtil
/**
* Serialize chars from a <code>String</code> to bytes on an
<code>OutputStream</code>, and
* flush the <code>OutputStream</code>.
+ * @throws IOException
*/
public static void copy( @Nonnull final String input, @Nonnull final
OutputStream output )
throws IOException
@@ -438,6 +459,7 @@ public final class IOUtil
* flush the <code>OutputStream</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final String input, @Nonnull final
OutputStream output, final int bufferSize )
throws IOException
@@ -455,6 +477,9 @@ public final class IOUtil
/**
* Copy chars from a <code>String</code> to a <code>Writer</code>.
+ * @param input
+ * @param output
+ * @throws IOException
*/
public static void copy( @Nonnull final String input, @Nonnull final
Writer output )
throws IOException
@@ -467,6 +492,7 @@ public final class IOUtil
/**
* Get the contents of a <code>String</code> as a <code>byte[]</code>.
+ * @throws IOException
*/
@Nonnull public static byte[] toByteArray( @Nonnull final String input )
throws IOException
@@ -478,6 +504,7 @@ public final class IOUtil
* Get the contents of a <code>String</code> as a <code>byte[]</code>.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static byte[] toByteArray( @Nonnull final String input,
final int bufferSize )
throws IOException
@@ -499,6 +526,7 @@ public final class IOUtil
* Copy and convert bytes from a <code>byte[]</code> to chars on a
* <code>Writer</code>.
* The platform's default encoding is used for the byte-to-char conversion.
+ * @throws IOException
*/
public static void copy( @Nonnull final byte[] input, @Nonnull final
Writer output )
throws IOException
@@ -512,6 +540,7 @@ public final class IOUtil
* The platform's default encoding is used for the byte-to-char conversion.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final byte[] input, @Nonnull final
Writer output, final int bufferSize )
throws IOException
@@ -527,6 +556,7 @@ public final class IOUtil
* @param encoding The name of a supported character encoding. See the
* <a
href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
+ * @throws IOException
*/
public static void copy( @Nonnull final byte[] input, @Nonnull final
Writer output, final String encoding )
throws IOException
@@ -543,6 +573,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.
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
public static void copy( @Nonnull final byte[] input, @Nonnull final
Writer output, @Nonnull final String encoding,
final int bufferSize )
@@ -558,6 +589,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.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final byte[] input )
throws IOException
@@ -570,6 +602,7 @@ public final class IOUtil
* The platform's default encoding is used for the byte-to-char conversion.
*
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final byte[] input, final
int bufferSize )
throws IOException
@@ -585,6 +618,7 @@ public final class IOUtil
* @param encoding The name of a supported character encoding. See the
* <a
href="http://www.iana.org/assignments/character-sets">IANA
* Charset Registry</a> for a list of valid encoding types.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final byte[] input,
@Nonnull final String encoding )
throws IOException
@@ -599,6 +633,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.
* @param bufferSize Size of internal buffer to use.
+ * @throws IOException
*/
@Nonnull public static String toString( @Nonnull final byte[] input,
@Nonnull final String encoding,
final int bufferSize )
@@ -614,6 +649,7 @@ public final class IOUtil
/**
* Copy bytes from a <code>byte[]</code> to an <code>OutputStream</code>.
+ * @throws IOException
*/
public static void copy( @Nonnull final byte[] input, @Nonnull final
OutputStream output )
throws IOException
@@ -627,6 +663,7 @@ public final class IOUtil
* @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
*/
public static boolean contentEquals( @Nonnull final InputStream input1,
@Nonnull final InputStream input2 )
throws IOException
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/Java7Support.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/Java7Support.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/Java7Support.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/io/Java7Support.java
Thu Oct 1 17:25:22 2015
@@ -105,7 +105,7 @@ public class Java7Support
}
- public static @Nonnull File readSymbolicLink( @Nonnull File symlink )
+ @Nonnull public static File readSymbolicLink( @Nonnull File symlink )
throws IOException
{
try
@@ -145,7 +145,7 @@ public class Java7Support
}
- public static @Nonnull File createSymbolicLink( @Nonnull File symlink,
@Nonnull File target )
+ @Nonnull public static File createSymbolicLink( @Nonnull File symlink,
@Nonnull File target )
throws IOException
{
try
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
Thu Oct 1 17:25:22 2015
@@ -46,18 +46,36 @@ public class Xpp3DomBuilder
{
private static final boolean DEFAULT_TRIM = true;
+ /**
+ * @param reader {@link Reader}
+ * @return the built dom.
+ * @throws XmlPullParserException
+ */
public static Xpp3Dom build( @WillClose @Nonnull Reader reader )
throws XmlPullParserException
{
return build( reader, DEFAULT_TRIM );
}
+ /**
+ * @param is {@link InputStream}
+ * @param encoding
+ * @return the built dom.
+ * @throws XmlPullParserException
+ */
public static Xpp3Dom build( @WillClose InputStream is, @Nonnull String
encoding )
throws XmlPullParserException
{
return build( is, encoding, DEFAULT_TRIM );
}
+ /**
+ * @param is {@link InputStream}
+ * @param encoding The encoding.
+ * @param trim true/false.
+ * @return the built dom.
+ * @throws XmlPullParserException
+ */
public static Xpp3Dom build( @WillClose InputStream is, @Nonnull String
encoding, boolean trim )
throws XmlPullParserException
{
@@ -72,6 +90,12 @@ public class Xpp3DomBuilder
}
}
+ /**
+ * @param reader {@link Reader}
+ * @param trim true/false.
+ * @return the built dom.
+ * @throws XmlPullParserException
+ */
public static Xpp3Dom build( @WillClose Reader reader, boolean trim )
throws XmlPullParserException
{
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomUtils.java
Thu Oct 1 17:25:22 2015
@@ -29,16 +29,33 @@ import java.util.Map;
*/
public class Xpp3DomUtils
{
+ /**
+ * @param dominant {@link Xpp3Dom}
+ * @param recessive {@link Xpp3Dom}
+ * @param childMergeOverride true/false.
+ * @return Merged dom.
+ */
public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive,
Boolean childMergeOverride )
{
return dominant != null ? merge( dominant, recessive,
childMergeOverride ) : recessive;
}
+ /**
+ * @param dominant {@link Xpp3Dom}
+ * @param recessive {@link Xpp3Dom}
+ * @return Merged dom.
+ */
public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive )
{
return dominant != null ? merge( dominant, recessive, null ) :
recessive;
}
+ /**
+ * @param dominant {@link Xpp3Dom}
+ * @param recessive {@link Xpp3Dom}
+ * @param childMergeOverride true/false.
+ * @return Merged dom.
+ */
public static Xpp3Dom merge( Xpp3Dom dominant, Xpp3Dom recessive, Boolean
childMergeOverride )
{
if ( recessive == null || isCombineSelfOverride( dominant ) )
@@ -130,6 +147,10 @@ public class Xpp3DomUtils
dominant.getAttribute( Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE
) );
}
+ /**
+ * @param str The string to be checked.
+ * @return <code>true</code> in case string is empty <code>false</code>
otherwise.
+ */
public static boolean isEmpty( String str )
{
return str == null || str.trim().length() == 0;
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java
Thu Oct 1 17:25:22 2015
@@ -27,21 +27,38 @@ import java.io.Writer;
*/
public class Xpp3DomWriter
{
+ /**
+ * @param writer {@link Writer}
+ * @param dom {@link Xpp3Dom}
+ */
public static void write( Writer writer, Xpp3Dom dom )
{
write( new PrettyPrintXMLWriter( writer ), dom );
}
+ /**
+ * @param writer {@link PrintWriter}
+ * @param dom {@link Xpp3Dom}
+ */
public static void write( PrintWriter writer, Xpp3Dom dom )
{
write( new PrettyPrintXMLWriter( writer ), dom );
}
+ /**
+ * @param xmlWriter {@link XMLWriter}
+ * @param dom {@link Xpp3Dom}
+ */
public static void write( XMLWriter xmlWriter, Xpp3Dom dom )
{
write( xmlWriter, dom, true );
}
+ /**
+ * @param xmlWriter {@link XMLWriter}
+ * @param dom {@link Xpp3Dom}
+ * @param escape true/false.
+ */
public static void write( XMLWriter xmlWriter, Xpp3Dom dom, boolean escape
)
{
xmlWriter.startElement( dom.getName() );
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/pull/XmlPullParserException.java
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/pull/XmlPullParserException.java?rev=1706295&r1=1706294&r2=1706295&view=diff
==============================================================================
---
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/pull/XmlPullParserException.java
(original)
+++
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/pull/XmlPullParserException.java
Thu Oct 1 17:25:22 2015
@@ -30,16 +30,30 @@ public class XmlPullParserException
extends RuntimeException
{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 117075811816936575L;
+
+ /**
+ * @param e IOException.
+ */
public XmlPullParserException( IOException e )
{
super( e );
}
+ /**
+ * @param e The exception.
+ */
public XmlPullParserException( SAXException e )
{
super( e );
}
+ /**
+ * @param message The message.
+ */
public XmlPullParserException( String message )
{
super( message );