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-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 430519e46 Remove trailing whitespace in JUnit assertion messages
430519e46 is described below

commit 430519e46be5bc084d13ed28c7e93dda8eec9dab
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Oct 6 09:47:44 2024 -0400

    Remove trailing whitespace in JUnit assertion messages
---
 src/changes/changes.xml                                      |  5 +++--
 .../apache/commons/io/input/SwappedDataInputStreamTest.java  |  5 ++---
 .../org/apache/commons/io/output/LockableFileWriterTest.java | 12 ++++++------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 00e32537f..815f5270d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -48,10 +48,11 @@ The <action> type attribute can be add,update,fix,remove.
   <body>
     <release version="2.17.1" date="YYYY-MM-DD" description="Version 2.17.1: 
Java 8 is required.">
       <!-- FIX -->
+      <action dev="ggregory" type="fix"                due-to="Gary 
Gregory">Clean ups in unit tests.</action>
       <!-- ADD -->
       <!-- UPDATE -->
-      <action dev="ggregory" type="update"                due-to="Gary 
Gregory">Bump org.apache.commons:commons-parent from 74 to 76 #670, 
#676.</action>
-      <action dev="ggregory" type="update"                due-to="Gary 
Gregory">Bump commons.bytebuddy.version from 1.15.1 to 1.15.3 #672, 
#673.</action> 
+      <action dev="ggregory" type="update"             due-to="Gary 
Gregory">Bump org.apache.commons:commons-parent from 74 to 76 #670, 
#676.</action>
+      <action dev="ggregory" type="update"             due-to="Gary 
Gregory">Bump commons.bytebuddy.version from 1.15.1 to 1.15.3 #672, 
#673.</action> 
     </release>
     <release version="2.17.0" date="2024-09-15" description="Version 2.17.0: 
Java 8 is required.">
       <!-- ADD --> 
diff --git 
a/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java 
b/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java
index 37a656e5d..ee8a2ae74 100644
--- a/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/SwappedDataInputStreamTest.java
@@ -114,8 +114,7 @@ public class SwappedDataInputStreamTest {
 
     @Test
     public void testReadLine() {
-        assertThrows(UnsupportedOperationException.class, () ->  
this.sdis.readLine(),
-                "readLine should be unsupported. ");
+        assertThrows(UnsupportedOperationException.class, () -> 
this.sdis.readLine(), "readLine should be unsupported.");
     }
 
     @Test
@@ -140,7 +139,7 @@ public class SwappedDataInputStreamTest {
 
     @Test
     public void testReadUTF() {
-        assertThrows(UnsupportedOperationException.class, () -> 
this.sdis.readUTF(), "readUTF should be unsupported. ");
+        assertThrows(UnsupportedOperationException.class, () -> 
this.sdis.readUTF(), "readUTF should be unsupported.");
     }
 
     @Test
diff --git 
a/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java 
b/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
index 88c117da7..c124d7184 100644
--- a/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
+++ b/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
@@ -89,10 +89,10 @@ public class LockableFileWriterTest {
 
         // try to open a second writer
         try (LockableFileWriter lfw2 = new LockableFileWriter(file, 
StandardCharsets.UTF_8, true, altLockDir.getAbsolutePath())) {
-            fail("Somehow able to open a locked file. ");
+            fail("Somehow able to open a locked file.");
         } catch (final IOException ioe) {
             final String msg = ioe.getMessage();
-            assertTrue(msg.startsWith("Can't write file, lock "), "Exception 
message does not start correctly. ");
+            assertTrue(msg.startsWith("Can't write file, lock "), "Exception 
message does not start correctly.");
             assertTrue(file.exists());
             assertTrue(altLockFile.exists());
         }
@@ -163,20 +163,20 @@ public class LockableFileWriterTest {
 
             // try to open a second writer
             try (LockableFileWriter lfw2 = new LockableFileWriter(file)) {
-                fail("Somehow able to open a locked file. ");
+                fail("Somehow able to open a locked file.");
             } catch (final IOException ioe) {
                 final String msg = ioe.getMessage();
-                assertTrue(msg.startsWith("Can't write file, lock "), 
"Exception message does not start correctly. ");
+                assertTrue(msg.startsWith("Can't write file, lock "), 
"Exception message does not start correctly.");
                 assertTrue(file.exists());
                 assertTrue(lockFile.exists());
             }
 
             // try to open a third writer
             try (LockableFileWriter lfw3 = new LockableFileWriter(file)) {
-                fail("Somehow able to open a locked file. ");
+                fail("Somehow able to open a locked file.");
             } catch (final IOException ioe) {
                 final String msg = ioe.getMessage();
-                assertTrue(msg.startsWith("Can't write file, lock "), 
"Exception message does not start correctly. ");
+                assertTrue(msg.startsWith("Can't write file, lock "), 
"Exception message does not start correctly.");
                 assertTrue(file.exists());
                 assertTrue(lockFile.exists());
             }

Reply via email to