NullPointerException in AnnotationAwareOrderComparator#getPriority [SPR-16583] #21125
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
Uh oh!
There was an error while loading. Please reload this page.
Manish Kumar opened SPR-16583 and commented
This issue is similar to #20378 but at a different code location.
We have registered 2 instances of same bean, one is nullable and other is not-nullable. Now we use/inject these beans in some other components as follows:
We get NPE in Spring 5.0.3 while 4.3.10 used to work fine.
What we found that older version(4.3.10) of Spring had null check and then in 5.0.3 we seems to have removed it. See below code from AnnotationAwareOrderComparator class from 5.0.3.
Here if obj is NULL, NPE will happen. Spring-core 4.3.10 had NULL check for same. Below is code snippet from Spring-core 4.3.10 which has proper NULL check.
Affects: 5.0.3
Issue Links:
The text was updated successfully, but these errors were encountered: