Skip to content

Commit

Permalink
[MSHARED-860] deprecated Windows 9X CommandShell (#20)
Browse files Browse the repository at this point in the history
* deprecated Windows 9X CommandShell
* correct JavaDoc
  • Loading branch information
elharo authored Mar 12, 2020
1 parent 5bad9d9 commit cb448b9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
import java.util.List;

/**
* <p>
* Implementation to call the CMD Shell present on Windows NT, 2000 and XP
* </p>
* Implementation to call the CMD Shell present on Windows NT, 2000, XP, 7, 8, and 10.
*
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@


/**
* <p>
* Implementation to call the Command.com Shell present on Windows 95, 98 and Me
* </p>
*
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
*
* @deprecated Windows ME is long dead. Update to Windows 10 and use {@link CmdShell}.
*/
@Deprecated
public class CommandShell
extends Shell
{
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@
import org.apache.maven.shared.utils.StringUtils;

/**
* <p>
* Class that abstracts the Shell functionality,
* with subclases for shells that behave particularly, like
* with subclasses for shells that behave particularly, like<p>
*
* <ul>
* <li><code>command.com</code></li>
* <li><code>cmd.exe</code></li>
* </ul>
* </p>
*
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
*
Expand Down Expand Up @@ -65,19 +64,19 @@ public class Shell
private char exeQuoteDelimiter = '\"';

/**
* Set the command to execute the shell (eg. COMMAND.COM, /bin/bash,...)
* Set the command to execute the shell (e.g. COMMAND.COM, /bin/bash,...).
*
* @param shellCommand The command
* @param shellCommand the command
*/
void setShellCommand( String shellCommand )
{
this.shellCommand = shellCommand;
}

/**
* Get the command to execute the shell
* Get the command to execute the shell.
*
* @return The command
* @return the command
*/
String getShellCommand()
{
Expand All @@ -86,7 +85,7 @@ String getShellCommand()

/**
* Set the shell arguments when calling a command line (not the executable arguments)
* (eg. /X /C for CMD.EXE)
* (e.g. /X /C for CMD.EXE).
*
* @param shellArgs the arguments to the shell
*/
Expand All @@ -99,7 +98,7 @@ void setShellArgs( String[] shellArgs )
/**
* Get the shell arguments
*
* @return The arguments
* @return the arguments
*/
String[] getShellArgs()
{
Expand All @@ -118,17 +117,17 @@ String[] getShellArgs()
*
* @param executableParameter executable that the shell has to call
* @param argumentsParameter arguments for the executable, not the shell
* @return List with one String object with executable and arguments quoted as needed
* @return list with one String object with executable and arguments quoted as needed
*/
List<String> getCommandLine( String executableParameter, String... argumentsParameter )
{
return getRawCommandLine( executableParameter, argumentsParameter );
}

/**
* @param executableParameter Executable.
* @param argumentsParameter The arguments for the executable.
* @return The list on command line.
* @param executableParameter Executable
* @param argumentsParameter the arguments for the executable
* @return the list on command line
*/
List<String> getRawCommandLine( String executableParameter, String... argumentsParameter )
{
Expand Down Expand Up @@ -211,7 +210,7 @@ char[] getEscapeChars( boolean includeSingleQuote, boolean includeDoubleQuote )
}

/**
* @return false in all cases.
* @return false in all cases
*/
protected boolean isDoubleQuotedArgumentEscaped()
{
Expand Down Expand Up @@ -354,7 +353,8 @@ public void setWorkingDirectory( String path )

/**
* Sets execution directory.
* @param workingDirectory The working directory.
*
* @param workingDirectory the working directory
*/
public void setWorkingDirectory( File workingDirectory )
{
Expand All @@ -365,7 +365,7 @@ public void setWorkingDirectory( File workingDirectory )
}

/**
* @return The working directory.
* @return the working directory
*/
public File getWorkingDirectory()
{
Expand Down

0 comments on commit cb448b9

Please sign in to comment.