Copilot commented on code in PR #817:
URL: https://github.com/apache/maven-wagon/pull/817#discussion_r3214975021
##########
wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagon.java:
##########
@@ -229,7 +229,18 @@ private void executeScpCommand(Resource resource, File
localFile, boolean put)
}
Commandline cl = createBaseCommandLine(putty, scpExecutable,
privateKey);
- cl.setWorkingDirectory(localFile.getParentFile().getAbsolutePath());
+ File parentFile = localFile.getParentFile();
+ if (null == parentFile) {
Review Comment:
The null-check style here (`null == parentFile`) is inconsistent with the
rest of this class/module (which uses `x != null` / `x == null`). Switching to
`parentFile == null` will keep the code consistent and easier to scan.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]