Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions src/main/java/org/apache/maven/shared/utils/cli/Commandline.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* @author thomas.haas@softwired-inc.com
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
*/
public class Commandline implements Cloneable {
public class Commandline {
private final List<Arg> arguments = new Vector<>();

private final Map<String, String> envVars = Collections.synchronizedMap(new LinkedHashMap<>());
Expand Down Expand Up @@ -302,15 +302,6 @@ public String toString() {
return StringUtils.join(getShellCommandline(true), " ");
}

/**
* Do not call. Always throws an UnsupportedOperationException.
*
* @throws UnsupportedOperationException
*/
public Object clone() {
throw new UnsupportedOperationException("Do we ever clone a commandline?");
}

/**
* Sets working directory.
*
Expand Down
14 changes: 1 addition & 13 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 @@ -36,7 +36,7 @@
*
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
*/
public class Shell implements Cloneable {
public class Shell {
private static final char[] DEFAULT_QUOTING_TRIGGER_CHARS = {' '};

private String shellCommand;
Expand Down Expand Up @@ -331,18 +331,6 @@ String getWorkingDirectoryAsString() {
return workingDir;
}

/**
* {@inheritDoc}
*/
public Object clone() {
throw new RuntimeException("Do we ever clone this?");
/* Shell shell = new Shell();
shell.setExecutable( getExecutable() );
shell.setWorkingDirectory( getWorkingDirectory() );
shell.setShellArgs( getShellArgs() );
return shell;*/
}

void setSingleQuotedArgumentEscaped(boolean singleQuotedArgumentEscaped) {
this.singleQuotedArgumentEscaped = singleQuotedArgumentEscaped;
}
Expand Down