efegokdemir opened a new pull request, #184:
URL: https://github.com/apache/maven-shared-jar/pull/184

   Closes #145.
   
   `JarIdentificationAnalysis` previously chose the shortest or longest 
potential value when an exposer had not validated a field. Potential values do 
not retain source or confidence information, so string length cannot reliably 
distinguish the right value.
   
   The analysis now uses a potential value only when exactly one distinct, 
non-empty candidate exists. Conflicting candidates remain available through the 
potential-value getters, while the normalized field stays unset. Values 
explicitly set by exposers remain authoritative.
   
   Regression tests cover conflicting candidates for every field, the 
single-candidate fallback, preservation of explicit values, and ambiguous 
values in the existing JAR fixtures. The ambiguity regression fails against the 
original implementation, which selects `1.0` from `[1.0, 1.0.3]`.
   
   Validation:
   - `mvn -Dtest=JarIdentificationAnalyzerTest test` — 6 tests passed
   - `mvn test` — 94 tests passed
   - `mvn -Prun-its verify` — passed
   - `mvn spotless:check` — passed
   - `git diff --check` — passed
   
   ---
   
   To make clear that you license your contribution under the [Apache License 
Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to