Permalink
Browse files

Added class check to MethodMessageHandlerInspector

This is to make sure old instances are ignored after classloader change.

Issue #AXON-246 Fixed
  • Loading branch information...
abuijze committed Jul 16, 2014
1 parent 448f212 commit d7b1fbcc4a5469d4c818b3868dc7fefae84226ec
@@ -92,7 +92,9 @@ public static MethodMessageHandlerInspector getInstance(Class<?> handlerClass,
HandlerDefinition<? super Method> handlerDefinition) {
String key = handlerDefinition.toString() + "@" + handlerClass.getName();
MethodMessageHandlerInspector inspector = INSPECTORS.get(key);
- while (inspector == null || !inspector.parameterResolver.equals(parameterResolverFactory)) {
+ while (inspector == null
+ || !handlerClass.equals(inspector.getTargetType())
+ || !inspector.parameterResolver.equals(parameterResolverFactory)) {
final MethodMessageHandlerInspector newInspector = new MethodMessageHandlerInspector(
parameterResolverFactory,
handlerClass,

0 comments on commit d7b1fbc

Please sign in to comment.