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 19:29:03 UTC
[commons-jelly] branch master updated (214ab6df -> 8a32a662)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jelly.git
from 214ab6df Bump commons-parent from 56 to 58
new 35d30f47 [core] Throw a specialized RuntimeException instead of RuntimeException
new 65a24263 [jelly-tags] Throw a specialized RuntimeException instead of RuntimeException
new 319e375d Deprecate NestedRuntimeException for RuntimeException
new 1ac3380d Deprecate NestedRuntimeException for RuntimeException
new 8a32a662 [jelly-tags] Throw a specialized RuntimeException instead of RuntimeException
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../commons/jelly/util/NestedRuntimeException.java | 40 ++++------------------
.../commons/jelly/tags/soap/StringInputStream.java | 3 +-
.../commons/jelly/tags/threads/JellyThread.java | 2 +-
src/changes/changes.xml | 5 +++
4 files changed, 14 insertions(+), 36 deletions(-)
[commons-jelly] 04/05: Deprecate NestedRuntimeException for RuntimeException
Posted by gg...@apache.org.
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-jelly.git
commit 1ac3380da1ead1f856740ded7db26bb1360fa835
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 15:28:17 2023 -0400
Deprecate NestedRuntimeException for RuntimeException
---
src/changes/changes.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b5de9188..e0ead26a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,11 @@ The <action> type attribute can be add,update,fix,remove.
<body>
<release version="1.1.0" date="YYYY-MM-DD" description="Java 8 required.">
+ <!-- ADD -->
+ <!-- FIX -->
+ <action type="fix" due-to="ggregory">Deprecate NestedRuntimeException for RuntimeException.</action>
+ <action type="fix" due-to="ggregory">Deprecate NestedRuntimeException for RuntimeException.</action>
+ <!-- UPDATE -->
<action type="update" due-to="ggregory">Bump Java from 7 to 8.</action>
<action type="update" due-to="ggregory">Bump commons-parent from 42 to 58.</action>
</release>
[commons-jelly] 02/05: [jelly-tags] Throw a specialized RuntimeException instead of RuntimeException
Posted by gg...@apache.org.
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-jelly.git
commit 65a24263948814a0c3eb18d6cf4284d25af8bad5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 15:08:40 2023 -0400
[jelly-tags] Throw a specialized RuntimeException instead of
RuntimeException
---
.../java/org/apache/commons/jelly/tags/soap/StringInputStream.java | 3 ++-
.../main/java/org/apache/commons/jelly/tags/threads/JellyThread.java | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java b/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java
index 361a92ac..0df4acf8 100644
--- a/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java
+++ b/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java
@@ -20,6 +20,7 @@ package org.apache.commons.jelly.tags.soap;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
+import java.io.UncheckedIOException;
/**
* Wraps a String as an InputStream. Note that data will be lost for
@@ -82,7 +83,7 @@ public class StringInputStream
}
catch ( IOException ioe )
{
- throw new RuntimeException( ioe.getMessage() );
+ throw new UncheckedIOException( ioe.getMessage(), ioe );
}
}
diff --git a/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java b/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java
index 2d88caa2..1c7f0ad6 100644
--- a/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java
+++ b/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java
@@ -101,7 +101,7 @@ public class JellyThread extends Thread {
*/
public void waitUntilDone(long howLong) throws TimeoutException {
if (Thread.currentThread() == this) {
- throw new RuntimeException("This method should be called from a different thread than itself");
+ throw new IllegalStateException("This method should be called from a different thread than itself");
}
// wait until the calling thread can acquire the lock
[commons-jelly] 01/05: [core] Throw a specialized RuntimeException instead of RuntimeException
Posted by gg...@apache.org.
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-jelly.git
commit 35d30f4782e93b9c66881d0303ee6495a6f85cfc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 15:08:23 2023 -0400
[core] Throw a specialized RuntimeException instead of
RuntimeException
---
.../commons/jelly/util/NestedRuntimeException.java | 31 +++-------------------
1 file changed, 4 insertions(+), 27 deletions(-)
diff --git a/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java b/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java
index c03db9cb..85f2defa 100644
--- a/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java
+++ b/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java
@@ -35,16 +35,11 @@ import java.io.PrintWriter;
* </pre>
*
* @author James Strachan
+ * @deprecated Use {@link RuntimeException}.
*/
-
+@Deprecated
public class NestedRuntimeException extends RuntimeException {
- /**
- * Holds the reference to the exception or error that caused
- * this exception to be thrown.
- */
- private Throwable cause = null;
-
/**
* Constructs a new <code>NestedRuntimeException</code> with specified
* nested <code>Throwable</code>.
@@ -53,8 +48,7 @@ public class NestedRuntimeException extends RuntimeException {
* thrown
*/
public NestedRuntimeException(Throwable cause) {
- super(cause.getMessage());
- this.cause = cause;
+ super(cause);
}
/**
@@ -66,24 +60,7 @@ public class NestedRuntimeException extends RuntimeException {
* thrown
*/
public NestedRuntimeException(String msg, Throwable cause) {
- super(msg);
- this.cause = cause;
- }
-
- public Throwable getCause() {
- return cause;
- }
-
- public void printStackTrace() {
- cause.printStackTrace();
- }
-
- public void printStackTrace(PrintStream out) {
- cause.printStackTrace(out);
- }
-
- public void printStackTrace(PrintWriter out) {
- cause.printStackTrace(out);
+ super(msg, cause);
}
}
[commons-jelly] 03/05: Deprecate NestedRuntimeException for RuntimeException
Posted by gg...@apache.org.
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-jelly.git
commit 319e375d2880edd36ea33337e2777f9f1f45e3f1
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 15:28:10 2023 -0400
Deprecate NestedRuntimeException for RuntimeException
---
.../org/apache/commons/jelly/util/NestedRuntimeException.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java b/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java
index 85f2defa..625f992b 100644
--- a/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java
+++ b/core/src/main/java/org/apache/commons/jelly/util/NestedRuntimeException.java
@@ -17,15 +17,12 @@
package org.apache.commons.jelly.util;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
/**
* A {@link RuntimeException} which is nested to preserve stack traces.
- *
+ * <p>
* This class allows the following code to be written to convert a regular
* Exception into a {@link RuntimeException} without losing the stack trace.
- *
+ * </p>
* <pre>
* try {
* ...
@@ -33,8 +30,6 @@ import java.io.PrintWriter;
* throw new RuntimeException(e);
* }
* </pre>
- *
- * @author James Strachan
* @deprecated Use {@link RuntimeException}.
*/
@Deprecated
[commons-jelly] 05/05: [jelly-tags] Throw a specialized RuntimeException instead of RuntimeException
Posted by gg...@apache.org.
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-jelly.git
commit 8a32a662bd7bf4857d4ecbe0f74603c5ec4c85da
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 23 15:28:58 2023 -0400
[jelly-tags] Throw a specialized RuntimeException instead of
RuntimeException
---
src/changes/changes.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e0ead26a..c63be777 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -49,7 +49,7 @@ The <action> type attribute can be add,update,fix,remove.
<release version="1.1.0" date="YYYY-MM-DD" description="Java 8 required.">
<!-- ADD -->
<!-- FIX -->
- <action type="fix" due-to="ggregory">Deprecate NestedRuntimeException for RuntimeException.</action>
+ <action type="fix" due-to="ggregory">Throw specialized RuntimeExceptions instead of plain RuntimeExceptions.</action>
<action type="fix" due-to="ggregory">Deprecate NestedRuntimeException for RuntimeException.</action>
<!-- UPDATE -->
<action type="update" due-to="ggregory">Bump Java from 7 to 8.</action>