From b74ad8f4c4bd13608f21552e1df664b56bd37db8 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 22 Feb 2006 15:19:38 +0000 Subject: [PATCH] optimization: minor performance tweak --- .../aspectj/weaver/bcel/BcelAttributes.java | 20 ++++++++++--------- 1 file 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); + } } } } -- 2.39.5