This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push:
new da562fef Add unit test for DaemonInitException.getMessageWithCause and
fix typo in changes.xml (#318)
da562fef is described below
commit da562fef1c2afb74a0d03b74b0d98b6d4fb63efc
Author: Mohd Irshad <[email protected]>
AuthorDate: Tue Nov 3 21:25:30 2026 +0530
Add unit test for DaemonInitException.getMessageWithCause and fix typo in
changes.xml (#318)
---
src/changes/changes.xml | 2 +-
.../org/apache/commons/daemon/DaemonInitExceptionTest.java | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c84eeea5..d554ba01 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -51,7 +51,7 @@
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump
org.apache.commons:commons-parent from 100 to 100.</action>
</release>
- <release version="1.6.0" date="2026-05-29" description="This is a
maintenace release. Adds support for Windows on ARM64.">
+ <release version="1.6.0" date="2026-05-29" description="This is a
maintenance release. Adds support for Windows on ARM64.">
<!-- FIX -->
<action type="fix" dev="markt" due-to="Alex Dupre, Michael Osipov">jsvc.
Fix a regression in 1.5.1 that exposed long standing bugs around the locking
and unlocking of pid files. Also fix the locking/unlocking bugs.</action>
<action type="fix" dev="ggregory" issue="DAEMON-477" due-to="Alexander
PinĨuk, Gary Gregory, Mark Thomas">Detaches from console when the service stops
#307.</action>
diff --git
a/src/test/java/org/apache/commons/daemon/DaemonInitExceptionTest.java
b/src/test/java/org/apache/commons/daemon/DaemonInitExceptionTest.java
index 9f79e6a4..1ee56159 100644
--- a/src/test/java/org/apache/commons/daemon/DaemonInitExceptionTest.java
+++ b/src/test/java/org/apache/commons/daemon/DaemonInitExceptionTest.java
@@ -31,4 +31,14 @@ class DaemonInitExceptionTest {
assertEquals(e, new DaemonInitException("Test", e).getCause());
}
+ @Test
+ void testGetMessageWithCause() {
+ final DaemonInitException exNoCause = new DaemonInitException("Init
failed");
+ assertEquals("Init failed", exNoCause.getMessageWithCause());
+
+ final IOException cause = new IOException("Disk error");
+ final DaemonInitException exWithCause = new DaemonInitException("Init
failed", cause);
+ assertEquals("Init failed: Disk error",
exWithCause.getMessageWithCause());
+ }
+
}