From 5888327fab3ed2b7e39b93a70fd0a8ba30a83e20 Mon Sep 17 00:00:00 2001 From: Johan Raedemaeker Date: Tue, 11 Sep 2012 11:45:21 +0200 Subject: Fixed bug iterating the wrong list in filterNonPreviousVersions --- .../src/main/java/org/semver/enforcer/AbstractEnforcerRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java b/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java index 7394e25..2faafb2 100755 --- a/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java +++ b/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java @@ -190,7 +190,7 @@ public abstract class AbstractEnforcerRule implements EnforcerRule { protected final List filterNonPreviousVersions(final List availableVersions, final Version version) { final List versions = new ArrayList(); - for (final ArtifactVersion artifactVersion : versions) { + for (final ArtifactVersion artifactVersion : availableVersions) { if (version.compareTo(Version.parse(artifactVersion.toString())) > 0) { versions.add(artifactVersion); } -- cgit v1.2.3