diff --git a/src/test/java/org/joda/time/TestDateMidnight_Basics.java b/src/test/java/org/joda/time/TestDateMidnight_Basics.java index 57dc33b05..82982c9ff 100644 --- a/src/test/java/org/joda/time/TestDateMidnight_Basics.java +++ b/src/test/java/org/joda/time/TestDateMidnight_Basics.java @@ -422,8 +422,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDateTimeComparator.java b/src/test/java/org/joda/time/TestDateTimeComparator.java index 1af7f962d..2d5e7a003 100644 --- a/src/test/java/org/joda/time/TestDateTimeComparator.java +++ b/src/test/java/org/joda/time/TestDateTimeComparator.java @@ -271,8 +271,8 @@ public void testSerialization1() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(c); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); @@ -289,8 +289,8 @@ public void testSerialization2() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(c); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDateTimeFieldType.java b/src/test/java/org/joda/time/TestDateTimeFieldType.java index 0e0babe20..29aaceefd 100644 --- a/src/test/java/org/joda/time/TestDateTimeFieldType.java +++ b/src/test/java/org/joda/time/TestDateTimeFieldType.java @@ -314,8 +314,8 @@ private DateTimeFieldType doSerialization(DateTimeFieldType type) throws Excepti ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(type); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDateTimeZone.java b/src/test/java/org/joda/time/TestDateTimeZone.java index 5335fc2a6..3063e69b8 100644 --- a/src/test/java/org/joda/time/TestDateTimeZone.java +++ b/src/test/java/org/joda/time/TestDateTimeZone.java @@ -1025,8 +1025,8 @@ public void testSerialization1() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(zone); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); @@ -1043,8 +1043,8 @@ public void testSerialization2() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(zone); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDateTime_Basics.java b/src/test/java/org/joda/time/TestDateTime_Basics.java index b49e2bce4..293c271d7 100644 --- a/src/test/java/org/joda/time/TestDateTime_Basics.java +++ b/src/test/java/org/joda/time/TestDateTime_Basics.java @@ -487,8 +487,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDays.java b/src/test/java/org/joda/time/TestDays.java index 18a4211f6..95db6cf37 100644 --- a/src/test/java/org/joda/time/TestDays.java +++ b/src/test/java/org/joda/time/TestDays.java @@ -240,8 +240,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDurationFieldType.java b/src/test/java/org/joda/time/TestDurationFieldType.java index 582d78f7b..9f2bfb762 100644 --- a/src/test/java/org/joda/time/TestDurationFieldType.java +++ b/src/test/java/org/joda/time/TestDurationFieldType.java @@ -176,8 +176,8 @@ private DurationFieldType doSerialization(DurationFieldType type) throws Excepti ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(type); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestDuration_Basics.java b/src/test/java/org/joda/time/TestDuration_Basics.java index 4483b5b29..1abfa8e77 100644 --- a/src/test/java/org/joda/time/TestDuration_Basics.java +++ b/src/test/java/org/joda/time/TestDuration_Basics.java @@ -237,8 +237,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestHours.java b/src/test/java/org/joda/time/TestHours.java index 8f357b29e..ca15f1f1a 100644 --- a/src/test/java/org/joda/time/TestHours.java +++ b/src/test/java/org/joda/time/TestHours.java @@ -209,8 +209,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestInstant_Basics.java b/src/test/java/org/joda/time/TestInstant_Basics.java index a6097ce06..97a177e95 100644 --- a/src/test/java/org/joda/time/TestInstant_Basics.java +++ b/src/test/java/org/joda/time/TestInstant_Basics.java @@ -367,8 +367,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestInterval_Basics.java b/src/test/java/org/joda/time/TestInterval_Basics.java index 4b1e68538..1d933472d 100644 --- a/src/test/java/org/joda/time/TestInterval_Basics.java +++ b/src/test/java/org/joda/time/TestInterval_Basics.java @@ -1032,8 +1032,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestLocalDateTime_Basics.java b/src/test/java/org/joda/time/TestLocalDateTime_Basics.java index a32532cef..b3f190361 100644 --- a/src/test/java/org/joda/time/TestLocalDateTime_Basics.java +++ b/src/test/java/org/joda/time/TestLocalDateTime_Basics.java @@ -1051,8 +1051,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestLocalDate_Basics.java b/src/test/java/org/joda/time/TestLocalDate_Basics.java index 6dd7db4c4..593cb3618 100644 --- a/src/test/java/org/joda/time/TestLocalDate_Basics.java +++ b/src/test/java/org/joda/time/TestLocalDate_Basics.java @@ -1106,8 +1106,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestLocalTime_Basics.java b/src/test/java/org/joda/time/TestLocalTime_Basics.java index 42d3f25b7..5f0fd1e36 100644 --- a/src/test/java/org/joda/time/TestLocalTime_Basics.java +++ b/src/test/java/org/joda/time/TestLocalTime_Basics.java @@ -766,8 +766,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestMinutes.java b/src/test/java/org/joda/time/TestMinutes.java index 3a289ef05..dd0162023 100644 --- a/src/test/java/org/joda/time/TestMinutes.java +++ b/src/test/java/org/joda/time/TestMinutes.java @@ -199,8 +199,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestMonthDay_Basics.java b/src/test/java/org/joda/time/TestMonthDay_Basics.java index e8a8cede7..9cd923d90 100644 --- a/src/test/java/org/joda/time/TestMonthDay_Basics.java +++ b/src/test/java/org/joda/time/TestMonthDay_Basics.java @@ -769,8 +769,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestMonths.java b/src/test/java/org/joda/time/TestMonths.java index cf50e4027..6c7de3ec3 100644 --- a/src/test/java/org/joda/time/TestMonths.java +++ b/src/test/java/org/joda/time/TestMonths.java @@ -226,8 +226,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestMutableDateTime_Basics.java b/src/test/java/org/joda/time/TestMutableDateTime_Basics.java index 9259d44a4..f81f59b96 100644 --- a/src/test/java/org/joda/time/TestMutableDateTime_Basics.java +++ b/src/test/java/org/joda/time/TestMutableDateTime_Basics.java @@ -391,8 +391,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestMutableInterval_Basics.java b/src/test/java/org/joda/time/TestMutableInterval_Basics.java index 514df6796..091d7a4b2 100644 --- a/src/test/java/org/joda/time/TestMutableInterval_Basics.java +++ b/src/test/java/org/joda/time/TestMutableInterval_Basics.java @@ -452,8 +452,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestMutablePeriod_Basics.java b/src/test/java/org/joda/time/TestMutablePeriod_Basics.java index 792a68da9..176338ca9 100644 --- a/src/test/java/org/joda/time/TestMutablePeriod_Basics.java +++ b/src/test/java/org/joda/time/TestMutablePeriod_Basics.java @@ -163,8 +163,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestPartial_Basics.java b/src/test/java/org/joda/time/TestPartial_Basics.java index 5c154a380..d49cb2886 100644 --- a/src/test/java/org/joda/time/TestPartial_Basics.java +++ b/src/test/java/org/joda/time/TestPartial_Basics.java @@ -781,8 +781,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestPeriodType.java b/src/test/java/org/joda/time/TestPeriodType.java index 9c6108259..17497d385 100644 --- a/src/test/java/org/joda/time/TestPeriodType.java +++ b/src/test/java/org/joda/time/TestPeriodType.java @@ -110,8 +110,8 @@ private void assertEqualsAfterSerialization(PeriodType type) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(type); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); @@ -125,8 +125,8 @@ private void assertSameAfterSerialization(PeriodType type) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(type); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestPeriod_Basics.java b/src/test/java/org/joda/time/TestPeriod_Basics.java index 82030f808..46c6871f6 100644 --- a/src/test/java/org/joda/time/TestPeriod_Basics.java +++ b/src/test/java/org/joda/time/TestPeriod_Basics.java @@ -230,8 +230,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestSeconds.java b/src/test/java/org/joda/time/TestSeconds.java index 6842d236f..41614b04d 100644 --- a/src/test/java/org/joda/time/TestSeconds.java +++ b/src/test/java/org/joda/time/TestSeconds.java @@ -196,8 +196,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestTimeOfDay_Basics.java b/src/test/java/org/joda/time/TestTimeOfDay_Basics.java index 7ab489138..671740ba5 100644 --- a/src/test/java/org/joda/time/TestTimeOfDay_Basics.java +++ b/src/test/java/org/joda/time/TestTimeOfDay_Basics.java @@ -853,8 +853,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestWeeks.java b/src/test/java/org/joda/time/TestWeeks.java index ecc668b12..e08079b3b 100644 --- a/src/test/java/org/joda/time/TestWeeks.java +++ b/src/test/java/org/joda/time/TestWeeks.java @@ -198,8 +198,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestYearMonthDay_Basics.java b/src/test/java/org/joda/time/TestYearMonthDay_Basics.java index 17b18a96a..a9c47d12e 100644 --- a/src/test/java/org/joda/time/TestYearMonthDay_Basics.java +++ b/src/test/java/org/joda/time/TestYearMonthDay_Basics.java @@ -779,8 +779,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestYearMonth_Basics.java b/src/test/java/org/joda/time/TestYearMonth_Basics.java index 1ce184ef0..98afd5640 100644 --- a/src/test/java/org/joda/time/TestYearMonth_Basics.java +++ b/src/test/java/org/joda/time/TestYearMonth_Basics.java @@ -603,8 +603,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/TestYears.java b/src/test/java/org/joda/time/TestYears.java index c14282bfe..2bc352a3b 100644 --- a/src/test/java/org/joda/time/TestYears.java +++ b/src/test/java/org/joda/time/TestYears.java @@ -181,8 +181,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/field/TestMillisDurationField.java b/src/test/java/org/joda/time/field/TestMillisDurationField.java index 126a32e00..293a3d478 100644 --- a/src/test/java/org/joda/time/field/TestMillisDurationField.java +++ b/src/test/java/org/joda/time/field/TestMillisDurationField.java @@ -202,8 +202,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/field/TestPreciseDurationField.java b/src/test/java/org/joda/time/field/TestPreciseDurationField.java index b8f25452e..1154d0596 100644 --- a/src/test/java/org/joda/time/field/TestPreciseDurationField.java +++ b/src/test/java/org/joda/time/field/TestPreciseDurationField.java @@ -261,8 +261,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/field/TestScaledDurationField.java b/src/test/java/org/joda/time/field/TestScaledDurationField.java index baf84ddac..4bfd65eb7 100644 --- a/src/test/java/org/joda/time/field/TestScaledDurationField.java +++ b/src/test/java/org/joda/time/field/TestScaledDurationField.java @@ -278,8 +278,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais); diff --git a/src/test/java/org/joda/time/tz/TestCachedDateTimeZone.java b/src/test/java/org/joda/time/tz/TestCachedDateTimeZone.java index d6d01fd20..56b73c75a 100644 --- a/src/test/java/org/joda/time/tz/TestCachedDateTimeZone.java +++ b/src/test/java/org/joda/time/tz/TestCachedDateTimeZone.java @@ -68,8 +68,8 @@ public void testSerialization() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(test); - byte[] bytes = baos.toByteArray(); oos.close(); + byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(bais);