Add return type check on GetterPointcut

See gh-30068
This commit is contained in:
Enimiste
2023-03-05 21:58:42 +01:00
committed by Stephane Nicoll
parent c9e13575ca
commit d1dfac4e5d

View File

@@ -126,7 +126,8 @@ public abstract class Pointcuts {
@Override
public boolean matches(Method method, Class<?> targetClass) {
return (method.getName().startsWith("get") &&
method.getParameterCount() == 0);
method.getParameterCount() == 0 &&
method.getReturnType() != Void.TYPE);
}
private Object readResolve() {