aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--weaver/ajsrc/org/aspectj/weaver/BcelApiRules.aj24
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