diff --git a/commons/src/main/java/org/eclipse/kapua/commons/event/ServiceInspector.java b/commons/src/main/java/org/eclipse/kapua/commons/event/ServiceInspector.java index da2eeba0770..3fa1b7f052a 100644 --- a/commons/src/main/java/org/eclipse/kapua/commons/event/ServiceInspector.java +++ b/commons/src/main/java/org/eclipse/kapua/commons/event/ServiceInspector.java @@ -75,7 +75,7 @@ public static List get KapuaRuntimeException.internalError(String.format("Invalid method signature: number of parameters %d, expected 1", paramsSize)); } Class paramClazz = enhancedMethod.getParameterTypes()[0]; - if (enhancedMethod.getParameterTypes()[0].equals(ServiceEvent.class)) { + if (!enhancedMethod.getParameterTypes()[0].equals(ServiceEvent.class)) { KapuaRuntimeException.internalError(String.format("Invalid method signature: type of parameters %s, expected ServiceEvent", paramClazz)); } } catch (NoSuchMethodException | SecurityException e1) {