diff options
author | mkersten <mkersten> | 2003-07-25 12:39:49 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-07-25 12:39:49 +0000 |
commit | bcf8d044c05fb716e1161abddd18da04d2fc2364 (patch) | |
tree | f1b294cf2b0f0969fcf770a41be17e0fb71ba9de | |
parent | bf88b2e2010e79a1998d26798236b00e978bb88d (diff) | |
download | aspectj-bcf8d044c05fb716e1161abddd18da04d2fc2364.tar.gz aspectj-bcf8d044c05fb716e1161abddd18da04d2fc2364.zip |
Added BCEL API rule for enforcing use of Utility.copyInstruction method in order to work around a BCEL Instruction.copy bug.
-rw-r--r-- | weaver/ajsrc/org/aspectj/weaver/BcelApiRules.aj | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/weaver/ajsrc/org/aspectj/weaver/BcelApiRules.aj b/weaver/ajsrc/org/aspectj/weaver/BcelApiRules.aj new file mode 100644 index 000000000..515227107 --- /dev/null +++ b/weaver/ajsrc/org/aspectj/weaver/BcelApiRules.aj @@ -0,0 +1,24 @@ +
+package org.aspectj.weaver;
+
+import org.aspectj.weaver.*;
+import org.aspectj.weaver.bcel.*;
+import org.apache.bcel.generic.*;
+
+/**
+ * Enforces the use of BCEL API use.
+ */
+public aspect BcelApiRules {
+
+ /**
+ * The Utility method needs to be used instead of the BCEL method doue to a bug
+ * in the implementation of Instruction.copy()
+ */
+ declare error:
+ call(* Instruction.copy()) && within(org.aspectj.weaver..*)
+ && !withincode(* Utility.copyInstruction(Instruction)):
+ "use Utility.copyInstruction to work-around bug in Select.copy()";
+
+
+}
+
\ No newline at end of file |