Skip to content

Commit

Permalink
[WAGON-642] Uopgrade parent pom to 43 and fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Dec 31, 2024
1 parent dd25f2b commit e3727af
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven-parent</artifactId>
<version>41</version>
<version>43</version>
</parent>

<groupId>org.apache.maven.wagon</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.easymock.EasyMock.*;
import static org.easymock.EasyMock.anyInt;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.anyString;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.getCurrentArguments;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.reset;
import static org.easymock.EasyMock.verify;

/**
* @author <a href="mailto:[email protected]">Jason van Zyl</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ protected void writeDir(String header, SshFile path) throws IOException {
throw new IOException("Expected a D message but got '" + header + "'");
}

String perms = header.substring(1, 5);
int length = Integer.parseInt(header.substring(6, header.indexOf(' ', 6)));
String name = header.substring(header.indexOf(' ', 6) + 1);

Expand Down Expand Up @@ -309,7 +308,6 @@ protected void writeFile(String header, SshFile path) throws IOException {
throw new IOException("Expected a C message but got '" + header + "'");
}

String perms = header.substring(1, 5);
long length = Long.parseLong(header.substring(6, header.indexOf(' ', 6)));
String name = header.substring(header.indexOf(' ', 6) + 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ private void returnToParentDirectory(Resource resource) {
try {
String dir = ScpHelper.getResourceDirectory(resource.getName());
String[] dirs = PathUtils.dirnames(dir);
// CHECKSTYLE_OFF: UnusedLocalVariable
for (String d : dirs) {
channel.cd("..");
}
// CHECKSTYLE_ON: UnusedLocalVariable
} catch (SftpException e) {
fireTransferDebug("Error returning to parent directory: " + e.getMessage());
}
Expand Down

0 comments on commit e3727af

Please sign in to comment.