You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/06/14 12:52:03 UTC
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/
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