Skip to content

Commit

Permalink
mojohaus#632 Fixed lower and upper bounds to keep milestones and rcs …
Browse files Browse the repository at this point in the history
…in the right majors.
  • Loading branch information
sultan committed Sep 18, 2022
1 parent 6b7d3b8 commit ace04fa
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,8 @@ public final int getSegmentCount( ArtifactVersion v )
*/
public final ArtifactVersion incrementSegment( ArtifactVersion v, Segment segment ) throws InvalidSegmentException
{
if ( VersionComparators.isSnapshot( v ) )
{
return VersionComparators.copySnapshot( v, innerIncrementSegment( VersionComparators.stripSnapshot( v ),
segment ) );
}
int segmentCount = getSegmentCount( v );
if ( segment.value() >= segmentCount )
{
throw new InvalidSegmentException( segment, segmentCount, v );
}
return innerIncrementSegment( v, segment );
return VersionComparators.copySnapshot( v, innerIncrementSegment( VersionComparators.stripSnapshot( v ),
segment ) );
}

protected abstract ArtifactVersion innerIncrementSegment( ArtifactVersion v, Segment segment )
Expand Down

0 comments on commit ace04fa

Please sign in to comment.