From a79ca059e93b3f32e285e1c9655159c6868e0db2 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 15 Feb 2011 03:50:21 +0100 Subject: Delomboking multiple files still wasn't working right and would result in an IllegalStateException. Fixed. --- src/delombok/lombok/delombok/Delombok.java | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/delombok/lombok') 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; } } } -- cgit