diff --git a/pom.xml b/pom.xml index 0f9e152e..7e2af9a7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven maven-parent - 41 + 43 org.apache.maven.wagon diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java index b0953cc5..15914220 100644 --- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java +++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java @@ -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 Jason van Zyl diff --git a/wagon-providers/wagon-ssh-common-test/src/main/java/org/apache/maven/wagon/providers/ssh/ScpCommand.java b/wagon-providers/wagon-ssh-common-test/src/main/java/org/apache/maven/wagon/providers/ssh/ScpCommand.java index 4142e293..c192ea07 100644 --- a/wagon-providers/wagon-ssh-common-test/src/main/java/org/apache/maven/wagon/providers/ssh/ScpCommand.java +++ b/wagon-providers/wagon-ssh-common-test/src/main/java/org/apache/maven/wagon/providers/ssh/ScpCommand.java @@ -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); @@ -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); diff --git a/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java b/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java index a9ec7064..71048ed1 100644 --- a/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java +++ b/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagon.java @@ -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()); }