harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r440340 [4/5] - /incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/
Date Tue, 05 Sep 2006 13:39:20 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ProviderTrust.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ProviderTrust.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ProviderTrust.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ProviderTrust.java Tue Sep  5 06:39:17 2006
@@ -1,89 +1,89 @@
-/* Copyright 2005 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.
- * 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.support;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.Provider;
-
-/**
- * This class implements a dummy provider.
- * 
- */
-public class Support_ProviderTrust extends Provider {
-	// Provider name
-	private static final String NAME = "ProviderTrust";
-
-	// Version of the services
-	private static final double VERSION = 1.0;
-
-	private static final String INFO = NAME
-			+ " DSA key, parameter generation and signing; SHA-1 digest; SHA1PRNG SecureRandom";
-
-	/**
-	 * Constructs a new instance of the dummy provider.
-	 * 
-	 */
-	public Support_ProviderTrust() {
-		super(NAME, VERSION, INFO);
-		registerServices();
-	}
-
-	/**
-	 * Register the services the receiver provides.
-	 */
-	private void registerServices() {
-		AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// Digest engine
-				put("MessageDigest.SHA",
-						"made.up.provider.name.MessageDigestSHA");
-				put("MessageDigest.MD5",
-						"made.up.provider.name.MessageDigestMD5");
-
-				// Algorithm parameter generator
-				put("AlgorithmParameterGenerator.DSA",
-						"made.up.provider.name.AlgorithmParameterGeneratorDSA");
-
-				// Algorithm parameters
-				put("AlgorithmParameters.DSA",
-						"made.up.provider.name.AlgorithmParametersDSA");
-
-				// Key pair generator
-				put("KeyPairGenerator.DSA",
-						"made.up.provider.name.KeyPairGeneratorDSA");
-
-				// Key factory
-				put("KeyFactory.DSA", "made.up.provider.name.KeyFactoryDSA");
-				put("KeyFactory.RSA", "made.up.provider.name.KeyFactoryRSA");
-
-				// Signature algorithm
-				put("Signature.SHA1withDSA",
-						"made.up.provider.name.SignatureDSA");
-
-				// KeyStore
-				put("KeyStore.PKCS#12/Netscape",
-						"made.up.provider.name.KeyStore");
-
-				// Certificate
-				put("CertificateFactory.X509",
-						"made.up.provider.name.CertificateFactoryX509");
-
-				return null;
-			}
-		});
-	}
+/* Copyright 2005 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.
+ * 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.support;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.Provider;
+
+/**
+ * This class implements a dummy provider.
+ * 
+ */
+public class Support_ProviderTrust extends Provider {
+	// Provider name
+	private static final String NAME = "ProviderTrust";
+
+	// Version of the services
+	private static final double VERSION = 1.0;
+
+	private static final String INFO = NAME
+			+ " DSA key, parameter generation and signing; SHA-1 digest; SHA1PRNG SecureRandom";
+
+	/**
+	 * Constructs a new instance of the dummy provider.
+	 * 
+	 */
+	public Support_ProviderTrust() {
+		super(NAME, VERSION, INFO);
+		registerServices();
+	}
+
+	/**
+	 * Register the services the receiver provides.
+	 */
+	private void registerServices() {
+		AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// Digest engine
+				put("MessageDigest.SHA",
+						"made.up.provider.name.MessageDigestSHA");
+				put("MessageDigest.MD5",
+						"made.up.provider.name.MessageDigestMD5");
+
+				// Algorithm parameter generator
+				put("AlgorithmParameterGenerator.DSA",
+						"made.up.provider.name.AlgorithmParameterGeneratorDSA");
+
+				// Algorithm parameters
+				put("AlgorithmParameters.DSA",
+						"made.up.provider.name.AlgorithmParametersDSA");
+
+				// Key pair generator
+				put("KeyPairGenerator.DSA",
+						"made.up.provider.name.KeyPairGeneratorDSA");
+
+				// Key factory
+				put("KeyFactory.DSA", "made.up.provider.name.KeyFactoryDSA");
+				put("KeyFactory.RSA", "made.up.provider.name.KeyFactoryRSA");
+
+				// Signature algorithm
+				put("Signature.SHA1withDSA",
+						"made.up.provider.name.SignatureDSA");
+
+				// KeyStore
+				put("KeyStore.PKCS#12/Netscape",
+						"made.up.provider.name.KeyStore");
+
+				// Certificate
+				put("CertificateFactory.X509",
+						"made.up.provider.name.CertificateFactoryX509");
+
+				return null;
+			}
+		});
+	}
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ProviderTrust.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I1.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I1.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I1.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I1.java Tue Sep  5 06:39:17 2006
@@ -1,26 +1,26 @@
-/* Copyright 2001, 2005 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.
- * 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.support;
-
-public interface Support_Proxy_I1 {
-	boolean equals(Object o);
-
-	int[] array(long[] f);
-
-	void foo(int i, boolean b);
-
-	String string(String s) throws Support_Proxy_ParentException, LinkageError;
-}
+/* Copyright 2001, 2005 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.
+ * 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.support;
+
+public interface Support_Proxy_I1 {
+	boolean equals(Object o);
+
+	int[] array(long[] f);
+
+	void foo(int i, boolean b);
+
+	String string(String s) throws Support_Proxy_ParentException, LinkageError;
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I2.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I2.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I2.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I2.java Tue Sep  5 06:39:17 2006
@@ -1,25 +1,25 @@
-/* Copyright 2001, 2005 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.
- * 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.support;
-
-public interface Support_Proxy_I2 {
-
-	int[] array(long[] f);
-
-	void foo(boolean b, int i);
-
-	String string(String s) throws Support_Proxy_SubException, Error;
-}
+/* Copyright 2001, 2005 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.
+ * 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.support;
+
+public interface Support_Proxy_I2 {
+
+	int[] array(long[] f);
+
+	void foo(boolean b, int i);
+
+	String string(String s) throws Support_Proxy_SubException, Error;
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_I2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_ParentException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_ParentException.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_ParentException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_ParentException.java Tue Sep  5 06:39:17 2006
@@ -1,20 +1,20 @@
-/* Copyright 2001, 2005 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.
- * 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.support;
-
-public class Support_Proxy_ParentException extends Exception {
-
-}
+/* Copyright 2001, 2005 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.
+ * 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.support;
+
+public class Support_Proxy_ParentException extends Exception {
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_ParentException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_SubException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_SubException.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_SubException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_SubException.java Tue Sep  5 06:39:17 2006
@@ -1,20 +1,20 @@
-/* Copyright 2001, 2005 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.
- * 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.support;
-
-public class Support_Proxy_SubException extends Support_Proxy_ParentException {
-
-}
+/* Copyright 2001, 2005 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.
+ * 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.support;
+
+public class Support_Proxy_SubException extends Support_Proxy_ParentException {
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Proxy_SubException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ServerSocket.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ServerSocket.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ServerSocket.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ServerSocket.java Tue Sep  5 06:39:17 2006
@@ -1,35 +1,35 @@
-/* Copyright 2002, 2005 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.
- * 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.support;
-
-import java.io.IOException;
-
-/**
- * The interface for a generic server socket.
- * 
- */
-public interface Support_ServerSocket {
-
-	public Support_Socket accept() throws IOException;
-
-	public void setTimeout(int timeout);
-
-	public void setPort(int port);
-
-	public void open() throws IOException;
-
-	public void close() throws IOException;
-}
+/* Copyright 2002, 2005 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.
+ * 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.support;
+
+import java.io.IOException;
+
+/**
+ * The interface for a generic server socket.
+ * 
+ */
+public interface Support_ServerSocket {
+
+	public Support_Socket accept() throws IOException;
+
+	public void setTimeout(int timeout);
+
+	public void setPort(int port);
+
+	public void open() throws IOException;
+
+	public void close() throws IOException;
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_ServerSocket.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SetTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SetTest.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SetTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SetTest.java Tue Sep  5 06:39:17 2006
@@ -1,45 +1,45 @@
-/* Copyright 1998, 2005 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.
- * 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.support;
-
-import java.util.Set;
-
-public class Support_SetTest extends junit.framework.TestCase {
-
-	Set set; // must contain only the Integers 0 to 99
-
-	public Support_SetTest(String p1) {
-		super(p1);
-	}
-
-	public Support_SetTest(String p1, Set s) {
-		super(p1);
-		set = s;
-	}
-
-	public void runTest() {
-		// add
-		assertTrue("Set Test - Adding a duplicate element changed the set",
-				!set.add(new Integer(50)));
-		assertTrue("Set Test - Removing an element did not change the set", set
-				.remove(new Integer(50)));
-		assertTrue(
-				"Set Test - Adding and removing a duplicate element failed to remove it",
-				!set.contains(new Integer(50)));
-		set.add(new Integer(50));
-		new Support_CollectionTest("", set).runTest();
-	}
-}
+/* Copyright 1998, 2005 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.
+ * 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.support;
+
+import java.util.Set;
+
+public class Support_SetTest extends junit.framework.TestCase {
+
+	Set set; // must contain only the Integers 0 to 99
+
+	public Support_SetTest(String p1) {
+		super(p1);
+	}
+
+	public Support_SetTest(String p1, Set s) {
+		super(p1);
+		set = s;
+	}
+
+	public void runTest() {
+		// add
+		assertTrue("Set Test - Adding a duplicate element changed the set",
+				!set.add(new Integer(50)));
+		assertTrue("Set Test - Removing an element did not change the set", set
+				.remove(new Integer(50)));
+		assertTrue(
+				"Set Test - Adding and removing a duplicate element failed to remove it",
+				!set.contains(new Integer(50)));
+		set.add(new Integer(50));
+		new Support_CollectionTest("", set).runTest();
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SetTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SimpleDateFormat.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SimpleDateFormat.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SimpleDateFormat.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SimpleDateFormat.java Tue Sep  5 06:39:17 2006
@@ -1,260 +1,260 @@
-/* Copyright 2005 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.
- * 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.support;
-
-import java.text.DateFormat;
-import java.text.NumberFormat;
-import java.text.SimpleDateFormat;
-import java.text.DateFormat.Field;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Locale;
-import java.util.TimeZone;
-import java.util.Vector;
-
-public class Support_SimpleDateFormat extends Support_Format {
-
-	public Support_SimpleDateFormat(String p1) {
-		super(p1);
-	}
-
-	public void runTest() {
-		t_formatToCharacterIterator();
-		t_format_with_FieldPosition();
-	}
-
-	public static void main(String[] args) {
-		new Support_SimpleDateFormat("").runTest();
-	}
-
-	public void t_format_with_FieldPosition() {
-		TimeZone tz = TimeZone.getTimeZone("EST");
-		Calendar cal = new GregorianCalendar(tz);
-		cal.set(1999, Calendar.SEPTEMBER, 13, 17, 19, 01);
-		cal.set(Calendar.MILLISECOND, 0);
-		Date date = cal.getTime();
-		SimpleDateFormat format = (SimpleDateFormat) DateFormat
-                .getDateInstance(DateFormat.DEFAULT, Locale.US);
-		format.setTimeZone(tz);
-
-		// test with all pattern chars, and multiple occurances
-		format
-				.applyPattern("G GGGG y yy yyyy M MM MMM MMMM d dd ddd k kk kkk H HH HHH h hh hhh m mmm s ss sss S SS SSS EE EEEE D DD DDD F FF w www W WWW a  aaa  K KKK z zzzz Z ZZZZ");
-
-		StringBuffer textbuffer = new StringBuffer(
-				"AD AD 99 99 1999 9 09 Sep September 13 13 013 17 17 017 17 17 017 5 05");
-		textbuffer
-				.append(" 005 19 019 1 01 001 0 00 000 Mon Monday 256 256 256 2 02 38 038 3 003 PM");
-		textbuffer.append("  PM  5 005 EDT Eastern Daylight Time -0400 -0400");
-
-		// to avoid passing the huge Stringbuffer each time.
-		super.text = textbuffer.toString();
-
-		// test if field positions are set correctly for these fields occuring
-		// multiple times.
-		t_FormatWithField(0, format, date, null, Field.ERA, 0, 2);
-		t_FormatWithField(1, format, date, null, Field.YEAR, 6, 8);
-		t_FormatWithField(2, format, date, null, Field.MONTH, 17, 18);
-		t_FormatWithField(3, format, date, null, Field.DAY_OF_MONTH, 36, 38);
-		t_FormatWithField(4, format, date, null, Field.HOUR_OF_DAY1, 46, 48);
-		t_FormatWithField(5, format, date, null, Field.HOUR_OF_DAY0, 56, 58);
-		t_FormatWithField(6, format, date, null, Field.HOUR1, 66, 67);
-		t_FormatWithField(7, format, date, null, Field.MINUTE, 75, 77);
-		t_FormatWithField(8, format, date, null, Field.SECOND, 82, 83);
-		t_FormatWithField(9, format, date, null, Field.MILLISECOND, 91, 92);
-		t_FormatWithField(10, format, date, null, Field.DAY_OF_WEEK, 100, 103);
-		t_FormatWithField(11, format, date, null, Field.DAY_OF_YEAR, 111, 114);
-		t_FormatWithField(12, format, date, null, Field.DAY_OF_WEEK_IN_MONTH,
-				123, 124);
-		t_FormatWithField(13, format, date, null, Field.WEEK_OF_YEAR, 128, 130);
-		t_FormatWithField(14, format, date, null, Field.WEEK_OF_MONTH, 135, 136);
-		t_FormatWithField(15, format, date, null, Field.AM_PM, 141, 143);
-		t_FormatWithField(16, format, date, null, Field.HOUR0, 149, 150);
-		t_FormatWithField(17, format, date, null, Field.TIME_ZONE, 155, 158);
-
-		// test fields that are not included in the formatted text
-		t_FormatWithField(18, format, date, null,
-				NumberFormat.Field.EXPONENT_SIGN, 0, 0);
-
-		// test with simple example
-		format.applyPattern("h:m z");
-
-		super.text = "5:19 EDT";
-		t_FormatWithField(21, format, date, null, Field.HOUR1, 0, 1);
-		t_FormatWithField(22, format, date, null, Field.MINUTE, 2, 4);
-		t_FormatWithField(23, format, date, null, Field.TIME_ZONE, 5, 8);
-
-		// test fields that are not included in the formatted text
-
-		t_FormatWithField(24, format, date, null, Field.ERA, 0, 0);
-		t_FormatWithField(25, format, date, null, Field.YEAR, 0, 0);
-		t_FormatWithField(26, format, date, null, Field.MONTH, 0, 0);
-		t_FormatWithField(27, format, date, null, Field.DAY_OF_MONTH, 0, 0);
-		t_FormatWithField(28, format, date, null, Field.HOUR_OF_DAY1, 0, 0);
-		t_FormatWithField(29, format, date, null, Field.HOUR_OF_DAY0, 0, 0);
-		t_FormatWithField(30, format, date, null, Field.SECOND, 0, 0);
-		t_FormatWithField(31, format, date, null, Field.MILLISECOND, 0, 0);
-		t_FormatWithField(32, format, date, null, Field.DAY_OF_WEEK, 0, 0);
-		t_FormatWithField(33, format, date, null, Field.DAY_OF_YEAR, 0, 0);
-		t_FormatWithField(34, format, date, null, Field.DAY_OF_WEEK_IN_MONTH,
-				0, 0);
-		t_FormatWithField(35, format, date, null, Field.WEEK_OF_YEAR, 0, 0);
-		t_FormatWithField(36, format, date, null, Field.WEEK_OF_MONTH, 0, 0);
-		t_FormatWithField(37, format, date, null, Field.AM_PM, 0, 0);
-		t_FormatWithField(38, format, date, null, Field.HOUR0, 0, 0);
-
-		t_FormatWithField(39, format, date, null, NumberFormat.Field.EXPONENT,
-				0, 0);
-
-		// test with simple example with pattern char Z
-		format.applyPattern("h:m Z z");
-		super.text = "5:19 -0400 EDT";
-		t_FormatWithField(40, format, date, null, Field.HOUR1, 0, 1);
-		t_FormatWithField(41, format, date, null, Field.MINUTE, 2, 4);
-		t_FormatWithField(42, format, date, null, Field.TIME_ZONE, 5, 10);
-	}
-
-	public void t_formatToCharacterIterator() {
-		TimeZone tz = TimeZone.getTimeZone("EST");
-		Calendar cal = new GregorianCalendar(tz);
-		cal.set(1999, Calendar.SEPTEMBER, 13, 17, 19, 01);
-		cal.set(Calendar.MILLISECOND, 0);
-		Date date = cal.getTime();
-		SimpleDateFormat format = (SimpleDateFormat) DateFormat
-                .getDateInstance(DateFormat.DEFAULT, Locale.US);
-		format.setTimeZone(tz);
-
-		format.applyPattern("yyyyMMddHHmmss");
-		t_Format(1, date, format, getDateVector1());
-
-		format.applyPattern("w W dd MMMM yyyy EEEE");
-		t_Format(2, date, format, getDateVector2());
-
-		format.applyPattern("h:m z");
-		t_Format(3, date, format, getDateVector3());
-
-		format.applyPattern("h:m Z");
-		t_Format(5, date, format, getDateVector5());
-
-		// with all pattern chars, and multiple occurances
-		format
-				.applyPattern("G GGGG y yy yyyy M MM MMM MMMM d dd ddd k kk kkk H HH HHH h hh hhh m mmm s ss sss S SS SSS EE EEEE D DD DDD F FF w www W WWW a  aaa  K KKK z zzzz Z ZZZZ");
-		t_Format(4, date, format, getDateVector4());
-	}
-
-	private Vector getDateVector1() {
-		// "19990913171901"
-		Vector v = new Vector();
-		v.add(new FieldContainer(0, 4, Field.YEAR));
-		v.add(new FieldContainer(4, 6, Field.MONTH));
-		v.add(new FieldContainer(6, 8, Field.DAY_OF_MONTH));
-		v.add(new FieldContainer(8, 10, Field.HOUR_OF_DAY0));
-		v.add(new FieldContainer(10, 12, Field.MINUTE));
-		v.add(new FieldContainer(12, 14, Field.SECOND));
-		return v;
-	}
-
-	private Vector getDateVector2() {
-		// "12 3 5 March 2002 Monday"
-		Vector v = new Vector();
-		v.add(new FieldContainer(0, 2, Field.WEEK_OF_YEAR));
-		v.add(new FieldContainer(3, 4, Field.WEEK_OF_MONTH));
-		v.add(new FieldContainer(5, 7, Field.DAY_OF_MONTH));
-		v.add(new FieldContainer(8, 17, Field.MONTH));
-		v.add(new FieldContainer(18, 22, Field.YEAR));
-		v.add(new FieldContainer(23, 29, Field.DAY_OF_WEEK));
-		return v;
-	}
-
-	private Vector getDateVector3() {
-		// "5:19 EDT"
-		Vector v = new Vector();
-		v.add(new FieldContainer(0, 1, Field.HOUR1));
-		v.add(new FieldContainer(2, 4, Field.MINUTE));
-		v.add(new FieldContainer(5, 8, Field.TIME_ZONE));
-		return v;
-	}
-
-	private Vector getDateVector5() {
-		// "5:19 -0400"
-		Vector v = new Vector();
-		v.add(new FieldContainer(0, 1, Field.HOUR1));
-		v.add(new FieldContainer(2, 4, Field.MINUTE));
-		v.add(new FieldContainer(5, 10, Field.TIME_ZONE));
-		return v;
-	}
-
-	private Vector getDateVector4() {
-		Vector v = new Vector();
-
-		// "AD AD 99 99 1999 9 09 Sep September 13 13 013 17 17 017 17 17 017 5
-		// 05
-		// 005 19 019 1 01 001 0 00 000 Mon Monday 256 256 256 2 02 38 038 3 003
-		// PM
-		// PM 5 005 EDT Eastern Daylight Time -0400 -0400"
-		v.add(new FieldContainer(0, 2, Field.ERA));
-		v.add(new FieldContainer(3, 5, Field.ERA));
-		v.add(new FieldContainer(6, 8, Field.YEAR));
-		v.add(new FieldContainer(9, 11, Field.YEAR));
-		v.add(new FieldContainer(12, 16, Field.YEAR));
-		v.add(new FieldContainer(17, 18, Field.MONTH));
-		v.add(new FieldContainer(19, 21, Field.MONTH));
-		v.add(new FieldContainer(22, 25, Field.MONTH));
-		v.add(new FieldContainer(26, 35, Field.MONTH));
-		v.add(new FieldContainer(36, 38, Field.DAY_OF_MONTH));
-		v.add(new FieldContainer(39, 41, Field.DAY_OF_MONTH));
-		v.add(new FieldContainer(42, 45, Field.DAY_OF_MONTH));
-		v.add(new FieldContainer(46, 48, Field.HOUR_OF_DAY1));
-		v.add(new FieldContainer(49, 51, Field.HOUR_OF_DAY1));
-		v.add(new FieldContainer(52, 55, Field.HOUR_OF_DAY1));
-		v.add(new FieldContainer(56, 58, Field.HOUR_OF_DAY0));
-		v.add(new FieldContainer(59, 61, Field.HOUR_OF_DAY0));
-		v.add(new FieldContainer(62, 65, Field.HOUR_OF_DAY0));
-		v.add(new FieldContainer(66, 67, Field.HOUR1));
-		v.add(new FieldContainer(68, 70, Field.HOUR1));
-		v.add(new FieldContainer(71, 74, Field.HOUR1));
-		v.add(new FieldContainer(75, 77, Field.MINUTE));
-		v.add(new FieldContainer(78, 81, Field.MINUTE));
-		v.add(new FieldContainer(82, 83, Field.SECOND));
-		v.add(new FieldContainer(84, 86, Field.SECOND));
-		v.add(new FieldContainer(87, 90, Field.SECOND));
-		v.add(new FieldContainer(91, 92, Field.MILLISECOND));
-		v.add(new FieldContainer(93, 95, Field.MILLISECOND));
-		v.add(new FieldContainer(96, 99, Field.MILLISECOND));
-		v.add(new FieldContainer(100, 103, Field.DAY_OF_WEEK));
-		v.add(new FieldContainer(104, 110, Field.DAY_OF_WEEK));
-		v.add(new FieldContainer(111, 114, Field.DAY_OF_YEAR));
-		v.add(new FieldContainer(115, 118, Field.DAY_OF_YEAR));
-		v.add(new FieldContainer(119, 122, Field.DAY_OF_YEAR));
-		v.add(new FieldContainer(123, 124, Field.DAY_OF_WEEK_IN_MONTH));
-		v.add(new FieldContainer(125, 127, Field.DAY_OF_WEEK_IN_MONTH));
-		v.add(new FieldContainer(128, 130, Field.WEEK_OF_YEAR));
-		v.add(new FieldContainer(131, 134, Field.WEEK_OF_YEAR));
-		v.add(new FieldContainer(135, 136, Field.WEEK_OF_MONTH));
-		v.add(new FieldContainer(137, 140, Field.WEEK_OF_MONTH));
-		v.add(new FieldContainer(141, 143, Field.AM_PM));
-		v.add(new FieldContainer(145, 147, Field.AM_PM));
-		v.add(new FieldContainer(149, 150, Field.HOUR0));
-		v.add(new FieldContainer(151, 154, Field.HOUR0));
-		v.add(new FieldContainer(155, 158, Field.TIME_ZONE));
-		v.add(new FieldContainer(159, 180, Field.TIME_ZONE));
-		v.add(new FieldContainer(181, 186, Field.TIME_ZONE));
-		v.add(new FieldContainer(187, 192, Field.TIME_ZONE));
-		return v;
-	}
-
-}
+/* Copyright 2005 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.
+ * 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.support;
+
+import java.text.DateFormat;
+import java.text.NumberFormat;
+import java.text.SimpleDateFormat;
+import java.text.DateFormat.Field;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+import java.util.TimeZone;
+import java.util.Vector;
+
+public class Support_SimpleDateFormat extends Support_Format {
+
+	public Support_SimpleDateFormat(String p1) {
+		super(p1);
+	}
+
+	public void runTest() {
+		t_formatToCharacterIterator();
+		t_format_with_FieldPosition();
+	}
+
+	public static void main(String[] args) {
+		new Support_SimpleDateFormat("").runTest();
+	}
+
+	public void t_format_with_FieldPosition() {
+		TimeZone tz = TimeZone.getTimeZone("EST");
+		Calendar cal = new GregorianCalendar(tz);
+		cal.set(1999, Calendar.SEPTEMBER, 13, 17, 19, 01);
+		cal.set(Calendar.MILLISECOND, 0);
+		Date date = cal.getTime();
+		SimpleDateFormat format = (SimpleDateFormat) DateFormat
+                .getDateInstance(DateFormat.DEFAULT, Locale.US);
+		format.setTimeZone(tz);
+
+		// test with all pattern chars, and multiple occurances
+		format
+				.applyPattern("G GGGG y yy yyyy M MM MMM MMMM d dd ddd k kk kkk H HH HHH h hh hhh m mmm s ss sss S SS SSS EE EEEE D DD DDD F FF w www W WWW a  aaa  K KKK z zzzz Z ZZZZ");
+
+		StringBuffer textbuffer = new StringBuffer(
+				"AD AD 99 99 1999 9 09 Sep September 13 13 013 17 17 017 17 17 017 5 05");
+		textbuffer
+				.append(" 005 19 019 1 01 001 0 00 000 Mon Monday 256 256 256 2 02 38 038 3 003 PM");
+		textbuffer.append("  PM  5 005 EDT Eastern Daylight Time -0400 -0400");
+
+		// to avoid passing the huge Stringbuffer each time.
+		super.text = textbuffer.toString();
+
+		// test if field positions are set correctly for these fields occuring
+		// multiple times.
+		t_FormatWithField(0, format, date, null, Field.ERA, 0, 2);
+		t_FormatWithField(1, format, date, null, Field.YEAR, 6, 8);
+		t_FormatWithField(2, format, date, null, Field.MONTH, 17, 18);
+		t_FormatWithField(3, format, date, null, Field.DAY_OF_MONTH, 36, 38);
+		t_FormatWithField(4, format, date, null, Field.HOUR_OF_DAY1, 46, 48);
+		t_FormatWithField(5, format, date, null, Field.HOUR_OF_DAY0, 56, 58);
+		t_FormatWithField(6, format, date, null, Field.HOUR1, 66, 67);
+		t_FormatWithField(7, format, date, null, Field.MINUTE, 75, 77);
+		t_FormatWithField(8, format, date, null, Field.SECOND, 82, 83);
+		t_FormatWithField(9, format, date, null, Field.MILLISECOND, 91, 92);
+		t_FormatWithField(10, format, date, null, Field.DAY_OF_WEEK, 100, 103);
+		t_FormatWithField(11, format, date, null, Field.DAY_OF_YEAR, 111, 114);
+		t_FormatWithField(12, format, date, null, Field.DAY_OF_WEEK_IN_MONTH,
+				123, 124);
+		t_FormatWithField(13, format, date, null, Field.WEEK_OF_YEAR, 128, 130);
+		t_FormatWithField(14, format, date, null, Field.WEEK_OF_MONTH, 135, 136);
+		t_FormatWithField(15, format, date, null, Field.AM_PM, 141, 143);
+		t_FormatWithField(16, format, date, null, Field.HOUR0, 149, 150);
+		t_FormatWithField(17, format, date, null, Field.TIME_ZONE, 155, 158);
+
+		// test fields that are not included in the formatted text
+		t_FormatWithField(18, format, date, null,
+				NumberFormat.Field.EXPONENT_SIGN, 0, 0);
+
+		// test with simple example
+		format.applyPattern("h:m z");
+
+		super.text = "5:19 EDT";
+		t_FormatWithField(21, format, date, null, Field.HOUR1, 0, 1);
+		t_FormatWithField(22, format, date, null, Field.MINUTE, 2, 4);
+		t_FormatWithField(23, format, date, null, Field.TIME_ZONE, 5, 8);
+
+		// test fields that are not included in the formatted text
+
+		t_FormatWithField(24, format, date, null, Field.ERA, 0, 0);
+		t_FormatWithField(25, format, date, null, Field.YEAR, 0, 0);
+		t_FormatWithField(26, format, date, null, Field.MONTH, 0, 0);
+		t_FormatWithField(27, format, date, null, Field.DAY_OF_MONTH, 0, 0);
+		t_FormatWithField(28, format, date, null, Field.HOUR_OF_DAY1, 0, 0);
+		t_FormatWithField(29, format, date, null, Field.HOUR_OF_DAY0, 0, 0);
+		t_FormatWithField(30, format, date, null, Field.SECOND, 0, 0);
+		t_FormatWithField(31, format, date, null, Field.MILLISECOND, 0, 0);
+		t_FormatWithField(32, format, date, null, Field.DAY_OF_WEEK, 0, 0);
+		t_FormatWithField(33, format, date, null, Field.DAY_OF_YEAR, 0, 0);
+		t_FormatWithField(34, format, date, null, Field.DAY_OF_WEEK_IN_MONTH,
+				0, 0);
+		t_FormatWithField(35, format, date, null, Field.WEEK_OF_YEAR, 0, 0);
+		t_FormatWithField(36, format, date, null, Field.WEEK_OF_MONTH, 0, 0);
+		t_FormatWithField(37, format, date, null, Field.AM_PM, 0, 0);
+		t_FormatWithField(38, format, date, null, Field.HOUR0, 0, 0);
+
+		t_FormatWithField(39, format, date, null, NumberFormat.Field.EXPONENT,
+				0, 0);
+
+		// test with simple example with pattern char Z
+		format.applyPattern("h:m Z z");
+		super.text = "5:19 -0400 EDT";
+		t_FormatWithField(40, format, date, null, Field.HOUR1, 0, 1);
+		t_FormatWithField(41, format, date, null, Field.MINUTE, 2, 4);
+		t_FormatWithField(42, format, date, null, Field.TIME_ZONE, 5, 10);
+	}
+
+	public void t_formatToCharacterIterator() {
+		TimeZone tz = TimeZone.getTimeZone("EST");
+		Calendar cal = new GregorianCalendar(tz);
+		cal.set(1999, Calendar.SEPTEMBER, 13, 17, 19, 01);
+		cal.set(Calendar.MILLISECOND, 0);
+		Date date = cal.getTime();
+		SimpleDateFormat format = (SimpleDateFormat) DateFormat
+                .getDateInstance(DateFormat.DEFAULT, Locale.US);
+		format.setTimeZone(tz);
+
+		format.applyPattern("yyyyMMddHHmmss");
+		t_Format(1, date, format, getDateVector1());
+
+		format.applyPattern("w W dd MMMM yyyy EEEE");
+		t_Format(2, date, format, getDateVector2());
+
+		format.applyPattern("h:m z");
+		t_Format(3, date, format, getDateVector3());
+
+		format.applyPattern("h:m Z");
+		t_Format(5, date, format, getDateVector5());
+
+		// with all pattern chars, and multiple occurances
+		format
+				.applyPattern("G GGGG y yy yyyy M MM MMM MMMM d dd ddd k kk kkk H HH HHH h hh hhh m mmm s ss sss S SS SSS EE EEEE D DD DDD F FF w www W WWW a  aaa  K KKK z zzzz Z ZZZZ");
+		t_Format(4, date, format, getDateVector4());
+	}
+
+	private Vector getDateVector1() {
+		// "19990913171901"
+		Vector v = new Vector();
+		v.add(new FieldContainer(0, 4, Field.YEAR));
+		v.add(new FieldContainer(4, 6, Field.MONTH));
+		v.add(new FieldContainer(6, 8, Field.DAY_OF_MONTH));
+		v.add(new FieldContainer(8, 10, Field.HOUR_OF_DAY0));
+		v.add(new FieldContainer(10, 12, Field.MINUTE));
+		v.add(new FieldContainer(12, 14, Field.SECOND));
+		return v;
+	}
+
+	private Vector getDateVector2() {
+		// "12 3 5 March 2002 Monday"
+		Vector v = new Vector();
+		v.add(new FieldContainer(0, 2, Field.WEEK_OF_YEAR));
+		v.add(new FieldContainer(3, 4, Field.WEEK_OF_MONTH));
+		v.add(new FieldContainer(5, 7, Field.DAY_OF_MONTH));
+		v.add(new FieldContainer(8, 17, Field.MONTH));
+		v.add(new FieldContainer(18, 22, Field.YEAR));
+		v.add(new FieldContainer(23, 29, Field.DAY_OF_WEEK));
+		return v;
+	}
+
+	private Vector getDateVector3() {
+		// "5:19 EDT"
+		Vector v = new Vector();
+		v.add(new FieldContainer(0, 1, Field.HOUR1));
+		v.add(new FieldContainer(2, 4, Field.MINUTE));
+		v.add(new FieldContainer(5, 8, Field.TIME_ZONE));
+		return v;
+	}
+
+	private Vector getDateVector5() {
+		// "5:19 -0400"
+		Vector v = new Vector();
+		v.add(new FieldContainer(0, 1, Field.HOUR1));
+		v.add(new FieldContainer(2, 4, Field.MINUTE));
+		v.add(new FieldContainer(5, 10, Field.TIME_ZONE));
+		return v;
+	}
+
+	private Vector getDateVector4() {
+		Vector v = new Vector();
+
+		// "AD AD 99 99 1999 9 09 Sep September 13 13 013 17 17 017 17 17 017 5
+		// 05
+		// 005 19 019 1 01 001 0 00 000 Mon Monday 256 256 256 2 02 38 038 3 003
+		// PM
+		// PM 5 005 EDT Eastern Daylight Time -0400 -0400"
+		v.add(new FieldContainer(0, 2, Field.ERA));
+		v.add(new FieldContainer(3, 5, Field.ERA));
+		v.add(new FieldContainer(6, 8, Field.YEAR));
+		v.add(new FieldContainer(9, 11, Field.YEAR));
+		v.add(new FieldContainer(12, 16, Field.YEAR));
+		v.add(new FieldContainer(17, 18, Field.MONTH));
+		v.add(new FieldContainer(19, 21, Field.MONTH));
+		v.add(new FieldContainer(22, 25, Field.MONTH));
+		v.add(new FieldContainer(26, 35, Field.MONTH));
+		v.add(new FieldContainer(36, 38, Field.DAY_OF_MONTH));
+		v.add(new FieldContainer(39, 41, Field.DAY_OF_MONTH));
+		v.add(new FieldContainer(42, 45, Field.DAY_OF_MONTH));
+		v.add(new FieldContainer(46, 48, Field.HOUR_OF_DAY1));
+		v.add(new FieldContainer(49, 51, Field.HOUR_OF_DAY1));
+		v.add(new FieldContainer(52, 55, Field.HOUR_OF_DAY1));
+		v.add(new FieldContainer(56, 58, Field.HOUR_OF_DAY0));
+		v.add(new FieldContainer(59, 61, Field.HOUR_OF_DAY0));
+		v.add(new FieldContainer(62, 65, Field.HOUR_OF_DAY0));
+		v.add(new FieldContainer(66, 67, Field.HOUR1));
+		v.add(new FieldContainer(68, 70, Field.HOUR1));
+		v.add(new FieldContainer(71, 74, Field.HOUR1));
+		v.add(new FieldContainer(75, 77, Field.MINUTE));
+		v.add(new FieldContainer(78, 81, Field.MINUTE));
+		v.add(new FieldContainer(82, 83, Field.SECOND));
+		v.add(new FieldContainer(84, 86, Field.SECOND));
+		v.add(new FieldContainer(87, 90, Field.SECOND));
+		v.add(new FieldContainer(91, 92, Field.MILLISECOND));
+		v.add(new FieldContainer(93, 95, Field.MILLISECOND));
+		v.add(new FieldContainer(96, 99, Field.MILLISECOND));
+		v.add(new FieldContainer(100, 103, Field.DAY_OF_WEEK));
+		v.add(new FieldContainer(104, 110, Field.DAY_OF_WEEK));
+		v.add(new FieldContainer(111, 114, Field.DAY_OF_YEAR));
+		v.add(new FieldContainer(115, 118, Field.DAY_OF_YEAR));
+		v.add(new FieldContainer(119, 122, Field.DAY_OF_YEAR));
+		v.add(new FieldContainer(123, 124, Field.DAY_OF_WEEK_IN_MONTH));
+		v.add(new FieldContainer(125, 127, Field.DAY_OF_WEEK_IN_MONTH));
+		v.add(new FieldContainer(128, 130, Field.WEEK_OF_YEAR));
+		v.add(new FieldContainer(131, 134, Field.WEEK_OF_YEAR));
+		v.add(new FieldContainer(135, 136, Field.WEEK_OF_MONTH));
+		v.add(new FieldContainer(137, 140, Field.WEEK_OF_MONTH));
+		v.add(new FieldContainer(141, 143, Field.AM_PM));
+		v.add(new FieldContainer(145, 147, Field.AM_PM));
+		v.add(new FieldContainer(149, 150, Field.HOUR0));
+		v.add(new FieldContainer(151, 154, Field.HOUR0));
+		v.add(new FieldContainer(155, 158, Field.TIME_ZONE));
+		v.add(new FieldContainer(159, 180, Field.TIME_ZONE));
+		v.add(new FieldContainer(181, 186, Field.TIME_ZONE));
+		v.add(new FieldContainer(187, 192, Field.TIME_ZONE));
+		return v;
+	}
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_SimpleDateFormat.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Socket.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Socket.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Socket.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Socket.java Tue Sep  5 06:39:17 2006
@@ -1,32 +1,32 @@
-/* Copyright 2002, 2005 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.
- * 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.support;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * This interface provides an extremely basic set of socket operations.
- */
-public interface Support_Socket {
-
-	public InputStream getInputStream() throws IOException;
-
-	public OutputStream getOutputStream() throws IOException;
-
-	public void close() throws IOException;
-}
+/* Copyright 2002, 2005 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.
+ * 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.support;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * This interface provides an extremely basic set of socket operations.
+ */
+public interface Support_Socket {
+
+	public InputStream getInputStream() throws IOException;
+
+	public OutputStream getOutputStream() throws IOException;
+
+	public void close() throws IOException;
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_Socket.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringReader.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringReader.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringReader.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringReader.java Tue Sep  5 06:39:17 2006
@@ -1,229 +1,229 @@
-/* Copyright 2001, 2005 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.
- * 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.support;
-
-import java.io.IOException;
-import java.io.Reader;
-
-public class Support_StringReader extends Reader {
-	private String str;
-
-	private int markpos = -1;
-
-	private int pos = 0;
-
-	private int count;
-
-	/**
-	 * Construct a StringReader on the String <code>str</code>. The size of
-	 * the reader is set to the <code>length()</code> of the String and the
-	 * Object to synchronize access through is set to <code>str</code>.
-	 * 
-	 * @param str
-	 *            the String to filter reads on.
-	 */
-	public Support_StringReader(String str) {
-		super(str);
-		this.str = str;
-		this.count = str.length();
-	}
-
-	/**
-	 * This method closes this StringReader. Once it is closed, you can no
-	 * longer read from it. Only the first invocation of this method has any
-	 * effect.
-	 * 
-	 */
-	public void close() {
-		synchronized (lock) {
-			if (isOpen())
-				str = null;
-		}
-	}
-
-	/**
-	 * Answer a boolean indicating whether or not this StringReader is open.
-	 */
-	private boolean isOpen() {
-		return str != null;
-	}
-
-	/**
-	 * Set a Mark position in this Reader. The parameter <code>readLimit</code>
-	 * is ignored for StringReaders. Sending reset() will reposition the reader
-	 * back to the marked position provided the mark has not been invalidated.
-	 * 
-	 * @param readlimit
-	 *            ignored for StringReaders.
-	 * 
-	 * @exception java.io.IOException
-	 *                If an error occurs attempting mark this StringReader.
-	 */
-	public void mark(int readLimit) throws IOException {
-		if (readLimit >= 0) {
-			synchronized (lock) {
-				if (isOpen())
-					markpos = pos;
-				else
-					throw new IOException("StringReader is closed");
-			}
-		} else
-			throw new IllegalArgumentException();
-	}
-
-	/**
-	 * Answers a boolean indicating whether or not this StringReader supports
-	 * mark() and reset(). This method always returns true.
-	 * 
-	 * @return <code>true</code> if mark() and reset() are supported,
-	 *         <code>false</code> otherwise. This implementation always
-	 *         returns <code>true</code>.
-	 */
-	public boolean markSupported() {
-		return true;
-	}
-
-	/**
-	 * Reads a single character from this StringReader and returns the result as
-	 * an int. The 2 higher-order bytes are set to 0. If the end of reader was
-	 * encountered then return -1.
-	 * 
-	 * @return the character read or -1 if end of reader.
-	 * 
-	 * @exception java.io.IOException
-	 *                If the StringReader is already closed.
-	 */
-	public int read() throws IOException {
-		synchronized (lock) {
-			if (isOpen()) {
-				if (pos != count)
-					return str.charAt(pos++);
-				return -1;
-			} else
-				throw new IOException("StringReader is closed");
-		}
-	}
-
-	/**
-	 * Reads at most <code>count</code> characters from this StringReader and
-	 * stores them at <code>offset</code> in the character array
-	 * <code>buf</code>. Returns the number of characters actually read or -1
-	 * if the end of reader was encountered.
-	 * 
-	 * @param buf
-	 *            character array to store the read characters
-	 * @param offset
-	 *            offset in buf to store the read characters
-	 * @param count
-	 *            maximum number of characters to read
-	 * @return the number of characters read or -1 if end of reader.
-	 * 
-	 * @exception java.io.IOException
-	 *                If the StringReader is closed.
-	 */
-	public int read(char buf[], int offset, int count) throws IOException {
-		// avoid int overflow
-		if (0 <= offset && offset <= buf.length && 0 <= count
-				&& count <= buf.length - offset) {
-			synchronized (lock) {
-				if (isOpen()) {
-					if (pos == this.count)
-						return -1;
-					int end = pos + count > this.count ? this.count : pos
-							+ count;
-					str.getChars(pos, end, buf, offset);
-					int read = end - pos;
-					pos = end;
-					return read;
-				} else
-					throw new IOException("StringReader is closed");
-			}
-		} else
-			throw new ArrayIndexOutOfBoundsException();
-	}
-
-	/**
-	 * Answers a <code>boolean</code> indicating whether or not this
-	 * StringReader is ready to be read without blocking. If the result is
-	 * <code>true</code>, the next <code>read()</code> will not block. If
-	 * the result is <code>false</code> this Reader may or may not block when
-	 * <code>read()</code> is sent. The implementation in StringReader always
-	 * returns <code>true</code> even when it has been closed.
-	 * 
-	 * @return <code>true</code> if the receiver will not block when
-	 *         <code>read()</code> is called, <code>false</code> if unknown
-	 *         or blocking will occur.
-	 * 
-	 * @exception java.io.IOException
-	 *                If an IO error occurs.
-	 */
-	public boolean ready() throws IOException {
-		synchronized (lock) {
-			if (isOpen())
-				return true;
-			throw new IOException("StringReader is closed");
-		}
-	}
-
-	/**
-	 * Reset this StringReader's position to the last <code>mark()</code>
-	 * location. Invocations of <code>read()/skip()</code> will occur from
-	 * this new location. If this Reader was not marked, the StringReader is
-	 * reset to the beginning of the String.
-	 * 
-	 * @exception java.io.IOException
-	 *                If this StringReader has already been closed.
-	 */
-	public void reset() throws IOException {
-		synchronized (lock) {
-			if (isOpen())
-				pos = markpos != -1 ? markpos : 0;
-			else
-				throw new IOException("StringReader is closed");
-		}
-	}
-
-	/**
-	 * Skips <code>count</code> number of characters in this StringReader.
-	 * Subsequent <code>read()</code>'s will not return these characters
-	 * unless <code>reset()</code> is used.
-	 * 
-	 * @param count
-	 *            The number of characters to skip.
-	 * @return the number of characters actually skipped.
-	 * 
-	 * @exception java.io.IOException
-	 *                If this StringReader has already been closed.
-	 */
-	public long skip(long count) throws IOException {
-		synchronized (lock) {
-			if (isOpen()) {
-				if (count <= 0)
-					return 0;
-				long skipped = 0;
-				if (count < this.count - pos) {
-					pos = pos + (int) count;
-					skipped = count;
-				} else {
-					skipped = this.count - pos;
-					pos = this.count;
-				}
-				return skipped;
-			} else
-				throw new IOException("StringReader is closed");
-		}
-	}
-}
+/* Copyright 2001, 2005 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.
+ * 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.support;
+
+import java.io.IOException;
+import java.io.Reader;
+
+public class Support_StringReader extends Reader {
+	private String str;
+
+	private int markpos = -1;
+
+	private int pos = 0;
+
+	private int count;
+
+	/**
+	 * Construct a StringReader on the String <code>str</code>. The size of
+	 * the reader is set to the <code>length()</code> of the String and the
+	 * Object to synchronize access through is set to <code>str</code>.
+	 * 
+	 * @param str
+	 *            the String to filter reads on.
+	 */
+	public Support_StringReader(String str) {
+		super(str);
+		this.str = str;
+		this.count = str.length();
+	}
+
+	/**
+	 * This method closes this StringReader. Once it is closed, you can no
+	 * longer read from it. Only the first invocation of this method has any
+	 * effect.
+	 * 
+	 */
+	public void close() {
+		synchronized (lock) {
+			if (isOpen())
+				str = null;
+		}
+	}
+
+	/**
+	 * Answer a boolean indicating whether or not this StringReader is open.
+	 */
+	private boolean isOpen() {
+		return str != null;
+	}
+
+	/**
+	 * Set a Mark position in this Reader. The parameter <code>readLimit</code>
+	 * is ignored for StringReaders. Sending reset() will reposition the reader
+	 * back to the marked position provided the mark has not been invalidated.
+	 * 
+	 * @param readlimit
+	 *            ignored for StringReaders.
+	 * 
+	 * @exception java.io.IOException
+	 *                If an error occurs attempting mark this StringReader.
+	 */
+	public void mark(int readLimit) throws IOException {
+		if (readLimit >= 0) {
+			synchronized (lock) {
+				if (isOpen())
+					markpos = pos;
+				else
+					throw new IOException("StringReader is closed");
+			}
+		} else
+			throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Answers a boolean indicating whether or not this StringReader supports
+	 * mark() and reset(). This method always returns true.
+	 * 
+	 * @return <code>true</code> if mark() and reset() are supported,
+	 *         <code>false</code> otherwise. This implementation always
+	 *         returns <code>true</code>.
+	 */
+	public boolean markSupported() {
+		return true;
+	}
+
+	/**
+	 * Reads a single character from this StringReader and returns the result as
+	 * an int. The 2 higher-order bytes are set to 0. If the end of reader was
+	 * encountered then return -1.
+	 * 
+	 * @return the character read or -1 if end of reader.
+	 * 
+	 * @exception java.io.IOException
+	 *                If the StringReader is already closed.
+	 */
+	public int read() throws IOException {
+		synchronized (lock) {
+			if (isOpen()) {
+				if (pos != count)
+					return str.charAt(pos++);
+				return -1;
+			} else
+				throw new IOException("StringReader is closed");
+		}
+	}
+
+	/**
+	 * Reads at most <code>count</code> characters from this StringReader and
+	 * stores them at <code>offset</code> in the character array
+	 * <code>buf</code>. Returns the number of characters actually read or -1
+	 * if the end of reader was encountered.
+	 * 
+	 * @param buf
+	 *            character array to store the read characters
+	 * @param offset
+	 *            offset in buf to store the read characters
+	 * @param count
+	 *            maximum number of characters to read
+	 * @return the number of characters read or -1 if end of reader.
+	 * 
+	 * @exception java.io.IOException
+	 *                If the StringReader is closed.
+	 */
+	public int read(char buf[], int offset, int count) throws IOException {
+		// avoid int overflow
+		if (0 <= offset && offset <= buf.length && 0 <= count
+				&& count <= buf.length - offset) {
+			synchronized (lock) {
+				if (isOpen()) {
+					if (pos == this.count)
+						return -1;
+					int end = pos + count > this.count ? this.count : pos
+							+ count;
+					str.getChars(pos, end, buf, offset);
+					int read = end - pos;
+					pos = end;
+					return read;
+				} else
+					throw new IOException("StringReader is closed");
+			}
+		} else
+			throw new ArrayIndexOutOfBoundsException();
+	}
+
+	/**
+	 * Answers a <code>boolean</code> indicating whether or not this
+	 * StringReader is ready to be read without blocking. If the result is
+	 * <code>true</code>, the next <code>read()</code> will not block. If
+	 * the result is <code>false</code> this Reader may or may not block when
+	 * <code>read()</code> is sent. The implementation in StringReader always
+	 * returns <code>true</code> even when it has been closed.
+	 * 
+	 * @return <code>true</code> if the receiver will not block when
+	 *         <code>read()</code> is called, <code>false</code> if unknown
+	 *         or blocking will occur.
+	 * 
+	 * @exception java.io.IOException
+	 *                If an IO error occurs.
+	 */
+	public boolean ready() throws IOException {
+		synchronized (lock) {
+			if (isOpen())
+				return true;
+			throw new IOException("StringReader is closed");
+		}
+	}
+
+	/**
+	 * Reset this StringReader's position to the last <code>mark()</code>
+	 * location. Invocations of <code>read()/skip()</code> will occur from
+	 * this new location. If this Reader was not marked, the StringReader is
+	 * reset to the beginning of the String.
+	 * 
+	 * @exception java.io.IOException
+	 *                If this StringReader has already been closed.
+	 */
+	public void reset() throws IOException {
+		synchronized (lock) {
+			if (isOpen())
+				pos = markpos != -1 ? markpos : 0;
+			else
+				throw new IOException("StringReader is closed");
+		}
+	}
+
+	/**
+	 * Skips <code>count</code> number of characters in this StringReader.
+	 * Subsequent <code>read()</code>'s will not return these characters
+	 * unless <code>reset()</code> is used.
+	 * 
+	 * @param count
+	 *            The number of characters to skip.
+	 * @return the number of characters actually skipped.
+	 * 
+	 * @exception java.io.IOException
+	 *                If this StringReader has already been closed.
+	 */
+	public long skip(long count) throws IOException {
+		synchronized (lock) {
+			if (isOpen()) {
+				if (count <= 0)
+					return 0;
+				long skipped = 0;
+				if (count < this.count - pos) {
+					pos = pos + (int) count;
+					skipped = count;
+				} else {
+					skipped = this.count - pos;
+					pos = this.count;
+				}
+				return skipped;
+			} else
+				throw new IOException("StringReader is closed");
+		}
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringWriter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringWriter.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringWriter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringWriter.java Tue Sep  5 06:39:17 2006
@@ -1,167 +1,167 @@
-/* Copyright 2001, 2005 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.
- * 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.support;
-
-import java.io.IOException;
-import java.io.Writer;
-
-public class Support_StringWriter extends Writer {
-	private StringBuffer buf;
-
-	/**
-	 * Constructs a new StringWriter which has a StringBuffer allocated with the
-	 * default size of 16 characters. The StringBuffer is also the
-	 * <code>lock</code> used to synchronize access to this Writer.
-	 */
-	public Support_StringWriter() {
-		super();
-		buf = new StringBuffer(16);
-		lock = buf;
-	}
-
-	/**
-	 * Constructs a new StringWriter which has a StringBuffer allocated with the
-	 * size of <code>initialSize</code> characters. The StringBuffer is also
-	 * the <code>lock</code> used to synchronize access to this Writer.
-	 */
-	public Support_StringWriter(int initialSize) {
-		if (initialSize >= 0) {
-			buf = new StringBuffer(initialSize);
-			lock = buf;
-		} else
-			throw new IllegalArgumentException();
-	}
-
-	/**
-	 * Close this Writer. This is the concrete implementation required. This
-	 * particular implementation does nothing.
-	 * 
-	 * @exception java.io.IOException
-	 *                If an IO error occurs closing this StringWriter.
-	 */
-	public void close() throws IOException {
-	}
-
-	/**
-	 * Flush this Writer. This is the concrete implementation required. This
-	 * particular implementation does nothing.
-	 * 
-	 */
-	public void flush() {
-	}
-
-	/**
-	 * Answer the contents of this StringWriter as a StringBuffer. Any changes
-	 * made to the StringBuffer by the receiver or the caller are reflected in
-	 * this StringWriter.
-	 * 
-	 * @return this StringWriters local StringBuffer.
-	 */
-	public StringBuffer getBuffer() {
-		synchronized (lock) {
-			return buf;
-		}
-	}
-
-	/**
-	 * Answer the contents of this StringWriter as a String. Any changes made to
-	 * the StringBuffer by the receiver after returning will not be reflected in
-	 * the String returned to the caller.
-	 * 
-	 * @return this StringWriters current contents as a String.
-	 */
-	public String toString() {
-		synchronized (lock) {
-			return buf.toString();
-		}
-	}
-
-	/**
-	 * Writes <code>count</code> characters starting at <code>offset</code>
-	 * in <code>buf</code> to this StringWriter.
-	 * 
-	 * @param buf
-	 *            the non-null array containing characters to write.
-	 * @param offset
-	 *            offset in buf to retrieve characters
-	 * @param count
-	 *            maximum number of characters to write
-	 * 
-	 * @exception java.lang.ArrayIndexOutOfBoundsException
-	 *                If offset or count are outside of bounds.
-	 */
-	public void write(char[] buf, int offset, int count) {
-		// avoid int overflow
-		if (0 <= offset && offset <= buf.length && 0 <= count
-				&& count <= buf.length - offset) {
-			synchronized (lock) {
-				this.buf.append(buf, offset, count);
-			}
-		} else
-			throw new ArrayIndexOutOfBoundsException();
-	}
-
-	/**
-	 * Writes the specified character <code>oneChar</code> to this
-	 * StringWriter. This implementation writes the low order two bytes to the
-	 * Stream.
-	 * 
-	 * @param oneChar
-	 *            The character to write
-	 * 
-	 */
-	public void write(int oneChar) {
-		synchronized (lock) {
-			buf.append((char) oneChar);
-		}
-	}
-
-	/**
-	 * Writes the characters from the String <code>str</code> to this
-	 * StringWriter.
-	 * 
-	 * @param str
-	 *            the non-null String containing the characters to write.
-	 * 
-	 */
-	public void write(String str) {
-		synchronized (lock) {
-			buf.append(str);
-		}
-	}
-
-	/**
-	 * Writes <code>count</code> number of characters starting at
-	 * <code>offset</code> from the String <code>str</code> to this
-	 * StringWriter.
-	 * 
-	 * @param str
-	 *            the non-null String containing the characters to write.
-	 * @param offset
-	 *            the starting point to retrieve characters.
-	 * @param count
-	 *            the number of characters to retrieve and write.
-	 * 
-	 * @exception java.lang.ArrayIndexOutOfBoundsException
-	 *                If offset or count are outside of bounds.
-	 */
-	public void write(String str, int offset, int count) {
-		String sub = str.substring(offset, offset + count);
-		synchronized (lock) {
-			buf.append(sub);
-		}
-	}
-}
+/* Copyright 2001, 2005 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.
+ * 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.support;
+
+import java.io.IOException;
+import java.io.Writer;
+
+public class Support_StringWriter extends Writer {
+	private StringBuffer buf;
+
+	/**
+	 * Constructs a new StringWriter which has a StringBuffer allocated with the
+	 * default size of 16 characters. The StringBuffer is also the
+	 * <code>lock</code> used to synchronize access to this Writer.
+	 */
+	public Support_StringWriter() {
+		super();
+		buf = new StringBuffer(16);
+		lock = buf;
+	}
+
+	/**
+	 * Constructs a new StringWriter which has a StringBuffer allocated with the
+	 * size of <code>initialSize</code> characters. The StringBuffer is also
+	 * the <code>lock</code> used to synchronize access to this Writer.
+	 */
+	public Support_StringWriter(int initialSize) {
+		if (initialSize >= 0) {
+			buf = new StringBuffer(initialSize);
+			lock = buf;
+		} else
+			throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Close this Writer. This is the concrete implementation required. This
+	 * particular implementation does nothing.
+	 * 
+	 * @exception java.io.IOException
+	 *                If an IO error occurs closing this StringWriter.
+	 */
+	public void close() throws IOException {
+	}
+
+	/**
+	 * Flush this Writer. This is the concrete implementation required. This
+	 * particular implementation does nothing.
+	 * 
+	 */
+	public void flush() {
+	}
+
+	/**
+	 * Answer the contents of this StringWriter as a StringBuffer. Any changes
+	 * made to the StringBuffer by the receiver or the caller are reflected in
+	 * this StringWriter.
+	 * 
+	 * @return this StringWriters local StringBuffer.
+	 */
+	public StringBuffer getBuffer() {
+		synchronized (lock) {
+			return buf;
+		}
+	}
+
+	/**
+	 * Answer the contents of this StringWriter as a String. Any changes made to
+	 * the StringBuffer by the receiver after returning will not be reflected in
+	 * the String returned to the caller.
+	 * 
+	 * @return this StringWriters current contents as a String.
+	 */
+	public String toString() {
+		synchronized (lock) {
+			return buf.toString();
+		}
+	}
+
+	/**
+	 * Writes <code>count</code> characters starting at <code>offset</code>
+	 * in <code>buf</code> to this StringWriter.
+	 * 
+	 * @param buf
+	 *            the non-null array containing characters to write.
+	 * @param offset
+	 *            offset in buf to retrieve characters
+	 * @param count
+	 *            maximum number of characters to write
+	 * 
+	 * @exception java.lang.ArrayIndexOutOfBoundsException
+	 *                If offset or count are outside of bounds.
+	 */
+	public void write(char[] buf, int offset, int count) {
+		// avoid int overflow
+		if (0 <= offset && offset <= buf.length && 0 <= count
+				&& count <= buf.length - offset) {
+			synchronized (lock) {
+				this.buf.append(buf, offset, count);
+			}
+		} else
+			throw new ArrayIndexOutOfBoundsException();
+	}
+
+	/**
+	 * Writes the specified character <code>oneChar</code> to this
+	 * StringWriter. This implementation writes the low order two bytes to the
+	 * Stream.
+	 * 
+	 * @param oneChar
+	 *            The character to write
+	 * 
+	 */
+	public void write(int oneChar) {
+		synchronized (lock) {
+			buf.append((char) oneChar);
+		}
+	}
+
+	/**
+	 * Writes the characters from the String <code>str</code> to this
+	 * StringWriter.
+	 * 
+	 * @param str
+	 *            the non-null String containing the characters to write.
+	 * 
+	 */
+	public void write(String str) {
+		synchronized (lock) {
+			buf.append(str);
+		}
+	}
+
+	/**
+	 * Writes <code>count</code> number of characters starting at
+	 * <code>offset</code> from the String <code>str</code> to this
+	 * StringWriter.
+	 * 
+	 * @param str
+	 *            the non-null String containing the characters to write.
+	 * @param offset
+	 *            the starting point to retrieve characters.
+	 * @param count
+	 *            the number of characters to retrieve and write.
+	 * 
+	 * @exception java.lang.ArrayIndexOutOfBoundsException
+	 *                If offset or count are outside of bounds.
+	 */
+	public void write(String str, int offset, int count) {
+		String sub = str.substring(offset, offset + count);
+		synchronized (lock) {
+			buf.append(sub);
+		}
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_StringWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestProvider.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestProvider.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestProvider.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestProvider.java Tue Sep  5 06:39:17 2006
@@ -1,121 +1,121 @@
-/* Copyright 2005 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.
- * 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.support;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.Provider;
-
-/**
- * This class implements a dummy provider.
- */
-public class Support_TestProvider extends Provider {
-	// Provider name
-	private static final String NAME = "TestProvider";
-
-	// Version of the services provided
-	private static final double VERSION = 1.0;
-
-	private static final String INFO = NAME
-			+ " DSA key, parameter generation and signing; SHA-1 digest; "
-			+ "SHA1PRNG SecureRandom; PKCS#12/Netscape KeyStore";
-
-	/**
-	 * Constructs a new instance of the dummy provider.
-	 */
-	public Support_TestProvider() {
-		super(NAME, VERSION, INFO);
-		registerServices();
-	}
-
-	/**
-	 * Register the services the receiver provides.
-	 */
-	private void registerServices() {
-		AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				// Digest engine
-				put("MessageDigest.SHA",
-						"made.up.provider.name.MessageDigestSHA");
-				put("MessageDigest.MD2",
-						"made.up.provider.name.MessageDigestMD2");
-				// aliases
-				put("Alg.Alias.MessageDigest.SHA1", "SHA");
-				put("Alg.Alias.MessageDigest.SHA-1", "SHA");
-				put("Alg.Alias.MessageDigest.OID.1.3.14.3.2.26", "SHA");
-				put("Alg.Alias.MessageDigest.1.3.14.3.2.26", "SHA");
-
-				// Algorithm parameter generator
-				put("AlgorithmParameterGenerator.DSA",
-						"made.up.provider.name.AlgorithmParameterGeneratorDSA");
-
-				// Algorithm parameters
-				put("AlgorithmParameters.DSA",
-						"made.up.provider.name.AlgorithmParametersDSA");
-				// aliases
-				put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1", "DSA");
-				put("Alg.Alias.AlgorithmParameters.1.3.14.3.2.12", "DSA");
-
-				// Key pair generator
-				put("KeyPairGenerator.DSA",
-						"made.up.provider.name.KeyPairGeneratorDSA");
-				// aliases
-				put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
-				put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
-				put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");
-
-				// Key factory
-				put("KeyFactory.DSA", "made.up.provider.name.KeyFactoryDSA");
-				put("KeyFactory.RSA", "made.up.provider.name.KeyFactoryRSA");
-				// aliases
-				put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
-				put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
-
-				// Signature algorithm
-				put("Signature.SHA1withDSA",
-						"made.up.provider.name.SignatureDSA");
-
-				// aliases
-				put("Alg.Alias.Signature.DSA", "SHA1withDSA");
-				put("Alg.Alias.Signature.DSS", "SHA1withDSA");
-				put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
-				put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
-				put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
-				put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
-				put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA");
-				put("Alg.Alias.Signature.DSAWithSHA1", "SHA1withDSA");
-				put("Alg.Alias.Signature.SHA-1withDSA", "SHA1withDSA");
-				put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA");
-				put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
-				put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
-				put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
-				put("Alg.Alias.Signature.OID.1.3.14.3.2.13", "SHA1withDSA");
-				put("Alg.Alias.Signature.OID.1.3.14.3.2.27", "SHA1withDSA");
-
-				put("KeyStore.PKCS#12/Netscape",
-						"tests.support.Support_DummyPKCS12Keystore");
-
-				// Certificate
-				put("CertificateFactory.X509",
-						"made.up.provider.name.CertificateFactoryX509");
-				// aliases
-				put("Alg.Alias.CertificateFactory.X.509", "X509");
-
-				return null;
-			}
-		});
-	}
+/* Copyright 2005 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.
+ * 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.support;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.Provider;
+
+/**
+ * This class implements a dummy provider.
+ */
+public class Support_TestProvider extends Provider {
+	// Provider name
+	private static final String NAME = "TestProvider";
+
+	// Version of the services provided
+	private static final double VERSION = 1.0;
+
+	private static final String INFO = NAME
+			+ " DSA key, parameter generation and signing; SHA-1 digest; "
+			+ "SHA1PRNG SecureRandom; PKCS#12/Netscape KeyStore";
+
+	/**
+	 * Constructs a new instance of the dummy provider.
+	 */
+	public Support_TestProvider() {
+		super(NAME, VERSION, INFO);
+		registerServices();
+	}
+
+	/**
+	 * Register the services the receiver provides.
+	 */
+	private void registerServices() {
+		AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+				// Digest engine
+				put("MessageDigest.SHA",
+						"made.up.provider.name.MessageDigestSHA");
+				put("MessageDigest.MD2",
+						"made.up.provider.name.MessageDigestMD2");
+				// aliases
+				put("Alg.Alias.MessageDigest.SHA1", "SHA");
+				put("Alg.Alias.MessageDigest.SHA-1", "SHA");
+				put("Alg.Alias.MessageDigest.OID.1.3.14.3.2.26", "SHA");
+				put("Alg.Alias.MessageDigest.1.3.14.3.2.26", "SHA");
+
+				// Algorithm parameter generator
+				put("AlgorithmParameterGenerator.DSA",
+						"made.up.provider.name.AlgorithmParameterGeneratorDSA");
+
+				// Algorithm parameters
+				put("AlgorithmParameters.DSA",
+						"made.up.provider.name.AlgorithmParametersDSA");
+				// aliases
+				put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1", "DSA");
+				put("Alg.Alias.AlgorithmParameters.1.3.14.3.2.12", "DSA");
+
+				// Key pair generator
+				put("KeyPairGenerator.DSA",
+						"made.up.provider.name.KeyPairGeneratorDSA");
+				// aliases
+				put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
+				put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
+				put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");
+
+				// Key factory
+				put("KeyFactory.DSA", "made.up.provider.name.KeyFactoryDSA");
+				put("KeyFactory.RSA", "made.up.provider.name.KeyFactoryRSA");
+				// aliases
+				put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
+				put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
+
+				// Signature algorithm
+				put("Signature.SHA1withDSA",
+						"made.up.provider.name.SignatureDSA");
+
+				// aliases
+				put("Alg.Alias.Signature.DSA", "SHA1withDSA");
+				put("Alg.Alias.Signature.DSS", "SHA1withDSA");
+				put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
+				put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
+				put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
+				put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
+				put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA");
+				put("Alg.Alias.Signature.DSAWithSHA1", "SHA1withDSA");
+				put("Alg.Alias.Signature.SHA-1withDSA", "SHA1withDSA");
+				put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA");
+				put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
+				put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
+				put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
+				put("Alg.Alias.Signature.OID.1.3.14.3.2.13", "SHA1withDSA");
+				put("Alg.Alias.Signature.OID.1.3.14.3.2.27", "SHA1withDSA");
+
+				put("KeyStore.PKCS#12/Netscape",
+						"tests.support.Support_DummyPKCS12Keystore");
+
+				// Certificate
+				put("CertificateFactory.X509",
+						"made.up.provider.name.CertificateFactoryX509");
+				// aliases
+				put("Alg.Alias.CertificateFactory.X.509", "X509");
+
+				return null;
+			}
+		});
+	}
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestResource.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestResource.java?view=diff&rev=440340&r1=440339&r2=440340
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestResource.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestResource.java Tue Sep  5 06:39:17 2006
@@ -1,27 +1,27 @@
-/* Copyright 1998, 2005 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.
- * 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.support;
-
-public class Support_TestResource extends java.util.ListResourceBundle {
-
-	protected Object[][] getContents() {
-		Object[][] contents = { { "parent1", "parentValue1" },
-				{ "parent2", "parentValue2" }, { "parent3", "parentValue3" },
-				{ "parent4", "parentValue4" }, };
-		return contents;
-	}
-
-}
+/* Copyright 1998, 2005 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.
+ * 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.support;
+
+public class Support_TestResource extends java.util.ListResourceBundle {
+
+	protected Object[][] getContents() {
+		Object[][] contents = { { "parent1", "parentValue1" },
+				{ "parent2", "parentValue2" }, { "parent3", "parentValue3" },
+				{ "parent4", "parentValue4" }, };
+		return contents;
+	}
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/support/Support_TestResource.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message