summaryrefslogtreecommitdiff
path: root/java/test/Ice/serialize/AllTests.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2014-08-12 15:50:25 -0230
committerMatthew Newhook <matthew@zeroc.com>2014-08-12 15:50:25 -0230
commit2f5c841cfce2ae5ff26e2e373c3ea7188da8b75b (patch)
treeb460e22e91a9fbb9cfb71631303963fa94dd2c9c /java/test/Ice/serialize/AllTests.java
parentICE-5492 Tcp Loopback Fast Path for C#/C++ on Windows (diff)
downloadice-2f5c841cfce2ae5ff26e2e373c3ea7188da8b75b.tar.bz2
ice-2f5c841cfce2ae5ff26e2e373c3ea7188da8b75b.tar.xz
ice-2f5c841cfce2ae5ff26e2e373c3ea7188da8b75b.zip
Added eclipse project settings for java.
Fix lots of warnings in Ice for Java.
Diffstat (limited to 'java/test/Ice/serialize/AllTests.java')
-rw-r--r--java/test/Ice/serialize/AllTests.java35
1 files changed, 28 insertions, 7 deletions
diff --git a/java/test/Ice/serialize/AllTests.java b/java/test/Ice/serialize/AllTests.java
index 61940783a66..212acc0893c 100644
--- a/java/test/Ice/serialize/AllTests.java
+++ b/java/test/Ice/serialize/AllTests.java
@@ -65,8 +65,15 @@ public class AllTests
byte[] bytes = initial.getStruct1();
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
Ice.ObjectInputStream ois = new Ice.ObjectInputStream(communicator, bais);
- Struct1 s = (Struct1)ois.readObject();
- checkStruct1(s);
+ try
+ {
+ Struct1 s = (Struct1)ois.readObject();
+ checkStruct1(s);
+ }
+ finally
+ {
+ ois.close();
+ }
}
catch(Throwable ex)
{
@@ -81,8 +88,15 @@ public class AllTests
byte[] bytes = initial.getBase();
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
Ice.ObjectInputStream ois = new Ice.ObjectInputStream(communicator, bais);
- Base b = (Base)ois.readObject();
- checkBase(b);
+ try
+ {
+ Base b = (Base) ois.readObject();
+ checkBase(b);
+ }
+ finally
+ {
+ ois.close();
+ }
}
catch(Throwable ex)
{
@@ -97,9 +111,16 @@ public class AllTests
byte[] bytes = initial.getEx();
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
Ice.ObjectInputStream ois = new Ice.ObjectInputStream(communicator, bais);
- Ex ex = (Ex)ois.readObject();
- checkStruct1(ex.s);
- checkBase(ex.b);
+ try
+ {
+ Ex ex = (Ex)ois.readObject();
+ checkStruct1(ex.s);
+ checkBase(ex.b);
+ }
+ finally
+ {
+ ois.close();
+ }
}
catch(Throwable ex)
{