Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractVersionDetails.getLowerBound has the 1-off problem #5

Closed
jarmoniuk opened this issue Sep 1, 2022 · 0 comments
Closed

AbstractVersionDetails.getLowerBound has the 1-off problem #5

jarmoniuk opened this issue Sep 1, 2022 · 0 comments
Assignees

Comments

@jarmoniuk
Copy link
Owner

segment appears to be 0-based

However, the method in the description appears to have the 1-off problem:

protected String getLowerBound( ArtifactVersion version, int segment )
    {
        if ( segment < 0 )
        {
            return null;
        }

        int segmentCount = getVersionComparator().getSegmentCount( version );
        if ( segment > segmentCount )
        {
            throw new InvalidSegmentException( segment, segmentCount,
                    version.toString() );
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant