aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-07-25 20:06:20 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-07-25 20:06:20 +0200
commit403f515aa28b94f223903c9d400bee3d4fa9b12e (patch)
tree41dfaf9fe9cfedef0e0c89331f000afedb5c8716 /src
parentb325214e82e7d65dde32e197ab932ba5cd0b43c6 (diff)
downloadlombok-403f515aa28b94f223903c9d400bee3d4fa9b12e.tar.gz
lombok-403f515aa28b94f223903c9d400bee3d4fa9b12e.tar.bz2
lombok-403f515aa28b94f223903c9d400bee3d4fa9b12e.zip
Delombok with a relative path and in 'output to directory' mode would NPE. Fixes issue #241.
Diffstat (limited to 'src')
-rw-r--r--src/delombok/lombok/delombok/Delombok.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index 91b7c93e..e125d622 100644
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -175,7 +175,7 @@ public class Delombok {
try {
for (String in : args.input) {
- File f = new File(in);
+ File f = new File(in).getAbsoluteFile();
if (f.isFile()) {
delombok.addFile(f.getParentFile(), f.getName());
} else if (f.isDirectory()) {
@@ -332,7 +332,7 @@ public class Delombok {
in.close();
}
}
-
+
public void addFile(File base, String fileName) throws IOException {
if (output != null && canonical(base).equals(canonical(output))) throw new IOException(
"DELOMBOK: Output file and input file refer to the same filesystem location. Specify a separate path for output.");