summaryrefslogtreecommitdiffstats
path: root/weaver/src
diff options
context:
space:
mode:
authoraclement <aclement>2004-03-04 16:09:34 +0000
committeraclement <aclement>2004-03-04 16:09:34 +0000
commit5d73494d7d222b92cdbb19f860f9215a07430681 (patch)
tree53fd3155b5fb0602d253bc9dd0d9f6038a9b5855 /weaver/src
parent223951856673c27ebec5ffb61b929fadb4b6f567 (diff)
downloadaspectj-5d73494d7d222b92cdbb19f860f9215a07430681.tar.gz
aspectj-5d73494d7d222b92cdbb19f860f9215a07430681.zip
Fix for Bugzilla Bug 52394
inter-type declarations cause JRockit Crash
Diffstat (limited to 'weaver/src')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
index 514e92262..7c6ddb9fd 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
@@ -998,8 +998,13 @@ class BcelClassWeaver implements IClassWeaver {
}
private boolean isInitFailureHandler(InstructionHandle ih) {
- if (ih.getInstruction() instanceof PUTSTATIC) {
- String name = ((PUTSTATIC)ih.getInstruction()).getFieldName(cpg);
+ // Skip the astore_0 and aload_0 at the start of the handler and
+ // then check if the instruction following these is
+ // 'putstatic ajc$initFailureCause'. If it is then we are
+ // in the handler we created in AspectClinit.generatePostSyntheticCode()
+ InstructionHandle twoInstructionsAway = ih.getNext().getNext();
+ if (twoInstructionsAway.getInstruction() instanceof PUTSTATIC) {
+ String name = ((PUTSTATIC)twoInstructionsAway.getInstruction()).getFieldName(cpg);
if (name.equals(NameMangler.INITFAILURECAUSE_FIELD_NAME)) return true;
}
return false;