Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 40358 invoked from network); 26 Mar 2010 13:50:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Mar 2010 13:50:48 -0000 Received: (qmail 98460 invoked by uid 500); 26 Mar 2010 13:50:48 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 98406 invoked by uid 500); 26 Mar 2010 13:50:48 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 98399 invoked by uid 99); 26 Mar 2010 13:50:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 13:50:48 +0000 X-ASF-Spam-Status: No, hits=-1143.4 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 13:50:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2AF8D234C4E9 for ; Fri, 26 Mar 2010 13:50:27 +0000 (UTC) Message-ID: <619942079.509551269611427175.JavaMail.jira@brutus.apache.org> Date: Fri, 26 Mar 2010 13:50:27 +0000 (UTC) From: "Oliver Deakin (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-6483) [classlib][luni] No IllegalArgumentException thrown by PutField.write() when writing to the wrong stream In-Reply-To: <1437386785.507071269601467307.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HARMONY-6483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Deakin closed HARMONY-6483. ---------------------------------- Externalised exception message at repo revision r927802. Closing... > [classlib][luni] No IllegalArgumentException thrown by PutField.write() when writing to the wrong stream > -------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6483 > URL: https://issues.apache.org/jira/browse/HARMONY-6483 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Oliver Deakin > Assignee: Oliver Deakin > Fix For: 6.0M2, 5.0M14 > > > Running the following test: > import java.io.*; > import java.io.ObjectOutputStream.PutField; > class Test2 { > public static void main(String[] args) throws Exception { > ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File("testfile"))); > oos.writeObject(new OutputObject()); > } > static class OutputObject implements Serializable { > private void writeObject(ObjectOutputStream oos) throws IOException { > ObjectOutputStream oos2 = new ObjectOutputStream(new FileOutputStream(new File("testfile2"))); > ObjectOutputStream.PutField putField = oos.putFields(); > putField.write(oos2); > } > } > } > on the RI produces: > Exception in thread "main" java.lang.IllegalArgumentException: wrong stream > at java.io.ObjectOutputStream$PutFieldImpl.write(ObjectOutputStream.java:1670) > at Test2$OutputObject.writeObject(Test2.java:14) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:63) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) > at java.lang.reflect.Method.invoke(Method.java:624) > at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:973) > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1494) > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1425) > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:359) > at Test2.main(Test2.java:7) > whereas on Harmony it completes without exception. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.