From: Joonas Lehtinen Date: Sun, 14 Jun 2009 10:45:40 +0000 (+0000) Subject: TestSerialization used ByteOutputStream instead of ByteArrayOutputStream. This is... X-Git-Tag: 6.7.0.beta1~2722 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f5372980de9dcb7e13fcfec120dbb6fa4a65787a;p=vaadin-framework.git TestSerialization used ByteOutputStream instead of ByteArrayOutputStream. This is most probably a mistake as ByteOutputStream is an internal sun implementation class. Corrected. svn changeset:8192/svn branch:6.0 --- diff --git a/src/com/vaadin/tests/TestSerialization.java b/src/com/vaadin/tests/TestSerialization.java index 1b85ede47b..8b5595fbbc 100644 --- a/src/com/vaadin/tests/TestSerialization.java +++ b/src/com/vaadin/tests/TestSerialization.java @@ -1,6 +1,7 @@ package com.vaadin.tests; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -8,7 +9,6 @@ import java.io.Serializable; import junit.framework.TestCase; -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; import com.vaadin.data.Item; import com.vaadin.data.util.IndexedContainer; import com.vaadin.data.util.MethodProperty; @@ -60,10 +60,10 @@ public class TestSerialization extends TestCase { throws IOException, ClassNotFoundException { // Serialize and deserialize - ByteOutputStream bs = new ByteOutputStream(); + ByteArrayOutputStream bs = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bs); out.writeObject(s); - byte[] data = bs.getBytes(); + byte[] data = bs.toByteArray(); ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream( data)); Serializable s2 = (Serializable) in.readObject();