Browse Source

264869: cope with badly formed source name attribute

tags/pre268419
aclement 15 years ago
parent
commit
9f80317172
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java

+ 7
- 1
org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java View File

@@ -179,8 +179,14 @@ public abstract class ShadowMunger implements PartialOrder.PartialComparable, IH
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 = f.getPath().substring(0, i) + ".class";
String path = null;
if (i != -1) {
path = f.getPath().substring(0, i) + ".class";
} else {
path = f.getPath() + ".class";
}
binaryFile = new File(s + "!" + path);
}
return binaryFile;

Loading…
Cancel
Save