diff --git a/addons/common/events/mongodb/src/main/java/org/kie/kogito/events/mongodb/codec/EventMongoDBCodecProvider.java b/addons/common/events/mongodb/src/main/java/org/kie/kogito/events/mongodb/codec/EventMongoDBCodecProvider.java index 778b1722a16..3b13948cf7d 100644 --- a/addons/common/events/mongodb/src/main/java/org/kie/kogito/events/mongodb/codec/EventMongoDBCodecProvider.java +++ b/addons/common/events/mongodb/src/main/java/org/kie/kogito/events/mongodb/codec/EventMongoDBCodecProvider.java @@ -32,10 +32,10 @@ public class EventMongoDBCodecProvider implements CodecProvider { @SuppressWarnings("unchecked") @Override public Codec get(Class aClass, CodecRegistry codecRegistry) { - if (aClass.isAssignableFrom(ProcessInstanceDataEvent.class)) { + if (ProcessInstanceDataEvent.class.isAssignableFrom(aClass)) { return (Codec) PROCESS_INSTANCE_DATA_EVENT_CODEC; } - if (aClass.isAssignableFrom(UserTaskInstanceDataEvent.class)) { + if (UserTaskInstanceDataEvent.class.isAssignableFrom(aClass)) { return (Codec) USER_TASK_INSTANCE_DATA_EVENT_CODEC; } return null;