aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-02-15 03:50:21 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-02-15 03:50:55 +0100
commita79ca059e93b3f32e285e1c9655159c6868e0db2 (patch)
tree222e629a80b325404193baad09ec3bb490701e76 /src/delombok
parent2c3b34704a4491c837d4385e3b3f7a4117de3d39 (diff)
downloadlombok-a79ca059e93b3f32e285e1c9655159c6868e0db2.tar.gz
lombok-a79ca059e93b3f32e285e1c9655159c6868e0db2.tar.bz2
lombok-a79ca059e93b3f32e285e1c9655159c6868e0db2.zip
Delomboking multiple files still wasn't working right and would result in an IllegalStateException. Fixed.
Diffstat (limited to 'src/delombok')
-rw-r--r--src/delombok/lombok/delombok/Delombok.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index a869f66d..91b7c93e 100644
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -173,8 +173,8 @@ public class Delombok {
if (args.classpath != null) delombok.setClasspath(args.classpath);
if (args.sourcepath != null) delombok.setSourcepath(args.sourcepath);
- for (String in : args.input) {
- try {
+ try {
+ for (String in : args.input) {
File f = new File(in);
if (f.isFile()) {
delombok.addFile(f.getParentFile(), f.getName());
@@ -185,18 +185,18 @@ public class Delombok {
} else {
if (!args.quiet) System.err.println("WARNING: not a standard file or directory - skipping: " + f);
}
-
- delombok.delombok();
- } catch (Exception e) {
- if (!args.quiet) {
- String msg = e.getMessage();
- if (msg != null && msg.startsWith("DELOMBOK: ")) System.err.println(msg.substring("DELOMBOK: ".length()));
- else {
- e.printStackTrace();
- }
- System.exit(1);
- return;
+ }
+
+ delombok.delombok();
+ } catch (Exception e) {
+ if (!args.quiet) {
+ String msg = e.getMessage();
+ if (msg != null && msg.startsWith("DELOMBOK: ")) System.err.println(msg.substring("DELOMBOK: ".length()));
+ else {
+ e.printStackTrace();
}
+ System.exit(1);
+ return;
}
}
}