aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-03-15 15:11:16 +0000
committeracolyer <acolyer>2004-03-15 15:11:16 +0000
commit2ed4c9f470df51b8621edda4451ad1768c36c1d5 (patch)
tree88c417ea4dab864f82c3155d4c35cd259d8ea04a /util
parent40680b6fe4d28b2d061fc4cf9b3efa6640c12f44 (diff)
downloadaspectj-2ed4c9f470df51b8621edda4451ad1768c36c1d5.tar.gz
aspectj-2ed4c9f470df51b8621edda4451ad1768c36c1d5.zip
move weaving to inside of the compiler.compile loop.
ensure messages are associated with source wherever possible
Diffstat (limited to 'util')
-rw-r--r--util/src/org/aspectj/util/FileUtil.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java
index c7663ae63..34bf103a9 100644
--- a/util/src/org/aspectj/util/FileUtil.java
+++ b/util/src/org/aspectj/util/FileUtil.java
@@ -341,10 +341,14 @@ public class FileUtil {
*/
public static String getBestPath(File file) {
LangUtil.throwIaxIfNull(file, "file");
- try {
- return file.getCanonicalPath();
- } catch (IOException e) {
- return file.getAbsolutePath();
+ if (file.exists()) {
+ try {
+ return file.getCanonicalPath();
+ } catch (IOException e) {
+ return file.getAbsolutePath();
+ }
+ } else {
+ return file.getPath();
}
}