This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver-ant-tasks.git
The following commit(s) were added to refs/heads/master by this push:
new e745a8e [MRESOLVER-209] Remove redundant local variables
e745a8e is described below
commit e745a8ef335775c204620f87c7751dbd891c4cc3
Author: Arturo Bernal <[email protected]>
AuthorDate: Sun Oct 3 09:37:25 2021 +0200
[MRESOLVER-209] Remove redundant local variables
This closes #8
---
.../maven/resolver/internal/ant/AntSettingsDecryptorFactory.java | 4 +---
.../org/apache/maven/resolver/internal/ant/ConverterUtils.java | 8 ++------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git
a/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
b/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
index e9bfe6a..bfa2e07 100644
---
a/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
+++
b/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
@@ -30,9 +30,7 @@ class AntSettingsDecryptorFactory
{
AntSecDispatcher secDispatcher = new AntSecDispatcher();
- DefaultSettingsDecrypter decrypter = new DefaultSettingsDecrypter(
secDispatcher );
-
- return decrypter;
+ return new DefaultSettingsDecrypter( secDispatcher );
}
}
diff --git
a/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
b/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
index 6452ec1..3e2d333 100644
--- a/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
+++ b/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
@@ -35,7 +35,6 @@ import
org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
import org.apache.tools.ant.Project;
import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.ArtifactProperties;
import org.eclipse.aether.artifact.ArtifactType;
import org.eclipse.aether.artifact.ArtifactTypeRegistry;
@@ -65,11 +64,8 @@ class ConverterUtils
props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH,
dependency.getSystemPath().getPath() );
}
- Artifact artifact =
- new DefaultArtifact( dependency.getGroupId(),
dependency.getArtifactId(), dependency.getClassifier(), null,
- dependency.getVersion(), props, type );
-
- return artifact;
+ return new DefaultArtifact( dependency.getGroupId(),
dependency.getArtifactId(), dependency.getClassifier(), null,
+ dependency.getVersion(), props, type );
}
public static org.eclipse.aether.repository.Authentication
toAuthentication( Authentication auth )