NPE w/ overloaded methods on class validated with MethodValidationInterceptor

Description

This has been spawned from a forum posting.
If a bean validated with the MethodValidationInterceptor has two methods with the same name that are prefixed with get/has/is, calling one of these methods will result in a NullPointerException.

Code snippet example:
Problem experienced when calling following methods on method validated bean.

Workaround:

or:

I'm not aware of a workaround that doesn't involve having to change the interface!
A detailed description with some code references is available here:
https://forum.hibernate.org/viewtopic.php?f=9&t=1016470&p=2456768#p2456768

Environment

None

Status

Assignee

Gunnar Morling

Reporter

Louis Burton

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure