aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-09-11 09:04:15 -0700
committerAndy Clement <aclement@pivotal.io>2019-09-11 09:04:15 -0700
commitfeacb252cb69a1ae7b0faeb0951847346f73c61d (patch)
tree31188148c6882721fab9bb00c9a2cc819472d4d7 /weaver
parentaa4e441fca78dfc36f6a78c0f7b922718f352b04 (diff)
downloadaspectj-feacb252cb69a1ae7b0faeb0951847346f73c61d.tar.gz
aspectj-feacb252cb69a1ae7b0faeb0951847346f73c61d.zip
543657: tweak to use current data rather than last known packed data
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/main/java/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
index b8ede0a9a..cca34bc12 100644
--- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
+++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelPerClauseAspectAdder.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.aspectj.weaver.bcel;
+import java.util.List;
+
import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.generic.InstructionBranch;
import org.aspectj.apache.bcel.generic.InstructionConstants;
@@ -31,7 +33,7 @@ import org.aspectj.weaver.patterns.PerClause;
/**
* Adds aspectOf(), hasAspect() etc to the annotation defined aspects
- *
+ *
* @author Alexandre Vasseur
* @author Andy Clement
*/
@@ -140,9 +142,8 @@ public class BcelPerClauseAspectAdder extends BcelTypeMunger {
}
private boolean hasPerClauseMembersAlready(LazyClassGen classGen) {
- ResolvedMember[] methods = classGen.getBcelObjectType().getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- ResolvedMember method = methods[i];
+ List<LazyMethodGen> methodGens = classGen.getMethodGens();
+ for (LazyMethodGen method: methodGens) {
if ("aspectOf".equals(method.getName())) {
if ("()".equals(method.getParameterSignature()) && (kind == PerClause.SINGLETON || kind == PerClause.PERCFLOW)) {
return true;
@@ -542,7 +543,7 @@ public class BcelPerClauseAspectAdder extends BcelTypeMunger {
/**
* Add standard Synthetic (if wished) and AjSynthetic (always) attributes
- *
+ *
* @param methodGen
* @param makeJavaSynthetic true if standard Synthetic attribute must be set as well (invisible to user)
*/