You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/04/17 20:45:50 UTC
[maven-enforcer] 01/01: remove unused, deprecated field
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch depre
in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git
commit 711a6924f1cfbc88c7a9bf5c63103bd1cffe73c5
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Fri Apr 17 16:45:35 2020 -0400
remove unused, deprecated field
---
.gitignore | 2 ++
.../org/apache/maven/plugins/enforcer/RequirePluginVersions.java | 2 +-
.../org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java | 7 +------
.../apache/maven/plugins/enforcer/TestRequirePluginVersions.java | 6 +++---
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/.gitignore b/.gitignore
index 6e0a5c5..907eb16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@ target
.settings
.classpath
.project
+.checkstyle
+
diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
index 34f0f20..1570adc 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
@@ -647,7 +647,7 @@ public class RequirePluginVersions
if ( isValidVersion( version ) )
{
- helper.getLog().debug( "checking for notEmpty and notIsWhiespace(): " + version );
+ helper.getLog().debug( "checking for notEmpty and notIsWhitespace(): " + version );
if ( banRelease && version.equals( "RELEASE" ) )
{
return false;
diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
index c122e10..ef6a38c 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
@@ -40,9 +40,6 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
public class EnforcerRuleUtils
{
- /** The factory. */
- ArtifactFactory factory;
-
/** The resolver. */
ArtifactResolver resolver;
@@ -63,7 +60,7 @@ public class EnforcerRuleUtils
/**
* Instantiates a new enforcer rule utils.
*
- * @param theFactory the the factory
+ * @param theFactory unused
* @param theResolver the the resolver
* @param theLocal the the local
* @param theRemoteRepositories the the remote repositories
@@ -74,7 +71,6 @@ public class EnforcerRuleUtils
List<ArtifactRepository> theRemoteRepositories, MavenProject project, Log theLog )
{
super();
- this.factory = theFactory;
this.resolver = theResolver;
this.local = theLocal;
this.remoteRepositories = theRemoteRepositories;
@@ -95,7 +91,6 @@ public class EnforcerRuleUtils
// helper.
try
{
- factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class );
resolver = (ArtifactResolver) helper.getComponent( ArtifactResolver.class );
local = (ArtifactRepository) helper.evaluate( "${localRepository}" );
project = (MavenProject) helper.evaluate( "${project}" );
diff --git a/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestRequirePluginVersions.java b/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestRequirePluginVersions.java
index 64290af..48974cd 100644
--- a/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestRequirePluginVersions.java
+++ b/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestRequirePluginVersions.java
@@ -51,10 +51,10 @@ public class TestRequirePluginVersions
// setup the plugins. I'm setting up the foo group
// with a few bogus entries and then a real one.
- // this is to test that the list is exhaustively
+ // to test that the list is exhaustively
// searched for versions before giving up.
// banLatest/Release will fail if it is found
- // anywhere in the list
+ // anywhere in the list.
List<Plugin> plugins = new ArrayList<Plugin>();
plugins.add( EnforcerTestUtils.newPlugin( "group", "a-artifact", "1.0" ) );
plugins.add( EnforcerTestUtils.newPlugin( "group", "foo", null ) );
@@ -93,7 +93,7 @@ public class TestRequirePluginVersions
rule.setBanLatest( true );
assertFalse( rule.hasValidVersionSpecified( helper, source, pluginWrappers ) );
- // check that LATEST is exhausively checked
+ // check that LATEST is exhaustively checked
rule.setBanSnapshots( false );
source.setArtifactId( "f-artifact" );
assertFalse( rule.hasValidVersionSpecified( helper, source, pluginWrappers ) );