diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java index 7e843fc7d..e19d0c174 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java @@ -171,7 +171,7 @@ private void useLatestSnapshots( ModifiedPomXMLEventReader pom, Collection= 0 ? versionComparator.incrementSegment( lowerBound, segment, false ) : null; getLog().info( "Upper bound: " + ( upperBound == null ? "none" : upperBound.toString() ) ); diff --git a/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java index abdc1d4e4..56441842d 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java @@ -153,7 +153,7 @@ private void useNextSnapshots( ModifiedPomXMLEventReader pom, Collection= 0 ? versionComparator.incrementSegment( lowerBound, segment, false ) : null; getLog().info( "Upper bound: " + ( upperBound == null ? "none" : upperBound.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 64fdd9efb..62c1f98dc 100644 --- a/src/main/java/org/codehaus/mojo/versions/api/AbstractVersionDetails.java +++ b/src/main/java/org/codehaus/mojo/versions/api/AbstractVersionDetails.java @@ -290,8 +290,7 @@ public final ArtifactVersion getOldestVersion( ArtifactVersion lowerBound, Artif return getOldestVersion( restriction, includeSnapshots ); } - public final ArtifactVersion getOldestVersion( Restriction restriction, - boolean includeSnapshots ) + public final ArtifactVersion getOldestVersion( Restriction restriction, boolean includeSnapshots ) { return getOldestVersion( null, restriction, includeSnapshots ); } @@ -357,16 +356,19 @@ public final ArtifactVersion[] getVersions( VersionRange versionRange, Restricti } public final ArtifactVersion getOldestUpdate( ArtifactVersion currentVersion, UpdateScope updateScope ) + throws InvalidSegmentException { return getOldestUpdate( currentVersion, updateScope, isIncludeSnapshots() ); } public final ArtifactVersion getNewestUpdate( ArtifactVersion currentVersion, UpdateScope updateScope ) + throws InvalidSegmentException { return getNewestUpdate( currentVersion, updateScope, isIncludeSnapshots() ); } public final ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, UpdateScope updateScope ) + throws InvalidSegmentException { return getAllUpdates( currentVersion, updateScope, isIncludeSnapshots() ); } diff --git a/src/main/java/org/codehaus/mojo/versions/api/PropertyVersions.java b/src/main/java/org/codehaus/mojo/versions/api/PropertyVersions.java index a121d4ae4..3ad451e2a 100644 --- a/src/main/java/org/codehaus/mojo/versions/api/PropertyVersions.java +++ b/src/main/java/org/codehaus/mojo/versions/api/PropertyVersions.java @@ -36,6 +36,7 @@ import org.apache.maven.artifact.versioning.ArtifactVersion; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; +import org.apache.maven.artifact.versioning.Restriction; import org.apache.maven.artifact.versioning.VersionRange; import org.apache.maven.project.MavenProject; import org.codehaus.mojo.versions.Property; @@ -342,25 +343,25 @@ public ArtifactVersion getNewestVersion( String currentVersion, Property propert ? VersionRange.createFromVersionSpec( property.getVersion() ) : null; helper.getLog().debug( "Property ${" + property.getName() + "}: Restricting results to " + range ); - ArtifactVersion lowerBoundArtifactVersion = helper.createArtifactVersion( currentVersion ); + ArtifactVersion lowerBound = helper.createArtifactVersion( currentVersion ); if ( allowDowngrade ) { - Optional updatedVersion = getLowerBound( lowerBoundArtifactVersion, unchangedSegment ); - lowerBoundArtifactVersion = updatedVersion.map( helper::createArtifactVersion ).orElse( null ); + Optional updatedVersion = getLowerBound( lowerBound, unchangedSegment ); + lowerBound = updatedVersion.map( helper::createArtifactVersion ).orElse( null ); } if ( helper.getLog().isDebugEnabled() ) { - helper.getLog().debug( "lowerBoundArtifactVersion: " + lowerBoundArtifactVersion ); + helper.getLog().debug( "lowerBoundArtifactVersion: " + lowerBound ); } ArtifactVersion upperBound = null; if ( unchangedSegment != -1 ) { - upperBound = getVersionComparator().incrementSegment( lowerBoundArtifactVersion, unchangedSegment, true ); + upperBound = getVersionComparator().incrementSegment( lowerBound, unchangedSegment, true ); helper.getLog().debug( "Property ${" + property.getName() + "}: upperBound is: " + upperBound ); } - ArtifactVersion result = - getNewestVersion( range, lowerBoundArtifactVersion, upperBound, includeSnapshots, false, false ); + Restriction restriction = new Restriction( lowerBound, false, upperBound, false ); + ArtifactVersion result = getNewestVersion( range, restriction, includeSnapshots ); helper.getLog().debug( "Property ${" + property.getName() + "}: Current winner is: " + result ); @@ -427,7 +428,8 @@ private ArtifactVersion getNewestVersion( String currentVersion, VersionsHelper { upperBound = getVersionComparator().incrementSegment( lowerBound, segment, true ); } - return getNewestVersion( range, lowerBound, upperBound, includeSnapshots, false, false ); + Restriction restriction = new Restriction( lowerBound, false, upperBound, false ); + return getNewestVersion( range, restriction, includeSnapshots ); } private final class PropertyVersionComparator diff --git a/src/main/java/org/codehaus/mojo/versions/api/UpdateScope.java b/src/main/java/org/codehaus/mojo/versions/api/UpdateScope.java index 32ca0a5cf..dcae67a2f 100644 --- a/src/main/java/org/codehaus/mojo/versions/api/UpdateScope.java +++ b/src/main/java/org/codehaus/mojo/versions/api/UpdateScope.java @@ -26,6 +26,7 @@ import java.util.Map; import org.apache.maven.artifact.versioning.ArtifactVersion; +import org.apache.maven.artifact.versioning.Restriction; import org.codehaus.mojo.versions.ordering.InvalidSegmentException; import org.codehaus.mojo.versions.ordering.VersionComparator; @@ -58,9 +59,9 @@ public ArtifactVersion getOldestUpdate( VersionDetails versionDetails, ArtifactV { return null; } - ArtifactVersion lowerBound = currentVersion; ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 2, true ); - return versionDetails.getOldestVersion( lowerBound, upperBound, includeSnapshots, false, false ); + Restriction restriction = new Restriction( currentVersion, false, upperBound, false ); + return versionDetails.getOldestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -79,9 +80,9 @@ public ArtifactVersion getNewestUpdate( VersionDetails versionDetails, ArtifactV { return null; } - ArtifactVersion lowerBound = currentVersion; ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 2, true ); - return versionDetails.getNewestVersion( lowerBound, upperBound, includeSnapshots, false, false ); + Restriction restriction = new Restriction( currentVersion, false, upperBound, false ); + return versionDetails.getNewestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -100,9 +101,9 @@ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactV { return null; } - ArtifactVersion lowerBound = currentVersion; ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 2, true ); - return versionDetails.getVersions( lowerBound, upperBound, includeSnapshots, false, false ); + Restriction restriction = new Restriction( currentVersion, false, upperBound, false ); + return versionDetails.getVersions( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -133,7 +134,8 @@ public ArtifactVersion getOldestUpdate( VersionDetails versionDetails, ArtifactV } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 2, true ); ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 1, true ); - return versionDetails.getOldestVersion( lowerBound, upperBound, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, upperBound, false ); + return versionDetails.getOldestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -154,7 +156,8 @@ public ArtifactVersion getNewestUpdate( VersionDetails versionDetails, ArtifactV } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 2, true ); ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 1, true ); - return versionDetails.getNewestVersion( lowerBound, upperBound, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, upperBound, false ); + return versionDetails.getNewestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -175,7 +178,8 @@ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactV } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 2, true ); ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 1, true ); - return versionDetails.getVersions( lowerBound, upperBound, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, upperBound, false ); + return versionDetails.getVersions( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -206,7 +210,8 @@ public ArtifactVersion getOldestUpdate( VersionDetails versionDetails, ArtifactV } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 1, true ); ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 0, true ); - return versionDetails.getOldestVersion( lowerBound, upperBound, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, upperBound, false ); + return versionDetails.getOldestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -227,7 +232,8 @@ public ArtifactVersion getNewestUpdate( VersionDetails versionDetails, ArtifactV } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 1, true ); ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 0, true ); - return versionDetails.getNewestVersion( lowerBound, upperBound, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, upperBound, false ); + return versionDetails.getNewestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -248,7 +254,8 @@ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactV } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 1, true ); ArtifactVersion upperBound = versionComparator.incrementSegment( currentVersion, 0, true ); - return versionDetails.getVersions( lowerBound, upperBound, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, upperBound, false ); + return versionDetails.getVersions( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -278,7 +285,8 @@ public ArtifactVersion getOldestUpdate( VersionDetails versionDetails, ArtifactV return null; } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 0, true ); - return versionDetails.getOldestVersion( lowerBound, null, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, null, false ); + return versionDetails.getOldestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -298,7 +306,8 @@ public ArtifactVersion getNewestUpdate( VersionDetails versionDetails, ArtifactV return null; } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 0, true ); - return versionDetails.getNewestVersion( lowerBound, null, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, null, false ); + return versionDetails.getNewestVersion( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -318,7 +327,8 @@ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactV return null; } ArtifactVersion lowerBound = versionComparator.incrementSegment( currentVersion, 0, true ); - return versionDetails.getVersions( lowerBound, null, includeSnapshots, true, false ); + Restriction restriction = new Restriction( lowerBound, true, null, false ); + return versionDetails.getVersions( restriction, includeSnapshots ); } catch ( InvalidSegmentException e ) { @@ -339,21 +349,24 @@ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactV public ArtifactVersion getOldestUpdate( VersionDetails versionDetails, ArtifactVersion currentVersion, boolean includeSnapshots ) { - return versionDetails.getOldestVersion( currentVersion, null, includeSnapshots, false, false ); + Restriction restriction = new Restriction( currentVersion, false, null, false ); + return versionDetails.getOldestVersion( restriction, includeSnapshots ); } /** {@inheritDoc} */ public ArtifactVersion getNewestUpdate( VersionDetails versionDetails, ArtifactVersion currentVersion, boolean includeSnapshots ) { - return versionDetails.getNewestVersion( currentVersion, null, includeSnapshots, false, false ); + Restriction restriction = new Restriction( currentVersion, false, null, false ); + return versionDetails.getNewestVersion( restriction, includeSnapshots ); } /** {@inheritDoc} */ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactVersion currentVersion, boolean includeSnapshots ) { - return versionDetails.getVersions( currentVersion, null, includeSnapshots, false, false ); + Restriction restriction = new Restriction( currentVersion, false, null, false ); + return versionDetails.getVersions( restriction, includeSnapshots ); } }; @@ -564,8 +577,6 @@ public static UpdateScope classifyUpdate( VersionComparator comparator, Artifact for ( int segment = Math.min( comparator.getSegmentCount( from ), comparator.getSegmentCount( to ) ); segment > 0; segment-- ) { - // TODO check whether true can be passed as forceSnapshot parameter. - // but, can't test since classifyUpdate method is never called ArtifactVersion f = comparator.incrementSegment( from, segment - 1, false ); f = comparator.incrementSegment( f, segment - 1, false ); ArtifactVersion t = comparator.incrementSegment( to, segment - 1, false ); diff --git a/src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java b/src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java index 399efbeda..e61d7c728 100644 --- a/src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java +++ b/src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java @@ -141,8 +141,7 @@ public interface VersionDetails * @return the latest version between currentVersion and upperBound or null if no version is available. * @since 1.0-alpha-3 */ - ArtifactVersion getNewestVersion( ArtifactVersion lowerBound, ArtifactVersion upperBound, - boolean includeSnapshots ); + ArtifactVersion getNewestVersion( ArtifactVersion lowerBound, ArtifactVersion upperBound, boolean includeSnapshots ); /** * Returns the latest version newer than the specified current version, but less than the specified upper bound or @@ -209,8 +208,7 @@ ArtifactVersion getNewestVersion( ArtifactVersion lowerBound, ArtifactVersion up * @return the latest version between currentVersion and upperBound or null if no version is available. * @since 1.0-beta-1 */ - ArtifactVersion getOldestVersion( ArtifactVersion lowerBound, ArtifactVersion upperBound, - boolean includeSnapshots ); + ArtifactVersion getOldestVersion( ArtifactVersion lowerBound, ArtifactVersion upperBound, boolean includeSnapshots ); /** * Returns the oldest version within the specified bounds or null if no such version exists. @@ -235,7 +233,7 @@ ArtifactVersion getOldestVersion( ArtifactVersion lowerBound, ArtifactVersion up ArtifactVersion getOldestVersion( VersionRange versionRange, Restriction restriction, boolean includeSnapshots ); /** - * Returns the oldest version newer than the specified current version, but within the the specified update scope or + * Returns the oldest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -248,7 +246,7 @@ ArtifactVersion getOldestUpdate( ArtifactVersion currentVersion, UpdateScope upd throws InvalidSegmentException; /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -261,7 +259,7 @@ ArtifactVersion getNewestUpdate( ArtifactVersion currentVersion, UpdateScope upd throws InvalidSegmentException; /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param currentVersion the lower bound or null if the lower limit is unbounded. * @param updateScope the update scope to include. @@ -272,7 +270,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, UpdateScope upd throws InvalidSegmentException; /** - * Returns the oldest version newer than the specified current version, but within the the specified update scope or + * Returns the oldest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -286,7 +284,7 @@ ArtifactVersion getOldestUpdate( ArtifactVersion currentVersion, UpdateScope upd boolean includeSnapshots ) throws InvalidSegmentException; /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -300,7 +298,7 @@ ArtifactVersion getNewestUpdate( ArtifactVersion currentVersion, UpdateScope upd boolean includeSnapshots ) throws InvalidSegmentException; /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param currentVersion the lower bound or null if the lower limit is unbounded. * @param updateScope the update scope to include. @@ -312,7 +310,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, UpdateScope upd boolean includeSnapshots ) throws InvalidSegmentException; /** - * Returns the oldest version newer than the specified current version, but within the the specified update scope or + * Returns the oldest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -324,7 +322,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, UpdateScope upd ArtifactVersion getOldestUpdate( ArtifactVersion currentVersion, VersionRange versionRange ); /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -336,7 +334,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, UpdateScope upd ArtifactVersion getNewestUpdate( ArtifactVersion currentVersion, VersionRange versionRange ); /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param currentVersion the lower bound or null if the lower limit is unbounded. * @param versionRange the version range to include. @@ -346,7 +344,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, UpdateScope upd ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange versionRange ); /** - * Returns the oldest version newer than the specified current version, but within the the specified update scope or + * Returns the oldest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -360,7 +358,7 @@ ArtifactVersion getOldestUpdate( ArtifactVersion currentVersion, VersionRange ve boolean includeSnapshots ); /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param currentVersion the lower bound or null if the lower limit is unbounded. @@ -374,7 +372,7 @@ ArtifactVersion getNewestUpdate( ArtifactVersion currentVersion, VersionRange ve boolean includeSnapshots ); /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param currentVersion the lower bound or null if the lower limit is unbounded. * @param versionRange the version range to include. @@ -422,7 +420,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getCurrentVersion(); /** - * Returns the oldest version newer than the current version, but within the the specified update scope or + * Returns the oldest version newer than the current version, but within the specified update scope or * null if no such version exists. * * @param updateScope the update scope to include. @@ -433,7 +431,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getOldestUpdate( UpdateScope updateScope ) throws InvalidSegmentException; /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param updateScope the update scope to include. @@ -444,7 +442,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getNewestUpdate( UpdateScope updateScope ) throws InvalidSegmentException; /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param updateScope the update scope to include. * @return the all versions after currentVersion within the specified update scope. @@ -453,7 +451,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion[] getAllUpdates( UpdateScope updateScope ) throws InvalidSegmentException; /** - * Returns the oldest version newer than the specified current version, but within the the specified update scope or + * Returns the oldest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param updateScope the update scope to include. @@ -462,10 +460,11 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve * version is available. * @since 1.0-beta-1 */ - ArtifactVersion getOldestUpdate( UpdateScope updateScope, boolean includeSnapshots ) throws InvalidSegmentException; + ArtifactVersion getOldestUpdate( UpdateScope updateScope, + boolean includeSnapshots ) throws InvalidSegmentException; /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param updateScope the update scope to include. @@ -474,20 +473,22 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve * version is available. * @since 1.0-beta-1 */ - ArtifactVersion getNewestUpdate( UpdateScope updateScope, boolean includeSnapshots ) throws InvalidSegmentException; + ArtifactVersion getNewestUpdate( UpdateScope updateScope, + boolean includeSnapshots ) throws InvalidSegmentException; /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param updateScope the update scope to include. * @param includeSnapshots true if snapshots are to be included. * @return the all versions after currentVersion within the specified update scope. * @since 1.0-beta-1 */ - ArtifactVersion[] getAllUpdates( UpdateScope updateScope, boolean includeSnapshots ) throws InvalidSegmentException; + ArtifactVersion[] getAllUpdates( UpdateScope updateScope, + boolean includeSnapshots ) throws InvalidSegmentException; /** - * Returns the oldest version newer than the current version, but within the the specified update scope or + * Returns the oldest version newer than the current version, but within the specified update scope or * null if no such version exists. * * @param versionRange the version range to include. @@ -498,7 +499,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getOldestUpdate( VersionRange versionRange ); /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param versionRange the version range to include. @@ -509,7 +510,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getNewestUpdate( VersionRange versionRange ); /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param versionRange the version range to include. * @return the all versions after currentVersion within the specified update scope. @@ -518,7 +519,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion[] getAllUpdates( VersionRange versionRange ); /** - * Returns the oldest version newer than the specified current version, but within the the specified update scope or + * Returns the oldest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param versionRange the version range to include. @@ -530,7 +531,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getOldestUpdate( VersionRange versionRange, boolean includeSnapshots ); /** - * Returns the newest version newer than the specified current version, but within the the specified update scope or + * Returns the newest version newer than the specified current version, but within the specified update scope or * null if no such version exists. * * @param versionRange the version range to include. @@ -542,7 +543,7 @@ ArtifactVersion[] getAllUpdates( ArtifactVersion currentVersion, VersionRange ve ArtifactVersion getNewestUpdate( VersionRange versionRange, boolean includeSnapshots ); /** - * Returns the all versions newer than the specified current version, but within the the specified update scope. + * Returns the all versions newer than the specified current version, but within the specified update scope. * * @param versionRange the version range to include. * @param includeSnapshots true if snapshots are to be included.