diff options
author | Neil Fuller <nfuller@google.com> | 2014-01-14 09:58:33 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2014-01-14 10:12:33 +0000 |
commit | 67b29d93704633ca6f9714e4d0a694afbf557f83 (patch) | |
tree | adc7b5646bc2e734e28b394d1466b0c7a7879e28 /harmony-tests | |
parent | 086002299f96dbbec18a061e812dc1cb79cb1f10 (diff) | |
download | libcore-67b29d93704633ca6f9714e4d0a694afbf557f83.zip libcore-67b29d93704633ca6f9714e4d0a694afbf557f83.tar.gz libcore-67b29d93704633ca6f9714e4d0a694afbf557f83.tar.bz2 |
Fix SerializationStressTest1#test_18_33_writeObject
Since commit 086002299f96dbbec18a061e812dc1cb79cb1f10
ObjectOutputStream.writeObject() no longer throws StreamCorruptedException when
encountering an IOException during serialization. It now throws the actual
IOException.
bug: 6447733
Change-Id: I2b4add330cbb67d6d1db159940cb2e1fe2216bcc
Diffstat (limited to 'harmony-tests')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/java/io/SerializationStressTest1.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/SerializationStressTest1.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/SerializationStressTest1.java index df5f792..27d8b33 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/SerializationStressTest1.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/SerializationStressTest1.java @@ -275,8 +275,6 @@ public class SerializationStressTest1 extends SerializationStressTest { private static class MyException extends java.io.IOException { } - ; - // A primitive instance variable exposes a bug in the serialization // spec. // Primitive instance variables are written without primitive data tags @@ -347,8 +345,6 @@ public class SerializationStressTest1 extends SerializationStressTest { private Object notSerializable = new Object(); } - ; - public boolean anInstanceVar = false; public MyUnserializableExceptionWhenDumping() { @@ -1436,10 +1432,10 @@ public class SerializationStressTest1 extends SerializationStressTest { boolean causedException = false; try { dump(objToSave); - } catch (java.io.StreamCorruptedException e) { + } catch (MyUnserializableExceptionWhenDumping.MyException e) { causedException = true; } - ; + assertTrue("Should have caused an exception when dumping", causedException); // As the stream is corrupted, reading the stream will have |