aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-10-07 15:07:00 -0700
committerAndy Clement <aclement@gopivotal.com>2014-10-07 15:07:00 -0700
commit34cff6034e44295417149fdb85dd2cebac8c983f (patch)
tree0cde73e650ca32d0d6950b5718dd03ce195ca09e /weaver
parentc8e951296c5f95e82d4c7c3f8eb9b0a647014e20 (diff)
downloadaspectj-34cff6034e44295417149fdb85dd2cebac8c983f.tar.gz
aspectj-34cff6034e44295417149fdb85dd2cebac8c983f.zip
Fix 443477: remove pre-init from cflow to avoid verify error on jdk 1.7 later updates
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelShadow.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
index 8c51e0f49..e6676900f 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
@@ -2021,7 +2021,9 @@ public class BcelShadow extends Shadow {
public void weaveCflowEntry(final BcelAdvice munger, final Member cflowField) {
final boolean isPer = munger.getKind() == AdviceKind.PerCflowBelowEntry || munger.getKind() == AdviceKind.PerCflowEntry;
-
+ if (!isPer && getKind() == PreInitialization) {
+ return;
+ }
final Type objectArrayType = new ArrayType(Type.OBJECT, 1);
final InstructionFactory fact = getFactory();
@@ -2080,8 +2082,7 @@ public class BcelShadow extends Shadow {
entryInstructions.append(entrySuccessInstructions);
}
- // this is the same for both per and non-per
- weaveAfter(new BcelAdvice(null, null, null, 0, 0, 0, null, munger.getConcreteAspect()) {
+ BcelAdvice exitAdvice = new BcelAdvice(null, null, null, 0, 0, 0, null, munger.getConcreteAspect()) {
@Override
public InstructionList getAdviceInstructions(BcelShadow s, BcelVar extraArgVar, InstructionHandle ifNoAdvice) {
InstructionList exitInstructions = new InstructionList();
@@ -2100,7 +2101,13 @@ public class BcelShadow extends Shadow {
}
return exitInstructions;
}
- });
+ };
+// if (getKind() == PreInitialization) {
+// weaveAfterReturning(exitAdvice);
+// }
+// else {
+ weaveAfter(exitAdvice);
+// }
range.insert(entryInstructions, Range.InsideBefore);
}