@@ -434,9 +434,15 @@ private ShadowMatch getTargetShadowMatch(Method method, @Nullable Class<?> targe
434434 // Note: AspectJ is only going to take Method.getDeclaringClass() into account.
435435 Set <Class <?>> ifcs = ClassUtils .getAllInterfacesForClassAsSet (targetClass );
436436 if (ifcs .size () > 1 ) {
437- Class <?> compositeInterface = ClassUtils .createCompositeInterface (
438- ClassUtils .toClassArray (ifcs ), targetClass .getClassLoader ());
439- targetMethod = ClassUtils .getMostSpecificMethod (targetMethod , compositeInterface );
437+ try {
438+ Class <?> compositeInterface = ClassUtils .createCompositeInterface (
439+ ClassUtils .toClassArray (ifcs ), targetClass .getClassLoader ());
440+ targetMethod = ClassUtils .getMostSpecificMethod (targetMethod , compositeInterface );
441+ }
442+ catch (IllegalArgumentException ex ) {
443+ // Implemented interfaces probably expose conflicting method signatures...
444+ // Proceed with original target method.
445+ }
440446 }
441447 }
442448 return getShadowMatch (targetMethod , method );
@@ -561,6 +567,19 @@ public String toString() {
561567 return sb .toString ();
562568 }
563569
570+ //---------------------------------------------------------------------
571+ // Serialization support
572+ //---------------------------------------------------------------------
573+
574+ private void readObject (ObjectInputStream ois ) throws IOException , ClassNotFoundException {
575+ // Rely on default serialization, just initialize state after deserialization.
576+ ois .defaultReadObject ();
577+
578+ // Initialize transient fields.
579+ // pointcutExpression will be initialized lazily by checkReadyToMatch()
580+ this .shadowMatchCache = new ConcurrentHashMap <>(32 );
581+ }
582+
564583
565584 /**
566585 * Handler for the Spring-specific {@code bean()} pointcut designator
@@ -657,20 +676,6 @@ private boolean matchesBean(String advisedBeanName) {
657676 }
658677
659678
660- //---------------------------------------------------------------------
661- // Serialization support
662- //---------------------------------------------------------------------
663-
664- private void readObject (ObjectInputStream ois ) throws IOException , ClassNotFoundException {
665- // Rely on default serialization, just initialize state after deserialization.
666- ois .defaultReadObject ();
667-
668- // Initialize transient fields.
669- // pointcutExpression will be initialized lazily by checkReadyToMatch()
670- this .shadowMatchCache = new ConcurrentHashMap <>(32 );
671- }
672-
673-
674679 private static class DefensiveShadowMatch implements ShadowMatch {
675680
676681 private final ShadowMatch primary ;
0 commit comments