You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/06/23 18:53:53 UTC

[commons-jci] branch master updated: CompilingClassLoaderTestCase.compile() now throws IllegalStateException instead of RuntimeException when there is no compiler available

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jci.git


The following commit(s) were added to refs/heads/master by this push:
     new e64d32b  CompilingClassLoaderTestCase.compile() now throws IllegalStateException instead of RuntimeException when there is no compiler available
e64d32b is described below

commit e64d32b7edec09fdaa426127c8ae5503cccc0fe4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 14:53:49 2023 -0400

    CompilingClassLoaderTestCase.compile() now throws IllegalStateException
    instead of
    RuntimeException when there is no compiler available
---
 .../java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java b/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java
index 5c63641..4aa9674 100644
--- a/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java
+++ b/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java
@@ -65,7 +65,7 @@ public final class CompilingClassLoaderTestCase extends AbstractTestCase {
                     try {
                         data = SimpleDump.dump(new String(resourceContent));
                     } catch (final Exception e) {
-                        throw new RuntimeException("cannot handle resource " + resourcePath, e);
+                        throw new IllegalArgumentException("cannot handle resource " + resourcePath, e);
                     }
 
                 } else if ("jci2/Extended.java".equals(resourcePath)) {
@@ -73,11 +73,11 @@ public final class CompilingClassLoaderTestCase extends AbstractTestCase {
                     try {
                         data = ExtendedDump.dump();
                     } catch (final Exception e) {
-                        throw new RuntimeException("cannot handle resource " + resourcePath, e);
+                        throw new IllegalArgumentException("cannot handle resource " + resourcePath, e);
                     }
 
                 } else {
-                    throw new RuntimeException("cannot handle resource " + resourcePath);
+                    throw new IllegalArgumentException("cannot handle resource " + resourcePath);
                 }
 
                 log.debug("compiling " + resourcePath + " (" + data.length + ")");