diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-08-12 15:50:25 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-08-12 15:50:25 -0230 |
commit | 2f5c841cfce2ae5ff26e2e373c3ea7188da8b75b (patch) | |
tree | b460e22e91a9fbb9cfb71631303963fa94dd2c9c /java/test/Ice/serialize/AllTests.java | |
parent | ICE-5492 Tcp Loopback Fast Path for C#/C++ on Windows (diff) | |
download | ice-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.java | 35 |
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) { |