|
28 | 28 | import org.aopalliance.intercept.MethodInvocation; |
29 | 29 | import org.apache.commons.logging.Log; |
30 | 30 | import org.apache.commons.logging.LogFactory; |
31 | | -import org.aspectj.weaver.BCException; |
32 | 31 | import org.aspectj.weaver.patterns.NamePattern; |
33 | 32 | import org.aspectj.weaver.reflect.ReflectionWorld.ReflectionWorldException; |
34 | 33 | import org.aspectj.weaver.reflect.ShadowMatchImpl; |
@@ -259,11 +258,7 @@ public boolean matches(Class<?> targetClass) { |
259 | 258 | } |
260 | 259 | } |
261 | 260 | } |
262 | | - catch (BCException ex) { |
263 | | - logger.debug("PointcutExpression matching rejected target class", ex); |
264 | | - } |
265 | | - catch (IllegalStateException ex) { |
266 | | - // AspectJ 1.8.10: encountered invalid signature |
| 261 | + catch (Throwable ex) { |
267 | 262 | logger.debug("PointcutExpression matching rejected target class", ex); |
268 | 263 | } |
269 | 264 | return false; |
@@ -331,7 +326,6 @@ public boolean matches(Method method, Class<?> targetClass, Object... args) { |
331 | 326 | } |
332 | 327 | catch (IllegalStateException ex) { |
333 | 328 | // No current invocation... |
334 | | - // TODO: Should we really proceed here? |
335 | 329 | if (logger.isDebugEnabled()) { |
336 | 330 | logger.debug("Could not access current invocation - matching with limited context: " + ex); |
337 | 331 | } |
@@ -454,8 +448,8 @@ private ShadowMatch getShadowMatch(Method targetMethod, Method originalMethod) { |
454 | 448 | } |
455 | 449 | } |
456 | 450 | } |
457 | | - catch (IllegalStateException ex) { |
458 | | - // AspectJ 1.8.10: encountered invalid signature |
| 451 | + catch (Throwable ex) { |
| 452 | + // Possibly AspectJ 1.8.10 encountering an invalid signature |
459 | 453 | logger.debug("PointcutExpression matching rejected target method", ex); |
460 | 454 | fallbackExpression = null; |
461 | 455 | } |
|
0 commit comments