apache / apache/maven-artifact-plugin

RangesUtil: fully-open version range (,) is not detected

Open Beginner friendly
#247 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14
Forks
23
Avg merge
1h 27m
Merged PRs (30d)
8

Description

`RangesUtil.isVersionRange()` (lines 139-143) misses fully-open ranges:

```java
if (versionConstraint.getRange() != null) {
return !Objects.equals(
versionConstraint.getRange().getLowerBound(),
versionConstraint.getRange().getUpperBound());
}
```

For a completely open range such as `(,)` both bounds are `null`, so `Objects.equals(null, null)` returns `true` and the range is *not* flagged. A fully-open range is the least reproducible dependency specification and is exactly what this goal should report.

Suggested fix: treat `(,)` (both bounds null or one bound null) as a version range.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at RangesUtil.isVersionRange(), specifically lines 139-143, and inspect how the lower and upper bounds are compared. Verify behavior for a fully open range such as `(,)`, including cases where either bound is null. Done means fully open and partially open ranges are reported as version ranges without changing the handling of bounded ranges.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.