diff options
author | aclement <aclement> | 2006-02-22 15:19:38 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-02-22 15:19:38 +0000 |
commit | b74ad8f4c4bd13608f21552e1df664b56bd37db8 (patch) | |
tree | e61ebcb93af2c0c343523a1bedabe2d1cf144714 | |
parent | d161bfa34064dcd3b424648e5e8f91a1f10f4023 (diff) | |
download | aspectj-b74ad8f4c4bd13608f21552e1df664b56bd37db8.tar.gz aspectj-b74ad8f4c4bd13608f21552e1df664b56bd37db8.zip |
optimization: minor performance tweak
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java b/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java index 067aaae7f..61cd8057b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java @@ -40,15 +40,17 @@ class BcelAttributes { if (a instanceof Unknown) { Unknown u = (Unknown) a; String name = u.getName(); - if (name.startsWith(AjAttribute.AttributePrefix)) { - if (name.endsWith(WeaverVersionInfo.AttributeName)) { - version = (AjAttribute.WeaverVersionInfo)AjAttribute.read(version,name,u.getBytes(),context,msgHandler); - if (version.getMajorVersion() > WeaverVersionInfo.getCurrentWeaverMajorVersion()) { - throw new BCException("Unable to continue, this version of AspectJ supports classes built with weaver version "+ - WeaverVersionInfo.toCurrentVersionString()+" but the class "+classname+" is version "+version.toString()); - } - } - forSecondPass.add(a); + if (name.charAt(0)=='o') { // 'o'rg.aspectj + if (name.startsWith(AjAttribute.AttributePrefix)) { + if (name.endsWith(WeaverVersionInfo.AttributeName)) { + version = (AjAttribute.WeaverVersionInfo)AjAttribute.read(version,name,u.getBytes(),context,msgHandler); + if (version.getMajorVersion() > WeaverVersionInfo.getCurrentWeaverMajorVersion()) { + throw new BCException("Unable to continue, this version of AspectJ supports classes built with weaver version "+ + WeaverVersionInfo.toCurrentVersionString()+" but the class "+classname+" is version "+version.toString()); + } + } + forSecondPass.add(a); + } } } } |