]> source.dussan.org Git - aspectj.git/commitdiff
271201: inpath handles for jars
authoraclement <aclement>
Tue, 7 Apr 2009 22:20:27 +0000 (22:20 +0000)
committeraclement <aclement>
Tue, 7 Apr 2009 22:20:27 +0000 (22:20 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java

index 0500d6f0949450b1987c39464116672815eb7e9f..39cac57c3a8ca162ab2b75acd5e5941b77bead57 100644 (file)
@@ -178,16 +178,20 @@ public abstract class ShadowMunger implements PartialOrder.PartialComparable, IH
        private File getBinaryFile() {
                if (binaryFile == null) {
                        String s = getDeclaringType().getBinaryPath();
-                       File f = getDeclaringType().getSourceLocation().getSourceFile();
-                       // Replace the source file suffix with .class
-                       int i = f.getPath().lastIndexOf('.');
-                       String path = null;
-                       if (i != -1) {
-                               path = f.getPath().substring(0, i) + ".class";
+                       if (s.indexOf("!")==-1) {
+                               File f = getDeclaringType().getSourceLocation().getSourceFile();
+                               // Replace the source file suffix with .class
+                               int i = f.getPath().lastIndexOf('.');
+                               String path = null;
+                               if (i != -1) {
+                                       path = f.getPath().substring(0, i) + ".class";
+                               } else {
+                                       path = f.getPath() + ".class";
+                               }
+                               binaryFile = new File(s + "!" + path);
                        } else {
-                               path = f.getPath() + ".class";
+                               binaryFile = new File(s);
                        }
-                       binaryFile = new File(s + "!" + path);
                }
                return binaryFile;
        }