Add return type check on GetterPointcut
See gh-30068
This commit is contained in:
committed by
Stephane Nicoll
parent
c9e13575ca
commit
d1dfac4e5d
@@ -126,7 +126,8 @@ public abstract class Pointcuts {
|
|||||||
@Override
|
@Override
|
||||||
public boolean matches(Method method, Class<?> targetClass) {
|
public boolean matches(Method method, Class<?> targetClass) {
|
||||||
return (method.getName().startsWith("get") &&
|
return (method.getName().startsWith("get") &&
|
||||||
method.getParameterCount() == 0);
|
method.getParameterCount() == 0 &&
|
||||||
|
method.getReturnType() != Void.TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object readResolve() {
|
private Object readResolve() {
|
||||||
|
|||||||
Reference in New Issue
Block a user