Skip to content

Conversation

marschall
Copy link
Contributor

AutowiredAnnotationBeanPostProcessor.determineRequiredStatus never
checks the return value of ReflectionUtils.findMethod. This method
returns null for @Inject @value @resource in which case a
NullPointerException is thrown in ReflectionUtils.invokeMethod and
caught in AutowiredAnnotationBeanPostProcessor.determineRequiredStatus.

  • check return value of ReflectionUtils.findMethod
  • default to required if no required method is found
  • existing test cases cover both cases

Issue: SPR-9316

AutowiredAnnotationBeanPostProcessor.determineRequiredStatus never
checks the return value of ReflectionUtils.findMethod. This method
returns null for @Inject @value @resource in which case a
NullPointerException is thrown in ReflectionUtils.invokeMethod and
caught in AutowiredAnnotationBeanPostProcessor.determineRequiredStatus.

 - check return value of ReflectionUtils.findMethod
 - default to required if no required method is found
 - existing test cases cover both cases

Issue: SPR-9316
@cbeams
Copy link
Contributor

cbeams commented Apr 13, 2012

Hi Phillipe,

Could you indicate whether you've signed the CLA, per the contributor guidelines? Thanks.

@marschall
Copy link
Contributor Author

Yes I did. Do you need my confirmation number?

@cbeams
Copy link
Contributor

cbeams commented Apr 14, 2012

No, just need to know that it's been done. Please add a note to your other open pull requests to this effect as well, thanks!

cbeams added a commit that referenced this pull request May 16, 2012
* SPR-9316:
  Avoid NPE in AutowiredAnnotationBeanPostProcessor
@cbeams
Copy link
Contributor

cbeams commented May 16, 2012

Thanks Philippe! This is merged.

@cbeams cbeams closed this May 16, 2012
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jun 20, 2016
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jun 20, 2016
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jul 13, 2016
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants