|
1 | 1 | /* |
2 | | - * Copyright 2002-2015 the original author or authors. |
| 2 | + * Copyright 2002-2016 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
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; |
@@ -258,11 +257,7 @@ public boolean matches(Class<?> targetClass) { |
258 | 257 | } |
259 | 258 | } |
260 | 259 | } |
261 | | - catch (BCException ex) { |
262 | | - logger.debug("PointcutExpression matching rejected target class", ex); |
263 | | - } |
264 | | - catch (IllegalStateException ex) { |
265 | | - // AspectJ 1.8.10: encountered invalid signature |
| 260 | + catch (Throwable ex) { |
266 | 261 | logger.debug("PointcutExpression matching rejected target class", ex); |
267 | 262 | } |
268 | 263 | return false; |
@@ -330,7 +325,6 @@ public boolean matches(Method method, Class<?> targetClass, Object... args) { |
330 | 325 | } |
331 | 326 | catch (IllegalStateException ex) { |
332 | 327 | // No current invocation... |
333 | | - // TODO: Should we really proceed here? |
334 | 328 | if (logger.isDebugEnabled()) { |
335 | 329 | logger.debug("Could not access current invocation - matching with limited context: " + ex); |
336 | 330 | } |
@@ -453,8 +447,8 @@ private ShadowMatch getShadowMatch(Method targetMethod, Method originalMethod) { |
453 | 447 | } |
454 | 448 | } |
455 | 449 | } |
456 | | - catch (IllegalStateException ex) { |
457 | | - // AspectJ 1.8.10: encountered invalid signature |
| 450 | + catch (Throwable ex) { |
| 451 | + // Possibly AspectJ 1.8.10 encountering an invalid signature |
458 | 452 | logger.debug("PointcutExpression matching rejected target method", ex); |
459 | 453 | fallbackExpression = null; |
460 | 454 | } |
|
0 commit comments