Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 53540 invoked from network); 14 Jun 2007 10:52:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 10:52:31 -0000 Received: (qmail 78126 invoked by uid 500); 14 Jun 2007 10:52:32 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 78112 invoked by uid 500); 14 Jun 2007 10:52:32 -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 78089 invoked by uid 99); 14 Jun 2007 10:52:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 03:52:32 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 03:52:24 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 796EE1A981A; Thu, 14 Jun 2007 03:52:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r547212 - in /harmony/enhanced/classlib/branches/java6/modules/luni/src: main/java/java/util/ test/java/tests/api/java/util/ test/resources/serialization/tests/api/java/util/ Date: Thu, 14 Jun 2007 10:52:03 -0000 To: commits@harmony.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070614105203.796EE1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tellison Date: Thu Jun 14 03:52:02 2007 New Revision: 547212 URL: http://svn.apache.org/viewvc?view=rev&rev=547212 Log: Apply patch HARMONY-4154 ([classlib][luni][java6] New class java.util.ServiceConfigurationError for java6) Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ServiceConfigurationError.java (with props) harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ServiceConfigurationErrorTest.java (with props) harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/serialization/tests/api/java/util/ServiceConfigurationErrorTest.golden.ser (with props) Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ServiceConfigurationError.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ServiceConfigurationError.java?view=auto&rev=547212 ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ServiceConfigurationError.java (added) +++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ServiceConfigurationError.java Thu Jun 14 03:52:02 2007 @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package java.util; + +/** + * An Error that can be thrown when something wrong occurs in loading a service + * provider. + */ +public class ServiceConfigurationError extends Error { + + private static final long serialVersionUID = 74132770414881L; + + /** + * The constructor + * + * @param msg + * the message of this error + */ + public ServiceConfigurationError(String msg) { + super(msg); + } + + /** + * The constructor + * + * @param msg + * the message of this error + * @param cause + * the cause of this error + */ + public ServiceConfigurationError(String msg, Throwable cause) { + super(msg, cause); + } +} Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ServiceConfigurationError.java ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ServiceConfigurationErrorTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ServiceConfigurationErrorTest.java?view=auto&rev=547212 ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ServiceConfigurationErrorTest.java (added) +++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ServiceConfigurationErrorTest.java Thu Jun 14 03:52:02 2007 @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package tests.api.java.util; + +import java.util.ServiceConfigurationError; + +import junit.framework.TestCase; + +import org.apache.harmony.testframework.serialization.SerializationTest; + +/** + * Tests for java.util.ServiceConfigurationError + * + * @since 1.6 + */ +public class ServiceConfigurationErrorTest extends TestCase { + + /** + * @tests {@link java.util.ServiceConfigurationError#ServiceConfigurationError(String)} + */ + @SuppressWarnings("nls") + public void test_ConstructorLjava_lang_String() { + ServiceConfigurationError e = new ServiceConfigurationError("fixture"); + assertEquals("fixture", e.getMessage()); + assertNull(e.getCause()); + } + + /** + * @tests {@link java.util.ServiceConfigurationError#ServiceConfigurationError(String, Throwable)} + */ + @SuppressWarnings("nls") + public void test_ConstructorLjava_lang_StringLjava_lang_Throwable() { + IllegalArgumentException iae = new IllegalArgumentException( + "info in the IAE"); + ServiceConfigurationError e = new ServiceConfigurationError("fixture", + iae); + assertEquals("fixture", e.getMessage()); + assertEquals(iae, e.getCause()); + assertEquals("info in the IAE", e.getCause().getMessage()); + } + + /** + * @throws Exception + * @tests serialization/deserialization. + */ + @SuppressWarnings("nls") + public void testSerializationSelf() throws Exception { + SerializationTest.verifySelf(new ServiceConfigurationError("fixture")); + SerializationTest.verifySelf(new ServiceConfigurationError("fixture", + new IllegalArgumentException("info in the IAE"))); + } + + /** + * @throws Exception + * @tests serialization/deserialization compatibility with RI. + */ + @SuppressWarnings("nls") + public void testSerializationCompatibility() throws Exception { + ServiceConfigurationError e = new ServiceConfigurationError("fixture", + new IllegalArgumentException("info in the IAE")); + SerializationTest.verifyGolden(this, e); + } +} Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ServiceConfigurationErrorTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/serialization/tests/api/java/util/ServiceConfigurationErrorTest.golden.ser URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/serialization/tests/api/java/util/ServiceConfigurationErrorTest.golden.ser?view=auto&rev=547212 ============================================================================== Binary file - no diff available. Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/serialization/tests/api/java/util/ServiceConfigurationErrorTest.golden.ser ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream