1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

[288878] Method signature criteria in DsfSession.getEventHandlerMethods() incorrect. Also throw an exception if the method takes no parameters.

This commit is contained in:
John Cortell 2009-09-09 15:29:22 +00:00
parent 55abb6907c
commit ce83ec8fc0

View file

@ -485,7 +485,7 @@ public class DsfSession
for (Method method : methods) { for (Method method : methods) {
if (method.isAnnotationPresent(DsfServiceEventHandler.class)) { if (method.isAnnotationPresent(DsfServiceEventHandler.class)) {
Class<?>[] paramTypes = method.getParameterTypes(); Class<?>[] paramTypes = method.getParameterTypes();
if (paramTypes.length > 1) { if (paramTypes.length != 1) { // must have one and only param
throw new IllegalArgumentException("ServiceEventHandler method has incorrect number of parameters"); //$NON-NLS-1$ throw new IllegalArgumentException("ServiceEventHandler method has incorrect number of parameters"); //$NON-NLS-1$
} }
retVal.add(method); retVal.add(method);