agamal026 opened a new pull request, #1826:
URL: https://github.com/apache/commons-lang/pull/1826

   ## Problem
   
   [LANG-1323](https://issues.apache.org/jira/browse/LANG-1323): generic-array 
and parameterized types built by `TypeUtils` compare equal to the corresponding 
JDK reflection types but return different hashes. A `HashMap` or `HashSet` 
containing one representation can therefore fail lookup with the other.
   
   ## Change
   
   Use the component type's hash for `GenericArrayTypeImpl`, and combine the 
argument-array, owner and raw-type hashes with XOR for `ParameterizedTypeImpl`. 
The production diff changes only these two private `hashCode()` methods.
   
   The wildcard correction in #1807 is preserved. This addresses the two 
remaining implementations identified in [that 
review](https://github.com/apache/commons-lang/pull/1807#discussion_r4177989738).
   
   The new parameterized regression covers 14 reflected type shapes, including 
generic arrays, nested parameterized types, static and parameterized owners, a 
nongeneric inner member, type variables, and wildcard compositions. Each case 
checks symmetric equality, equal hashes, and map/set lookup in both directions 
using public reflection APIs.
   
   Java SE does not specify these interfaces' exact hash algorithms. The 
regression checks interoperability with the executing JDK; no OpenJDK 
implementation source was copied.
   
   ## Validation
   
   The submitted source is `9f75a9a6c2fcbc3d287a170827f2efe861cbe90d`, based on 
`c89cdf682fe21b0c39759cf58186ed5336a105d4`. The [complete evidence 
packet](https://github.com/agamal026/commons-lang/blob/6fd756a0fa747006553f86ca1bc9e3ce4b4d6d7c/contribution-review/LANG-1323/README.md)
 preserves commands, source hashes, outcomes, logs, and independent automated 
review.
   
   - **Before/after:** all 14 new cases fail on unchanged production and pass 
with the fix. The complete local `TypeUtilsTest` reports 510 cases, zero 
failures/errors, and one existing disabled test.
   - **Required default Maven build:** completed on Temurin 17.0.20.1+1 and 
Maven 3.9.16. Its 316 suites contain 88,157 cases, zero failures/errors, and 18 
skips. The configured license, style, compatibility, static-analysis, coverage 
and documentation gates completed. An earlier Javadoc certificate-validation 
failure and its environment-only correction are retained in the packet.
   - **Hosted validation:** [all 18 ordinary default-Maven 
jobs](https://github.com/agamal026/commons-lang/actions/runs/39162942665) 
passed for Java 8, 11, 17, 21, 25 and 27 on Ubuntu, Windows and macOS. The 
tested merge has identical source, tests, POM and Maven workflow to the 
submitted source; its only differences are four removed schedule lines in the 
owned fork. Runtime-specific counts and existing skips are recorded per job.
   - **Experimental Java 28:** the tolerated job failed in 40 date-parser 
cases, while `TypeUtilsTest` passed. A [control at the exact unchanged upstream 
base](https://github.com/agamal026/commons-lang/actions/runs/39163962620) using 
the same Java build reproduced all 40 failure summaries. The control covers the 
two affected date-parser classes. Separate JaCoCo class-version diagnostics and 
the incomplete experimental-log retrieval remain documented; the overall green 
workflow is not described as all 19 jobs passing.
   - **Analysis:** CodeQL completed for Java and JavaScript. Dependency Review 
passed after enabling its fork prerequisite and retrying the failed job; the 
first attempt is retained.
   
   ## AI provenance
   
   OpenAI ChatGPT (GPT-6 Astra) generated the production change, new tests, 
verification orchestration and this description. Separate AI agents reviewed 
the exact source and execution evidence. The commits include `Generated-by` 
provenance. Automated review is not represented as personal human review.
   
   ## Contribution checklist
   
   - [x] Read the contribution guidelines and ASF Generative Tooling Guidance.
   - [x] Disclosed the AI tool and its scope above.
   - [x] Completed a successful build using the project's default Maven goals.
   - [x] Added behavior tests that fail without the production fix.
   - [x] Explained the problem, change and verification scope.
   - [x] Used logical commits with meaningful LANG-1323 subjects and bodies.
   


-- 
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