diff options
author | mikaelpeltier <mikaelpeltier@google.com> | 2015-02-27 15:02:13 +0100 |
---|---|---|
committer | mikaelpeltier <mikaelpeltier@google.com> | 2015-02-27 15:16:57 +0100 |
commit | f07072818f16d77f9c217a01bbe924c620d54668 (patch) | |
tree | ee6af6b87e9405eb569fcdbd9e01ffe46d65641d | |
parent | 5118d8beb90ee958eb4b6c05b01b9df087cb8897 (diff) | |
download | toolchain_jack-f07072818f16d77f9c217a01bbe924c620d54668.zip toolchain_jack-f07072818f16d77f9c217a01bbe924c620d54668.tar.gz toolchain_jack-f07072818f16d77f9c217a01bbe924c620d54668.tar.bz2 |
run method of Jack does not longer throws NothingToDoException
Change-Id: If55f57f449a7a8d01573721b22d4fea306ed537e
-rw-r--r-- | jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java | 5 | ||||
-rw-r--r-- | jack/src/com/android/jack/CommandLine.java | 2 | ||||
-rw-r--r-- | jack/src/com/android/jack/Jack.java | 4 |
3 files changed, 3 insertions, 8 deletions
diff --git a/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java b/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java index 77b74fb..3dab0b3 100644 --- a/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java +++ b/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java @@ -67,7 +67,7 @@ public class CommandLineErrorTest { } /** - * Checks that compilation fails correctly when no source files are passed to ecj. + * Checks that compilation end correctly when no source files are passed to ecj. */ @Test public void testCommandLineError002() throws Exception { @@ -84,9 +84,6 @@ public class CommandLineErrorTest { .addToClasspath(ite.getJackFolder()) .srcToExe(ite.getOutputDexFolder(), /* zipFile = */ false, ite.getSourceFolder()); - Assert.fail(); - } catch (NothingToDoException e) { - // Failure is ok since there is no source files. } finally { Assert.assertEquals("", errOut.toString()); Assert.assertTrue(out.toString().contains("Usage:")); diff --git a/jack/src/com/android/jack/CommandLine.java b/jack/src/com/android/jack/CommandLine.java index ca07392..526056c 100644 --- a/jack/src/com/android/jack/CommandLine.java +++ b/jack/src/com/android/jack/CommandLine.java @@ -69,8 +69,6 @@ public abstract class CommandLine { pe = e; throw e.getCause(); } - } catch (NothingToDoException e1) { - // End normally since there is nothing to do } catch (ConfigurationException exceptions) { System.err.println(exceptions.getNextExceptionCount() + " error" + (exceptions.getNextExceptionCount() > 1 ? "s" : "") diff --git a/jack/src/com/android/jack/Jack.java b/jack/src/com/android/jack/Jack.java index e5ad087..239b895 100644 --- a/jack/src/com/android/jack/Jack.java +++ b/jack/src/com/android/jack/Jack.java @@ -384,12 +384,10 @@ public abstract class Jack { * @param options options for the compiler. * @throws ConfigurationException thrown from the configuration framework. * @throws IllegalOptionsException thrown when an {@code Options} is not valid. - * @throws NothingToDoException thrown when there is nothing to compile. * @throws ProcessException thrown during schedulable execution */ public static void run(@Nonnull Options options) throws IllegalOptionsException, - NothingToDoException, ConfigurationException, JackUserException, ProcessException { boolean assertEnable = false; @@ -641,6 +639,8 @@ public abstract class Jack { } finally { event.end(); } + } catch (NothingToDoException e1) { + // End normally since there is nothing to do } finally { hooks.runHooks(); |