CPD Results
The following document contains the results of PMD's CPD 6.55.0.
Duplications
| File | Line |
|---|---|
| gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderSubcommand.java | 97 |
| gov/nist/secauto/oscal/tools/cli/core/commands/profile/ResolveSubcommand.java | 169 |
throw new InvalidArgumentException("Both a source and destination argument must be provided.");
}
File source = new File(extraArgs.get(0));
if (!source.exists()) {
throw new InvalidArgumentException("The provided source '" + source.getPath() + "' does not exist.");
}
if (!source.canRead()) {
throw new InvalidArgumentException("The provided source '" + source.getPath() + "' is not readable.");
}
}
@Override
public ICommandExecutor newExecutor(CallingContext callingContext, CommandLine cmdLine) {
return ICommandExecutor.using(callingContext, cmdLine, this::executeCommand);
}
@SuppressWarnings({
"PMD.OnlyOneReturn", // readability
"unused"
})
protected ExitStatus executeCommand(
@NonNull CallingContext callingContext,
@NonNull CommandLine cmdLine) {
List<String> extraArgs = cmdLine.getArgList();
Path destination = resolvePathAgainstCWD(ObjectUtils.notNull(Paths.get(extraArgs.get(1)))); // .toAbsolutePath(); | |
