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-lang.git
commit e7762b26725824a5c0f77dcefdc5a1a2cf9fcfde Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon May 30 09:05:38 2022 -0400 Use try-with-resources without final (redundant SpotBugs) --- .../apache/commons/lang3/SerializationUtilsTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java index 47682e718..5686298b7 100644 --- a/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java @@ -102,7 +102,7 @@ public class SerializationUtilsTest { SerializationUtils.serialize(iMap, streamTest); final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(iMap); oos.flush(); } @@ -126,7 +126,7 @@ public class SerializationUtilsTest { SerializationUtils.serialize(null, streamTest); final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(null); oos.flush(); } @@ -166,7 +166,7 @@ public class SerializationUtilsTest { @Test public void testDeserializeStream() throws Exception { final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(iMap); oos.flush(); } @@ -199,7 +199,7 @@ public class SerializationUtilsTest { @Test public void testDeserializeStreamOfNull() throws Exception { final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(null); oos.flush(); } @@ -223,7 +223,7 @@ public class SerializationUtilsTest { @Test public void testDeserializeStreamClassNotFound() throws Exception { final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(new ClassNotFoundSerialization()); oos.flush(); } @@ -245,7 +245,7 @@ public class SerializationUtilsTest { final byte[] testBytes = SerializationUtils.serialize(iMap); final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(iMap); oos.flush(); } @@ -266,7 +266,7 @@ public class SerializationUtilsTest { final byte[] testBytes = SerializationUtils.serialize(null); final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(null); oos.flush(); } @@ -280,7 +280,7 @@ public class SerializationUtilsTest { @Test public void testDeserializeBytes() throws Exception { final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(iMap); oos.flush(); } @@ -300,7 +300,7 @@ public class SerializationUtilsTest { @Test public void testDeserializeBytesOfNull() throws Exception { final ByteArrayOutputStream streamReal = new ByteArrayOutputStream(); - try (final ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { + try (ObjectOutputStream oos = new ObjectOutputStream(streamReal)) { oos.writeObject(null); oos.flush(); }