summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2006-02-22 15:21:16 +0000
committeraclement <aclement>2006-02-22 15:21:16 +0000
commit5a11d89a94c19851b85e014041664b360aa6b1b0 (patch)
tree98524c228e0dd99bb0ac03810d535be16e595fa8 /weaver
parentb74ad8f4c4bd13608f21552e1df664b56bd37db8 (diff)
downloadaspectj-5a11d89a94c19851b85e014041664b360aa6b1b0.tar.gz
aspectj-5a11d89a94c19851b85e014041664b360aa6b1b0.zip
optimization: less string manipulation
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
index 527e7369b..b40fa9b93 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
@@ -1679,15 +1679,16 @@ class BcelClassWeaver implements IClassWeaver {
private boolean match(LazyMethodGen mg) {
BcelShadow enclosingShadow;
-
List shadowAccumulator = new ArrayList();
+
+ boolean startsAngly = mg.getName().charAt(0)=='<';
// we want to match ajsynthetic constructors...
- if (mg.getName().equals("<init>")) {
+ if (startsAngly && mg.getName().equals("<init>")) {
return matchInit(mg, shadowAccumulator);
} else if (!shouldWeaveBody(mg)) { //.isAjSynthetic()) {
return false;
} else {
- if (mg.getName().equals("<clinit>")) {
+ if (startsAngly && mg.getName().equals("<clinit>")) {
clinitShadow = enclosingShadow = BcelShadow.makeStaticInitialization(world, mg);
//System.err.println(enclosingShadow);
} else if (mg.isAdviceMethod()) {
@@ -1720,7 +1721,7 @@ class BcelClassWeaver implements IClassWeaver {
}
}
// FIXME asc change from string match if we can, rather brittle. this check actually prevents field-exec jps
- if (canMatch(enclosingShadow.getKind()) && !mg.getName().startsWith("ajc$interFieldInit")) {
+ if (canMatch(enclosingShadow.getKind()) && !(mg.getName().charAt(0)=='a' && mg.getName().startsWith("ajc$interFieldInit"))) {
if (match(enclosingShadow, shadowAccumulator)) {
enclosingShadow.init();
}