Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 59347 invoked from network); 19 Apr 2006 12:35:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 12:35:22 -0000 Received: (qmail 58245 invoked by uid 500); 19 Apr 2006 12:35:19 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 58216 invoked by uid 500); 19 Apr 2006 12:35:19 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 58205 invoked by uid 99); 19 Apr 2006 12:35:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 05:35:19 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 19 Apr 2006 05:35:18 -0700 Received: (qmail 58956 invoked by uid 65534); 19 Apr 2006 12:34:30 -0000 Message-ID: <20060419123421.58953.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r395232 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: java/tests/api/java/lang/ resources/serialization/java/lang/ Date: Wed, 19 Apr 2006 12:34:01 -0000 To: harmony-commits@incubator.apache.org From: gharley@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gharley Date: Wed Apr 19 05:33:52 2006 New Revision: 395232 URL: http://svn.apache.org/viewcvs?rev=395232&view=rev Log: HARMONY-338 : several exceptions in java.lang has different serialVersionUID with RI Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalStateException.ser (with props) incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/SecurityException.ser (with props) incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/UnsupportedOperationException.ser (with props) Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalStateExceptionTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/SecurityExceptionTest.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/UnsupportedOperationExceptionTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalStateExceptionTest.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalStateExceptionTest.java?rev=395232&r1=395231&r2=395232&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalStateExceptionTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/IllegalStateExceptionTest.java Wed Apr 19 05:33:52 2006 @@ -1,4 +1,4 @@ -/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable +/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,13 @@ package tests.api.java.lang; +import tests.util.SerializationTester; + public class IllegalStateExceptionTest extends junit.framework.TestCase { + private static final String SERIALIZATION_FILE_NAME = + "/serialization/java/lang/IllegalStateException.ser"; //$NON-NLS-1$ + /** * @tests java.lang.IllegalStateException#IllegalStateException() */ @@ -24,19 +29,7 @@ // Test for method java.lang.IllegalStateException() IllegalStateException ill = new IllegalStateException(); assertTrue("failed to create an instance of illegalStateException", ill - .getMessage() == null); - try { - try { - java.util.zip.Inflater inflater = new java.util.zip.Inflater(); - inflater.end(); - inflater.getAdler(); - } catch (IllegalStateException e) { - return; - } - fail("Failed to generate Exception"); - } catch (Exception e) { - fail("Exception during test : " + e.getMessage()); - } + .getMessage() == null); } /** @@ -51,6 +44,26 @@ ill.getMessage().equals("testing illState exception")); } + /** + * @tests serialization/deserilazation. + */ + public void test_serialization() throws Exception { + IllegalStateException srcIllegalStateException = new IllegalStateException(); + IllegalStateException destIllegalStateException = (IllegalStateException) SerializationTester + .getDeserilizedObject(srcIllegalStateException); + } + + /** + * @tests serialization/deserilazation compatibility with RI. + */ + public void test_serializationCompatibility() throws Exception { + IllegalStateException srcIllegalStateException = new IllegalStateException(); + IllegalStateException destIllegalStateException = (IllegalStateException) SerializationTester + .readObject(srcIllegalStateException, + SERIALIZATION_FILE_NAME); + } + + /** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed. Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/SecurityExceptionTest.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/SecurityExceptionTest.java?rev=395232&r1=395231&r2=395232&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/SecurityExceptionTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/SecurityExceptionTest.java Wed Apr 19 05:33:52 2006 @@ -1,4 +1,4 @@ -/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable +/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,13 @@ package tests.api.java.lang; -public class SecurityExceptionTest extends junit.framework.TestCase { +import tests.util.SerializationTester; +public class SecurityExceptionTest extends junit.framework.TestCase { + + private static final String SERIALIZATION_FILE_NAME = + "/serialization/java/lang/SecurityException.ser"; //$NON-NLS-1$ + /** * @tests java.lang.SecurityException#SecurityException() */ @@ -45,6 +50,26 @@ assertTrue("Failed to generate exception", threwException); } + /** + * @tests serialization/deserilazation. + */ + public void test_serialization() throws Exception { + SecurityException srcSecurityException = new SecurityException(); + SecurityException destSecurityException = (SecurityException) SerializationTester + .getDeserilizedObject(srcSecurityException); + } + + /** + * @tests serialization/deserilazation compatibility with RI. + */ + public void test_serializationCompatibility() throws Exception { + SecurityException srcSecurityException = new SecurityException(); + SecurityException destSecurityException = (SecurityException) SerializationTester + .readObject(srcSecurityException, + SERIALIZATION_FILE_NAME); + } + + /** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed. Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/UnsupportedOperationExceptionTest.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/UnsupportedOperationExceptionTest.java?rev=395232&r1=395231&r2=395232&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/UnsupportedOperationExceptionTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/UnsupportedOperationExceptionTest.java Wed Apr 19 05:33:52 2006 @@ -1,4 +1,4 @@ -/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable +/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,13 @@ import java.util.AbstractCollection; import java.util.Iterator; +import tests.util.SerializationTester; + public class UnsupportedOperationExceptionTest extends junit.framework.TestCase { + private static final String SERIALIZATION_FILE_NAME = + "/serialization/java/lang/UnsupportedOperationException.ser"; //$NON-NLS-1$ + /** * @tests java.lang.UnsupportedOperationException#UnsupportedOperationException() */ @@ -61,6 +66,26 @@ fail("Exception during Constructor : " + e.getMessage()); } fail("Constructor failed"); + } + + + /** + * @tests serialization/deserilazation. + */ + public void test_serialization() throws Exception { + UnsupportedOperationException srcUnsupportedOperationException = new UnsupportedOperationException(); + UnsupportedOperationException destUnsupportedOperationException = (UnsupportedOperationException) SerializationTester + .getDeserilizedObject(srcUnsupportedOperationException); + } + + /** + * @tests serialization/deserilazation compatibility with RI. + */ + public void test_serializationCompatibility() throws Exception { + UnsupportedOperationException srcUnsupportedOperationException = new UnsupportedOperationException(); + UnsupportedOperationException destUnsupportedOperationException = (UnsupportedOperationException) SerializationTester + .readObject(srcUnsupportedOperationException, + SERIALIZATION_FILE_NAME); } /** Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalStateException.ser URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalStateException.ser?rev=395232&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalStateException.ser ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/SecurityException.ser URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/SecurityException.ser?rev=395232&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/SecurityException.ser ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/UnsupportedOperationException.ser URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/UnsupportedOperationException.ser?rev=395232&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/UnsupportedOperationException.ser ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream