maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject svn commit: r1706713 - in /maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli: ./ javatool/ shell/
Date Sun, 04 Oct 2015 18:30:04 GMT
Author: khmarbaise
Date: Sun Oct  4 18:30:03 2015
New Revision: 1706713

URL: http://svn.apache.org/viewvc?rev=1706713&view=rev
Log:
Cleaned up checkstyle reported issues.

Modified:
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/WriterStreamConsumer.java
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/AbstractJavaTool.java
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/JavaToolException.java
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/CmdShell.java
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java

Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/WriterStreamConsumer.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/WriterStreamConsumer.java?rev=1706713&r1=1706712&r2=1706713&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/WriterStreamConsumer.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/WriterStreamConsumer.java
Sun Oct  4 18:30:03 2015
@@ -32,11 +32,16 @@ public class WriterStreamConsumer
 
     private final PrintWriter writer;
 
+    /**
+     * @param writer {@link Writer}
+     */
     public WriterStreamConsumer( Writer writer )
     {
         this.writer = new PrintWriter( writer );
     }
 
+    /** {@inheritDoc}
+     */
     public void consumeLine( String line )
     {
         writer.println( line );

Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/AbstractJavaTool.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/AbstractJavaTool.java?rev=1706713&r1=1706712&r2=1706713&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/AbstractJavaTool.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/AbstractJavaTool.java
Sun Oct  4 18:30:03 2015
@@ -59,20 +59,23 @@ public abstract class AbstractJavaTool<R
      */
     private Toolchain toolchain;
 
+    /**
+     * @param javaToolName The name of the java tool.
+     */
     protected AbstractJavaTool( String javaToolName )
     {
         this.javaToolName = javaToolName;
     }
 
     /**
-     * Create the commandline object given the request.
+     * Create the command line object given the request.
      *
      * @param request      User request on the java tool
-     * @param javaToolFile Location of the java tool file to use
-     * @return the commandline
+     * @param javaToolFileLocation Location of the java tool file to use
+     * @return the command line
      * @throws JavaToolException if could not create the command line from the request
      */
-    protected abstract Commandline createCommandLine( Request request, String javaToolFile
)
+    protected abstract Commandline createCommandLine( Request request, String javaToolFileLocation
)
         throws JavaToolException;
 
     /**
@@ -217,11 +220,17 @@ public abstract class AbstractJavaTool<R
         return systemOut;
     }
 
+    /**
+     * @return The JavaToolResult.
+     */
     protected JavaToolResult createResult()
     {
         return new JavaToolResult();
     }
 
+    /**
+     * @return The location of the java tool executable.
+     */
     protected String findJavaToolExecutable()
     {
         String command = javaToolName + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? ".exe" : ""
);

Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/JavaToolException.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/JavaToolException.java?rev=1706713&r1=1706712&r2=1706713&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/JavaToolException.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/javatool/JavaToolException.java
Sun Oct  4 18:30:03 2015
@@ -36,11 +36,18 @@ public class JavaToolException
 {
     private static final long serialVersionUID = 1L;
 
+    /**
+     * @param message The message of the exception.
+     */
     public JavaToolException( String message )
     {
         super( message );
     }
 
+    /**
+     * @param message The message of the exception.
+     * @param cause The cause of the exception.
+     */
     public JavaToolException( String message, Throwable cause )
     {
         super( message, cause );

Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java?rev=1706713&r1=1706712&r2=1706713&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
Sun Oct  4 18:30:03 2015
@@ -34,6 +34,9 @@ public class BourneShell
     private static final char[] BASH_QUOTING_TRIGGER_CHARS =
         { ' ', '$', ';', '&', '|', '<', '>', '*', '?', '(', ')', '[', ']', '{',
'}', '`' };
 
+    /**
+     * Create instance of BournShell.
+     */
     public BourneShell()
     {
         setShellCommand( "/bin/sh" );
@@ -57,6 +60,7 @@ public class BourneShell
         return unifyQuotes( super.getExecutable() );
     }
 
+    /** {@inheritDoc} */
     public List<String> getShellArgsList()
     {
         List<String> shellArgs = new ArrayList<String>();
@@ -72,6 +76,7 @@ public class BourneShell
         return shellArgs;
     }
 
+    /** {@inheritDoc} */
     public String[] getShellArgs()
     {
         String[] shellArgs = super.getShellArgs();
@@ -93,6 +98,7 @@ public class BourneShell
         return shellArgs;
     }
 
+    /** {@inheritDoc} */
     protected String getExecutionPreamble()
     {
         if ( getWorkingDirectoryAsString() == null )
@@ -110,6 +116,7 @@ public class BourneShell
         return sb.toString();
     }
 
+    /** {@inheritDoc} */
     protected char[] getQuotingTriggerChars()
     {
         return BASH_QUOTING_TRIGGER_CHARS;

Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/CmdShell.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/CmdShell.java?rev=1706713&r1=1706712&r2=1706713&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/CmdShell.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/CmdShell.java
Sun Oct  4 18:30:03 2015
@@ -78,6 +78,10 @@ public class CmdShell
      * Always quoting the entire command line, regardless of these conditions
      * appears to make Windows processes invoke successfully.
      * </p>
+     * 
+     * @param executable The executable.
+     * @param arguments The arguments for the executable.
+     * @return The resulting command line.
      */
     public List<String> getCommandLine( String executable, String... arguments )
     {

Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java?rev=1706713&r1=1706712&r2=1706713&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Sun Oct  4 18:30:03 2015
@@ -125,6 +125,11 @@ public class Shell
         return getRawCommandLine( executable, arguments );
     }
 
+    /**
+     * @param executable Executable.
+     * @param arguments The arguments for the executable.
+     * @return The list on command line. 
+     */
     List<String> getRawCommandLine( String executable, String... arguments )
     {
         List<String> commandLine = new ArrayList<String>();
@@ -205,11 +210,17 @@ public class Shell
         return result;
     }
 
+    /**
+     * @return false in all cases. 
+     */
     protected boolean isDoubleQuotedArgumentEscaped()
     {
         return false;
     }
 
+    /**
+     * @return {@link #singleQuotedArgumentEscaped}
+     */
     protected boolean isSingleQuotedArgumentEscaped()
     {
         return singleQuotedArgumentEscaped;
@@ -225,6 +236,9 @@ public class Shell
         return singleQuotedExecutableEscaped;
     }
 
+    /**
+     * @param argQuoteDelimiter {@link #argQuoteDelimiter}
+     */
     void setArgumentQuoteDelimiter( char argQuoteDelimiter )
     {
         this.argQuoteDelimiter = argQuoteDelimiter;
@@ -235,6 +249,9 @@ public class Shell
         return argQuoteDelimiter;
     }
 
+    /**
+     * @param exeQuoteDelimiter {@link #exeQuoteDelimiter}
+     */
     void setExecutableQuoteDelimiter( char exeQuoteDelimiter )
     {
         this.exeQuoteDelimiter = exeQuoteDelimiter;
@@ -279,6 +296,9 @@ public class Shell
         return shellArgs;
     }
 
+    /**
+     * @param quotedArgumentsEnabled {@link #quotedArgumentsEnabled}
+     */
     public void setQuotedArgumentsEnabled( boolean quotedArgumentsEnabled )
     {
         this.quotedArgumentsEnabled = quotedArgumentsEnabled;
@@ -301,6 +321,7 @@ public class Shell
 
     /**
      * Sets the executable to run.
+     * @param executable The executable.
      */
     public void setExecutable( String executable )
     {
@@ -311,6 +332,9 @@ public class Shell
         this.executable = executable.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar
);
     }
 
+    /**
+     * @return The executable.
+     */
     public String getExecutable()
     {
         return executable;
@@ -318,26 +342,31 @@ public class Shell
 
     /**
      * Sets execution directory.
+     * @param path The path which should be used as working directory.
      */
     public void setWorkingDirectory( String path )
     {
         if ( path != null )
         {
-            workingDir = path;
+            this.workingDir = path;
         }
     }
 
     /**
      * Sets execution directory.
+     * @param workingDirectory The working directory.
      */
-    public void setWorkingDirectory( File workingDir )
+    public void setWorkingDirectory( File workingDirectory )
     {
-        if ( workingDir != null )
+        if ( workingDirectory != null )
         {
-            this.workingDir = workingDir.getAbsolutePath();
+            this.workingDir = workingDirectory.getAbsolutePath();
         }
     }
 
+    /**
+     * @return The working directory.
+     */
     public File getWorkingDirectory()
     {
         return workingDir == null ? null : new File( workingDir );
@@ -348,6 +377,7 @@ public class Shell
         return workingDir;
     }
 
+    /** {@inheritDoc} */
     public Object clone()
     {
         throw new RuntimeException( "Do we ever clone this?" );



Mime
View raw message