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

   # Problem
   
   AnnotationUtils.equals(Annotation, Annotation) may incorrectly return false 
for equal annotations when the annotation type or its members are not 
reflectively accessible from the caller’s package.
   
   The root cause is twofold:
   
   * Annotation member methods are invoked reflectively without ensuring 
accessibility, which can trigger access-related ReflectiveOperationExceptions 
(e.g. for package-private annotations accessed from outside their package).
   * `ReflectiveOperationExceptions` are swallowed and treated as “not equal” 
by returning `false`, which hides reflection failure.
   
   This behavior violates the method’s documented intent to implement the 
equality semantics defined by `Annotation.equals(Object)` and makes the result 
depend on reflective accessibility rather than annotation content.
   
   This issue is tracked as 
[LANG-1815](https://issues.apache.org/jira/browse/LANG-1815).
   
   
   Before you push a pull request, review this list:
   
   - [x] Read the [contribution guidelines](CONTRIBUTING.md) for this project.
   - [x] Read the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) if you use 
Artificial Intelligence (AI).
   - [ ] I used AI to create any part of, or all of, this pull request. Which 
AI tool was used to create this pull request, and to what extent did it 
contribute?
   - [ ] Run a successful build using the default 
[Maven](https://maven.apache.org/) goal with `mvn`; that's `mvn` on the command 
line by itself.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied. This may not always be possible, 
but it is a best practice.
   - [X] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [ ] Each commit in the pull request should have a meaningful subject line 
and body. Note that a maintainer may squash commits during the merge process.
   


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