diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java index 7afa71d298..3613f131dd 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java @@ -50,7 +50,6 @@ import org.codehaus.mojo.versions.api.PomHelper; import org.codehaus.mojo.versions.api.Segment; import org.codehaus.mojo.versions.ordering.InvalidSegmentException; -import org.codehaus.mojo.versions.ordering.MajorMinorIncrementalFilter; import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader; import org.codehaus.mojo.versions.utils.DependencyBuilder; @@ -151,8 +150,6 @@ private void useLatestReleases( ModifiedPomXMLEventReader pom, Collection unchangedSegment = determineUnchangedSegment( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); - MajorMinorIncrementalFilter majorMinorIncfilter = - new MajorMinorIncrementalFilter( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); for ( Dependency dep : dependencies ) { @@ -185,10 +182,9 @@ private void useLatestReleases( ModifiedPomXMLEventReader pom, Collection 0 ) { String newVersion = filteredVersions[filteredVersions.length - 1].toString(); diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java index 023265a752..50ee454d9f 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java @@ -48,7 +48,6 @@ import org.codehaus.mojo.versions.api.PomHelper; import org.codehaus.mojo.versions.api.Segment; import org.codehaus.mojo.versions.ordering.InvalidSegmentException; -import org.codehaus.mojo.versions.ordering.MajorMinorIncrementalFilter; import org.codehaus.mojo.versions.ordering.VersionComparator; import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader; import org.codehaus.mojo.versions.utils.DependencyBuilder; @@ -151,8 +150,6 @@ private void useLatestSnapshots( ModifiedPomXMLEventReader pom, Collection unchangedSegment = determineUnchangedSegment( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); - MajorMinorIncrementalFilter majorMinorIncfilter = - new MajorMinorIncrementalFilter( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); for ( Dependency dep : dependencies ) { @@ -201,6 +198,7 @@ private void useLatestSnapshots( ModifiedPomXMLEventReader pom, Collection snapshotsOnly = new ArrayList<>(); @@ -212,13 +210,8 @@ private void useLatestSnapshots( ModifiedPomXMLEventReader pom, Collection 0 ) { latestVersion = filteredVersions[filteredVersions.length - 1].toString(); diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java index 172da4e174..fd10d8a537 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java @@ -45,7 +45,6 @@ import org.codehaus.mojo.versions.api.PomHelper; import org.codehaus.mojo.versions.api.Segment; import org.codehaus.mojo.versions.ordering.InvalidSegmentException; -import org.codehaus.mojo.versions.ordering.MajorMinorIncrementalFilter; import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader; import org.codehaus.mojo.versions.utils.DependencyBuilder; @@ -167,8 +166,6 @@ private void useLatestVersions( ModifiedPomXMLEventReader pom, Collection unchangedSegment = determineUnchangedSegment( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); - MajorMinorIncrementalFilter majorMinorIncfilter = - new MajorMinorIncrementalFilter( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); for ( Dependency dep : dependencies ) { @@ -199,10 +196,10 @@ private void useLatestVersions( ModifiedPomXMLEventReader pom, Collection 0 ) { String newVersion = filteredVersions[filteredVersions.length - 1].toString(); diff --git a/src/main/java/org/codehaus/mojo/versions/api/AbstractVersionDetails.java b/src/main/java/org/codehaus/mojo/versions/api/AbstractVersionDetails.java index 8f0fff4f1f..1d03bcdc2c 100644 --- a/src/main/java/org/codehaus/mojo/versions/api/AbstractVersionDetails.java +++ b/src/main/java/org/codehaus/mojo/versions/api/AbstractVersionDetails.java @@ -266,6 +266,7 @@ public final ArtifactVersion[] getNewerVersions( String versionString, Optional< : getVersionComparator().incrementSegment( lowerBound, upperBoundSegment.get() ); Restriction restriction = new Restriction( lowerBound, allowDowngrade, upperBound, allowDowngrade ); + // TODO shouldn't allowDowngrade boolean be passed to this call ? return getVersions( restriction, includeSnapshots ); }