aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/apache
diff options
context:
space:
mode:
authorGary Gregory <garydgregory@gmail.com>2022-05-30 09:05:38 -0400
committerGary Gregory <garydgregory@gmail.com>2022-05-30 09:05:38 -0400
commite7762b26725824a5c0f77dcefdc5a1a2cf9fcfde (patch)
tree2985bb42fbb91587ac98f355ba6b373c81f3d128 /src/test/java/org/apache
parentbb43de8a5e93da97cb024b97c650ae884aecd341 (diff)
downloadapache-commons-lang-e7762b26725824a5c0f77dcefdc5a1a2cf9fcfde.tar.gz
Use try-with-resources without final (redundant SpotBugs)
Diffstat (limited to 'src/test/java/org/apache')
-rw-r--r--src/test/java/org/apache/commons/lang3/SerializationUtilsTest.java18
1 files 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();
}