aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2008-07-08 15:45:10 +0000
committeraclement <aclement>2008-07-08 15:45:10 +0000
commit91fe127af954767d54f972c032eb716de10467d3 (patch)
tree4c975bcc443c365605dfc8c0302b08113c95aea8 /weaver
parentf8c24e135998cea81deb38a5d66752e73e463a83 (diff)
downloadaspectj-91fe127af954767d54f972c032eb716de10467d3.tar.gz
aspectj-91fe127af954767d54f972c032eb716de10467d3.zip
239910: fix
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index 32414f0ce..5ffa45184 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -290,8 +290,9 @@ public class BcelWeaver {
ClassParser parser = new ClassParser(new ByteArrayInputStream(bytes),name);
JavaClass jc = parser.parse();
ResolvedType type = world.addSourceObjectType(jc).getResolvedTypeX();
+ if (!type.isAspect()) return;
String typeName = type.getName().replace('.', File.separatorChar);
- int end = name.lastIndexOf(typeName);
+ int end = name.indexOf(typeName+".class");
String binaryPath = null;
// if end is -1 then something wierd happened, the class file is not in the correct place, something like
// bin/A.class when the declaration for A specifies it is in a package.
@@ -300,10 +301,8 @@ public class BcelWeaver {
} else {
binaryPath = name.substring(0,end-1);
}
- type.setBinaryPath(binaryPath);
- if (type.isAspect()) {
- toList.add(type);
- }
+ type.setBinaryPath(binaryPath);
+ toList.add(type);
}