harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qi...@apache.org
Subject svn commit: r791082 [7/8] - in /harmony/enhanced/classlib/branches/java6: ./ depends/build/ depends/build/platform/ depends/manifests/asm-3.1/ make/ modules/accessibility/ modules/accessibility/make/ modules/accessibility/src/main/java/javax/accessibil...
Date Sat, 04 Jul 2009 08:38:24 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/security/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/build.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/build.xml Sat Jul  4 08:38:13 2009
@@ -23,6 +23,8 @@
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
+    <property name="tests.output" location="../../build/test_report" />
+
     <!-- set global properties for this build. -->
     <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
 
@@ -291,7 +293,7 @@
                     <pathelement path="${hy.hdk}/build/test/support.jar" />
                 </classpath>
 
-                <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+                <batchtest todir="${tests.output}" haltonfailure="no" >
                     <fileset dir="${hy.security.src.test}/api/java">
                         <!-- if ${test.case}     -->
                         <include name="${converted.tc}" if="test.case" />
@@ -309,7 +311,7 @@
                 <!-- to pick up junit.jar               -->
                 <jvmarg value="-Xbootclasspath/a:${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api_in.jar${path.separator}../../${junit.jar}${path.separator}../../build/tests${path.separator}${hy.hdk}/build/test/support.jar${path.separator}${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar"/>
 
-                <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+                <batchtest todir="${tests.output}" haltonfailure="no" >
                     <fileset dir="${hy.security.src.test}/api/java.injected">
                         <!-- if ${test.case}     -->
                         <include name="${converted.tc}" if="test.case" />
@@ -335,7 +337,7 @@
                     <pathelement path="${hy.hdk}/build/test/support.jar" />
                 </classpath>
                 
-                <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+                <batchtest todir="${tests.output}" haltonfailure="no" >
                     <fileset dir="${hy.security.src.test}/impl/java">
                         <!-- if ${test.case}     -->
                         <include name="${converted.tc}" if="test.case" />
@@ -353,7 +355,7 @@
                 <!-- to pick up junit.jar               -->
                 <jvmarg value="-Xbootclasspath/a:${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl_in.jar${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar${path.separator}${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar"/>
 
-                <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+                <batchtest todir="${tests.output}" haltonfailure="no" >
                     <fileset dir="${hy.security.src.test}/impl/java.injected">
                         <!-- if ${test.case}     -->
                         <include name="${converted.tc}" if="test.case" />
@@ -371,12 +373,12 @@
     </target>
 
     <target name="touch-failures-file" if="test.failures">
-        <echo file="${hy.tests.reports}/test.failures"
+        <echo file="${tests.output}/test.failures"
             append="true">security${line.separator}</echo>
     </target>
 
     <target name="touch-errors-file" if="test.errors">
-        <echo file="${hy.tests.reports}/test.errors"
+        <echo file="${tests.output}/test.errors"
             append="true">security${line.separator}</echo>
     </target>
 
@@ -417,7 +419,7 @@
         <sequential>
             <echo message="Running SECURITY @{description}" />
 
-            <mkdir dir="${hy.tests.reports}" />
+            <mkdir dir="${tests.output}" />
 
             <property name="test.jre.home" value="${hy.jdk}/jre" />
 

Modified: harmony/enhanced/classlib/branches/java6/modules/security/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/make/hyproperties.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/make/hyproperties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/make/hyproperties.xml Sat Jul  4 08:38:13 2009
@@ -41,7 +41,4 @@
    <jdk location="../../deploy/jdk" />
    <build location="../../build/classes" />
 
-   <tests>
-      <reports location="../../build/test_report" />
-   </tests>
 </hy>

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Certificate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Certificate.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Certificate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Certificate.java Sat Jul  4 08:38:13 2009
@@ -27,7 +27,7 @@
  * validity of itself. It's in the responsibility of the application to verify
  * the validity of its certificates.
  * 
- * @deprecated Replaced by behavior in {@link javax.security.cert}
+ * @deprecated Replaced by behavior in {@link java.security.cert}
  * @see java.security.cert.Certificate
  */
 @Deprecated

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/CodeSigner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/CodeSigner.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/CodeSigner.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/CodeSigner.java Sat Jul  4 08:38:13 2009
@@ -127,8 +127,7 @@
      */
     public String toString() {
         // There is no any special reason for '256' here, it's taken abruptly
-        // FIXME: 1.5 StringBuffer => StringBuilder
-        StringBuffer buf = new StringBuffer(256);
+        StringBuilder buf = new StringBuilder(256);
         // The javadoc says nothing, and the others implementations behavior seems as 
         // dumping only the first certificate. Well, let's do the same.
         buf.append("CodeSigner [").append(signerCertPath.getCertificates().get(0)); //$NON-NLS-1$
@@ -138,4 +137,4 @@
         buf.append("]"); //$NON-NLS-1$
         return buf.toString();
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java Sat Jul  4 08:38:13 2009
@@ -195,7 +195,7 @@
      * @return a printable representation for this {@code IdentityScope}.
      */
     public String toString() {
-        return new StringBuffer(super.toString())
+        return new StringBuilder(super.toString())
                 .append("[").append(size()).append("]").toString(); //$NON-NLS-1$ //$NON-NLS-2$
     }
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java Sat Jul  4 08:38:13 2009
@@ -1337,7 +1337,7 @@
          * @return a printable representation for this {@code PrivateKeyEntry}.
          */
         public String toString() {
-            StringBuffer sb = new StringBuffer(
+            StringBuilder sb = new StringBuilder(
                     "PrivateKeyEntry: number of elements in certificate chain is "); //$NON-NLS-1$
             sb.append(Integer.toString(chain.length));
             sb.append("\n"); //$NON-NLS-1$
@@ -1391,7 +1391,7 @@
          *         SecretKeyEntry}.
          */
         public String toString() {
-            StringBuffer sb = new StringBuffer("SecretKeyEntry: algorithm - "); //$NON-NLS-1$
+            StringBuilder sb = new StringBuilder("SecretKeyEntry: algorithm - "); //$NON-NLS-1$
             sb.append(secretKey.getAlgorithm());
             return sb.toString();
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java Sat Jul  4 08:38:13 2009
@@ -109,8 +109,7 @@
         }
         int esize = elist.size();
         totalLength += esize * 4;
-        //FIXME StringBuffer --> StringBuilder
-        StringBuffer result = new StringBuffer(totalLength).append(superStr)
+        StringBuilder result = new StringBuilder(totalLength).append(superStr)
             .append(" ("); //$NON-NLS-1$
         for (int i = 0; i < esize; i++) {
             result.append("\n ").append(elist.get(i).toString()); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java Sat Jul  4 08:38:13 2009
@@ -212,8 +212,7 @@
      * @return a printable representation for this {@code ProtectionDomain}.
      */
     public String toString() {
-        //FIXME: 1.5 use StreamBuilder here
-        StringBuffer buf = new StringBuffer(200);
+        StringBuilder buf = new StringBuilder(200);
         buf.append("ProtectionDomain\n"); //$NON-NLS-1$
         buf.append("CodeSource=").append( //$NON-NLS-1$
                 codeSource == null ? "<null>" : codeSource.toString()).append( //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java Sat Jul  4 08:38:13 2009
@@ -129,7 +129,7 @@
      * @return a printable representation for this {@code Timestamp}.
      */
     public String toString() {
-        StringBuffer buf = new StringBuffer(256);
+        StringBuilder buf = new StringBuilder(256);
         // Dump only the first certificate
         buf.append("Timestamp [").append(timestamp).append(" certPath="); //$NON-NLS-1$ //$NON-NLS-2$
         buf.append(signerCertPath.getCertificates().get(0)).append("]"); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CertPath.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CertPath.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CertPath.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CertPath.java Sat Jul  4 08:38:13 2009
@@ -113,7 +113,7 @@
      * @return a string representation of this instance.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer(getType());
+        StringBuilder sb = new StringBuilder(getType());
         sb.append(" Cert Path, len="); //$NON-NLS-1$
         sb.append(getCertificates().size());
         sb.append(": [\n"); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CollectionCertStoreParameters.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CollectionCertStoreParameters.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CollectionCertStoreParameters.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/CollectionCertStoreParameters.java Sat Jul  4 08:38:13 2009
@@ -95,8 +95,8 @@
      * @return the string representation of this instance.
      */
     public String toString() {
-        StringBuffer sb =
-            new StringBuffer("CollectionCertStoreParameters: [\ncollection: "); //$NON-NLS-1$
+        StringBuilder sb =
+            new StringBuilder("CollectionCertStoreParameters: [\ncollection: "); //$NON-NLS-1$
         sb.append(getCollection().toString());
         sb.append("\n]"); //$NON-NLS-1$
         return sb.toString();

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/LDAPCertStoreParameters.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/LDAPCertStoreParameters.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/LDAPCertStoreParameters.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/LDAPCertStoreParameters.java Sat Jul  4 08:38:13 2009
@@ -117,8 +117,8 @@
      *         instance.
      */
     public String toString() {
-        StringBuffer sb =
-            new StringBuffer("LDAPCertStoreParameters: [\n serverName: "); //$NON-NLS-1$
+        StringBuilder sb =
+            new StringBuilder("LDAPCertStoreParameters: [\n serverName: "); //$NON-NLS-1$
         sb.append(getServerName());
         sb.append("\n port: "); //$NON-NLS-1$
         sb.append(getPort());

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXBuilderParameters.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXBuilderParameters.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXBuilderParameters.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXBuilderParameters.java Sat Jul  4 08:38:13 2009
@@ -123,7 +123,7 @@
      *         instance.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer("[\n"); //$NON-NLS-1$
+        StringBuilder sb = new StringBuilder("[\n"); //$NON-NLS-1$
         sb.append(super.toString());
         sb.append(" Max Path Length: "); //$NON-NLS-1$
         sb.append(maxPathLength);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathBuilderResult.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathBuilderResult.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathBuilderResult.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathBuilderResult.java Sat Jul  4 08:38:13 2009
@@ -74,7 +74,7 @@
      *         instance.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer(super.toString());
+        StringBuilder sb = new StringBuilder(super.toString());
         sb.append("\n Certification Path: "); //$NON-NLS-1$
         sb.append(certPath.toString());
         sb.append("\n]"); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathValidatorResult.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathValidatorResult.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathValidatorResult.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXCertPathValidatorResult.java Sat Jul  4 08:38:13 2009
@@ -112,7 +112,7 @@
      *         PKIXCertPathValidatorResult} instance.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer(super.toString());
+        StringBuilder sb = new StringBuilder(super.toString());
         sb.append(": [\n Trust Anchor: "); //$NON-NLS-1$
         sb.append(trustAnchor.toString());
         sb.append("\n Policy Tree: "); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXParameters.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXParameters.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXParameters.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PKIXParameters.java Sat Jul  4 08:38:13 2009
@@ -564,8 +564,8 @@
      * @return a string representation of this {@code PKIXParameters} instance.
      */
     public String toString() {
-        StringBuffer sb =
-            new StringBuffer("[\n Trust Anchors: "); //$NON-NLS-1$
+        StringBuilder sb =
+            new StringBuilder("[\n Trust Anchors: "); //$NON-NLS-1$
         sb.append(trustAnchors);
         sb.append("\n Revocation Enabled: "); //$NON-NLS-1$
         sb.append(revocationEnabled);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java Sat Jul  4 08:38:13 2009
@@ -108,8 +108,8 @@
      *         instance.
      */
     public String toString() {
-        StringBuffer sb =
-            new StringBuffer("PolicyQualifierInfo: [\npolicyQualifierId: "); //$NON-NLS-1$
+        StringBuilder sb =
+            new StringBuilder("PolicyQualifierInfo: [\npolicyQualifierId: "); //$NON-NLS-1$
         sb.append(policyQualifierId);
         sb.append("\npolicyQualifier: \n"); //$NON-NLS-1$
         sb.append(Array.toString(policyQualifier, " ")); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/TrustAnchor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/TrustAnchor.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/TrustAnchor.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/TrustAnchor.java Sat Jul  4 08:38:13 2009
@@ -239,7 +239,7 @@
      * @return a string representation of this {@code TrustAnchor} instance.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer("TrustAnchor: [\n"); //$NON-NLS-1$
+        StringBuilder sb = new StringBuilder("TrustAnchor: [\n"); //$NON-NLS-1$
         if (trustedCert != null) {
             sb.append("Trusted CA certificate: "); //$NON-NLS-1$
             sb.append(trustedCert);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java Sat Jul  4 08:38:13 2009
@@ -364,7 +364,7 @@
      * @return a string representation of this {@code X509CRLSelector} instance.
      */
     public String toString() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append("X509CRLSelector:\n["); //$NON-NLS-1$
         if (issuerNames != null) {
             result.append("\n  IssuerNames:\n  ["); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CertSelector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CertSelector.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CertSelector.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/cert/X509CertSelector.java Sat Jul  4 08:38:13 2009
@@ -1018,7 +1018,7 @@
         // all of the fields named according to the rfc 3280
         // (http://www.ietf.org/rfc/rfc3280.txt).
 
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append("X509CertSelector: \n["); //$NON-NLS-1$
         if (this.certificateEquals != null) {
             result.append("\n  certificateEquals: " + certificateEquals); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1Oid.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1Oid.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1Oid.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1Oid.java Sat Jul  4 08:38:13 2009
@@ -154,7 +154,7 @@
 
         public Object getDecodedObject(BerInputStream in) throws IOException {
 
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
 
             int element;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ObjectIdentifier.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ObjectIdentifier.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ObjectIdentifier.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ObjectIdentifier.java Sat Jul  4 08:38:13 2009
@@ -243,7 +243,7 @@
      * @return oid string representation
      */
     public static String toString(int[] oid) {
-        StringBuffer sb = new StringBuffer(3 * oid.length);
+        StringBuilder sb = new StringBuilder(3 * oid.length);
 
         for (int i = 0; i < oid.length - 1; ++i) {
             sb.append(oid[i]);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/DefaultPolicyParser.java Sat Jul  4 08:38:13 2009
@@ -327,7 +327,7 @@
             if ("self".equals(protocol)) { //$NON-NLS-1$
                 //need expanding to list of principals in grant clause 
                 if (ge.principals != null && ge.principals.size() != 0) {
-                    StringBuffer sb = new StringBuffer();
+                    StringBuilder sb = new StringBuilder();
                     for (Iterator<PrincipalEntry> iter = ge.principals.iterator(); iter
                             .hasNext();) {
                         DefaultPolicyScanner.PrincipalEntry pr = iter
@@ -370,7 +370,7 @@
         private String pc2str(Principal pc) {
             String klass = pc.getClass().getName();
             String name = pc.getName();
-            StringBuffer sb = new StringBuffer(klass.length() + name.length()
+            StringBuilder sb = new StringBuilder(klass.length() + name.length()
                     + 5);
             return sb.append(klass).append(" \"").append(name).append("\"") //$NON-NLS-1$ //$NON-NLS-2$
                     .toString();

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Engine.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Engine.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Engine.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Engine.java Sat Jul  4 08:38:13 2009
@@ -98,7 +98,7 @@
                 throw new NoSuchAlgorithmException(Messages.getString("security.14A", //$NON-NLS-1$
                         serviceName, algorithm));
             }
-            serv = Services.getService(new StringBuffer(128)
+            serv = Services.getService(new StringBuilder(128)
                     .append(serviceName).append(".").append( //$NON-NLS-1$
                             Util.toUpperCase(algorithm)).toString());
             if (serv == null) {

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Services.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Services.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Services.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/fortress/Services.java Sat Jul  4 08:38:13 2009
@@ -166,7 +166,7 @@
         String key;
         String type;
         String alias;
-        StringBuffer sb = new StringBuffer(128);
+        StringBuilder sb = new StringBuilder(128);
 
         for (Iterator<Provider.Service> it1 = p.getServices().iterator(); it1.hasNext();) {
             serv = it1.next();

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java Sat Jul  4 08:38:13 2009
@@ -115,7 +115,7 @@
 
 
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("-- CertificationRequestInfo:"); //$NON-NLS-1$
         res.append("\n version: "); //$NON-NLS-1$
         res.append(version);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java Sat Jul  4 08:38:13 2009
@@ -93,7 +93,7 @@
     }
     
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("==== ContentInfo:"); //$NON-NLS-1$
         res.append("\n== ContentType (OID): "); //$NON-NLS-1$
         for (int i = 0; i< oid.length; i++) {

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java Sat Jul  4 08:38:13 2009
@@ -105,7 +105,7 @@
     }
 
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("---- SignedData:"); //$NON-NLS-1$
         res.append("\nversion: "); //$NON-NLS-1$
         res.append(version);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java Sat Jul  4 08:38:13 2009
@@ -128,7 +128,7 @@
 
     
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("-- SignerInfo:"); //$NON-NLS-1$
         res.append("\n version : "); //$NON-NLS-1$
         res.append(version);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java Sat Jul  4 08:38:13 2009
@@ -214,7 +214,7 @@
      * @return Internal maps String representation
      */
     public static String dump() {
-        StringBuffer sb = new StringBuffer("alg2OidMap: "); //$NON-NLS-1$
+        StringBuilder sb = new StringBuilder("alg2OidMap: "); //$NON-NLS-1$
         sb.append(alg2OidMap);
         sb.append("\noid2AlgMap: "); //$NON-NLS-1$
         sb.append(oid2AlgMap);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java Sat Jul  4 08:38:13 2009
@@ -158,7 +158,7 @@
      */
     public String toString() {
         if (soid == null) {
-            StringBuffer sb = new StringBuffer(4 * oid.length);
+            StringBuilder sb = new StringBuilder(4 * oid.length);
 
             for (int i = 0; i < oid.length - 1; ++i) {
                 sb.append(oid[i]);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeValue.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeValue.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeValue.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeValue.java Sat Jul  4 08:38:13 2009
@@ -126,7 +126,7 @@
                 }
             }
 
-            StringBuffer buf = new StringBuffer(encoded.length * 2 + 1);
+            StringBuilder buf = new StringBuilder(encoded.length * 2 + 1);
             buf.append('#');
 
             for (int i = 0, c; i < encoded.length; i++) {
@@ -180,7 +180,7 @@
         if (length == 0) {
             return name;
         }
-        StringBuffer buf = new StringBuffer(length * 2);
+        StringBuilder buf = new StringBuilder(length * 2);
 
         for (int index = 0; index < length; index++) {
 
@@ -223,7 +223,7 @@
         if (length == 0) {
             return rawString;
         }
-        StringBuffer buf = new StringBuffer(length * 2);
+        StringBuilder buf = new StringBuilder(length * 2);
 
         int index = 0;
         if (rawString.charAt(0) == '#') {

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/AccessDescription.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/AccessDescription.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/AccessDescription.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/AccessDescription.java Sat Jul  4 08:38:13 2009
@@ -70,7 +70,7 @@
     }
 
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("\n-- AccessDescription:"); //$NON-NLS-1$
         res.append("\naccessMethod:  "); //$NON-NLS-1$
         res.append(accessMethod);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/GeneralName.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/GeneralName.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/GeneralName.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/GeneralName.java Sat Jul  4 08:38:13 2009
@@ -580,7 +580,8 @@
 
     /**
      * Checks the correctness of the string representation of DNS name.
-     * The correctness is checked as specified in RFC 1034 p. 10.
+     * The correctness is checked as specified in RFC 1034 p. 10, and modified
+     * by RFC 1123 (section 2.1).
      */
     public static void checkDNS(String dns) throws IOException {
         byte[] bytes = dns.toLowerCase().getBytes("UTF-8"); //$NON-NLS-1$
@@ -589,7 +590,11 @@
         for (int i=0; i<bytes.length; i++) {
             byte ch = bytes[i];
             if (first_letter) {
-                if (ch > 'z' || ch < 'a') {
+                if ((bytes.length > 2) && (ch == '*') && (bytes[1] == '.')) {
+                    first_letter = false;
+                    continue;
+                }
+                if ((ch > 'z' || ch < 'a') && (ch < '0' || ch > '9')) {
                     throw new IOException(Messages.getString("security.184", //$NON-NLS-1$
                             (char)ch, dns));
                 }

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/InfoAccessSyntax.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/InfoAccessSyntax.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/InfoAccessSyntax.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/InfoAccessSyntax.java Sat Jul  4 08:38:13 2009
@@ -86,7 +86,7 @@
     }
 
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("\n---- InfoAccessSyntax:"); //$NON-NLS-1$
         if (accessDescriptions != null) {
             for (Iterator it = accessDescriptions.iterator(); it.hasNext();) {

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java Sat Jul  4 08:38:13 2009
@@ -59,7 +59,7 @@
     }
     
     public String toString(){
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("-- PKIStatusInfo:");
         res.append("\nPKIStatus : ");
         res.append(status);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java Sat Jul  4 08:38:13 2009
@@ -102,7 +102,7 @@
     }
     
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("-- TSTInfo:");
         res.append("\nversion:  ");
         res.append(version);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java Sat Jul  4 08:38:13 2009
@@ -82,7 +82,7 @@
     }
 
     public String toString() {
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("-- TimeStampReq:");
         res.append("\nversion : ");
         res.append(version);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java Sat Jul  4 08:38:13 2009
@@ -46,7 +46,7 @@
     }
     
     public String toString(){
-        StringBuffer res = new StringBuffer();
+        StringBuilder res = new StringBuilder();
         res.append("-- TimeStampResp:");
         res.append("\nstatus:  ");
         res.append(status);

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CertSelectorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CertSelectorTest.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CertSelectorTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CertSelectorTest.java Sat Jul  4 08:38:13 2009
@@ -39,7 +39,7 @@
             try {
                 new X509CertSelector().addSubjectAlternativeName(types[i],
                         (byte[]) null);
-                fail("No expected NullPointerException for type: " + i);
+                fail("No expected NullPointerException for type: " + types[i]);
             } catch (NullPointerException e) {
             }
         }
@@ -48,17 +48,34 @@
     /**
      * @tests java.security.cert.X509CertSelector#addSubjectAlternativeName(int, String)
      */
-    public void test_addSubjectAlternativeNameLintLjava_lang_String() {
+    public void test_addSubjectAlternativeNameLintLjava_lang_String() throws IOException {
         // Regression for HARMONY-727
-        int[] types = { 0, 2, 3, 4, 5, 6, 7, 8 };
+        int[] types = { 0, 3, 4, 5, 6, 7, 8 };
         for (int i = 0; i < types.length; i++) {
             try {
                 new X509CertSelector().addSubjectAlternativeName(types[i],
                         "0xDFRF");
-                fail("IOException expected");
+                fail("IOException expected for type: " + types[i]);
             } catch (IOException e) {
             }
         }
+        // Tests for DNSGeneralName
+        // Legal DNS names
+        new X509CertSelector().addSubjectAlternativeName(2, "0xDFRF");
+        new X509CertSelector().addSubjectAlternativeName(2, "");
+        new X509CertSelector().addSubjectAlternativeName(2, "foo.example.com");
+        new X509CertSelector().addSubjectAlternativeName(2, "3g.example.com");
+        new X509CertSelector().addSubjectAlternativeName(2, "*.example.com");
+        // Illegal DNS names
+        String[] names = new String[] {"*", "*.", "%anything"};
+        for (String badName : names) {
+            try {
+                new X509CertSelector().addSubjectAlternativeName(2, badName);
+                fail("IOException expected for DNS name " + badName);
+            } catch (IOException e) {
+                // Expected
+            }
+        }
     }
 
     /**
@@ -70,7 +87,7 @@
         for (int i = 0; i < types.length; i++) {
             try {
                 new X509CertSelector().addPathToName(types[i], (byte[]) null);
-                fail("No expected NullPointerException for type: " + i);
+                fail("No expected NullPointerException for type: " + types[i]);
             } catch (NullPointerException e) {
             }
         }
@@ -84,7 +101,7 @@
         for (int type = 0; type <= 8; type++) {
             try {
                 new X509CertSelector().addPathToName(type, (String) null);
-                fail("IOException expected!");
+                fail("IOException expected for type: " + type);
             } catch (IOException ioe) {
                 // expected
             }

Modified: harmony/enhanced/classlib/branches/java6/modules/sound/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sound/build.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sound/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sound/build.xml Sat Jul  4 08:38:13 2009
@@ -23,6 +23,8 @@
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
+    <property name="tests.output" location="../../build/test_report" />
+
     <!-- set global properties for this build. -->
     <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
 
@@ -163,7 +165,7 @@
 
     <target name="run-tests">
 
-        <mkdir dir="${hy.tests.reports}" />
+        <mkdir dir="${tests.output}" />
 
         <property name="test.jre.home" value="${hy.jdk}/jre" />
 
@@ -190,7 +192,7 @@
             <classpath location="${hy.hdk}/build/test/resources/sound/org/apache/harmony/sound/tests/javax/sound/sampled/soundProvider.jar" />
             <formatter type="xml" />
 
-            <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+            <batchtest todir="${tests.output}" haltonfailure="no" >
 
                 <fileset dir="${hy.sound.src.test.java}">
                     <!-- if ${test.case}     -->
@@ -206,12 +208,12 @@
     </target>
 
     <target name="touch-failures-file" if="test.failures">
-        <echo file="${hy.tests.reports}/test.failures"
+        <echo file="${tests.output}/test.failures"
             append="true">sound${line.separator}</echo>
     </target>
 
     <target name="touch-errors-file" if="test.errors">
-        <echo file="${hy.tests.reports}/test.errors"
+        <echo file="${tests.output}/test.errors"
             append="true">sound${line.separator}</echo>
     </target>
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sound/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sound/make/hyproperties.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sound/make/hyproperties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sound/make/hyproperties.xml Sat Jul  4 08:38:13 2009
@@ -42,7 +42,4 @@
    <jdk location="../../deploy/jdk" />
    <build location="../../build/classes" />
 
-   <tests>
-      <reports location="../../build/test_report" />
-   </tests>
 </hy>

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/build.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/build.xml Sat Jul  4 08:38:13 2009
@@ -23,6 +23,8 @@
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
+    <property name="tests.output" location="../../build/test_report" />
+
     <!-- set global properties for this build. -->
     <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
 
@@ -150,7 +152,7 @@
 
     <target name="run-tests">
 
-        <mkdir dir="${hy.tests.reports}" />
+        <mkdir dir="${tests.output}" />
 
         <property name="test.jre.home" value="${hy.jdk}/jre" />
 
@@ -180,7 +182,7 @@
 
             <formatter type="xml" />
 
-            <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+            <batchtest todir="${tests.output}" haltonfailure="no" >
 
                 <fileset dir="${hy.sql.src.test.java}">
                     <!-- if ${test.case}     -->
@@ -196,12 +198,12 @@
     </target>
 
     <target name="touch-failures-file" if="test.failures">
-        <echo file="${hy.tests.reports}/test.failures"
+        <echo file="${tests.output}/test.failures"
             append="true">sql${line.separator}</echo>
     </target>
 
     <target name="touch-errors-file" if="test.errors">
-        <echo file="${hy.tests.reports}/test.errors"
+        <echo file="${tests.output}/test.errors"
             append="true">sql${line.separator}</echo>
     </target>
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/make/hyproperties.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/make/hyproperties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/make/hyproperties.xml Sat Jul  4 08:38:13 2009
@@ -41,7 +41,4 @@
    <jdk location="../../deploy/jdk" />
    <build location="../../build/classes" />
 
-   <tests>
-      <reports location="../../build/test_report" />
-   </tests>
 </hy>

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java Sat Jul  4 08:38:13 2009
@@ -101,7 +101,7 @@
     @SuppressWarnings("unchecked")
     public void writeAsciiStream(InputStream theStream) throws SQLException {
         BufferedReader br = new BufferedReader(new InputStreamReader(theStream));
-        StringBuffer stringBuffer = new StringBuffer();
+        StringBuilder stringBuffer = new StringBuilder();
         String line;
         try {
             line = br.readLine();
@@ -192,7 +192,7 @@
     @SuppressWarnings("unchecked")
     public void writeCharacterStream(Reader theStream) throws SQLException {
         BufferedReader br = new BufferedReader(theStream);
-        StringBuffer stringBuffer = new StringBuffer();
+        StringBuilder stringBuffer = new StringBuilder();
         String line;
         try {
             line = br.readLine();

Modified: harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml Sat Jul  4 08:38:13 2009
@@ -23,6 +23,8 @@
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
+    <property name="tests.output" location="../../build/test_report" />
+
     <!-- set global properties for this build. -->
     <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
 
@@ -149,7 +151,7 @@
 
     <target name="run-tests">
 
-        <mkdir dir="${hy.tests.reports}" />
+        <mkdir dir="${tests.output}" />
 
         <property name="test.jre.home" value="${hy.jdk}/jre" />
 
@@ -176,7 +178,7 @@
 
             <formatter type="xml" />
 
-            <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+            <batchtest todir="${tests.output}" haltonfailure="no" >
 
                 <fileset dir="${hy.suncompat.src.test.java}">
                     <!-- if ${test.case}     -->
@@ -192,12 +194,12 @@
     </target>
 
     <target name="touch-failures-file" if="test.failures">
-        <echo file="${hy.tests.reports}/test.failures"
+        <echo file="${tests.output}/test.failures"
             append="true">suncompat${line.separator}</echo>
     </target>
 
     <target name="touch-errors-file" if="test.errors">
-        <echo file="${hy.tests.reports}/test.errors"
+        <echo file="${tests.output}/test.errors"
             append="true">suncompat${line.separator}</echo>
     </target>
 

Modified: harmony/enhanced/classlib/branches/java6/modules/suncompat/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/suncompat/make/hyproperties.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/suncompat/make/hyproperties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/suncompat/make/hyproperties.xml Sat Jul  4 08:38:13 2009
@@ -41,7 +41,4 @@
    <jdk location="../../deploy/jdk" />
    <build location="../../build/classes" />
 
-   <tests>
-      <reports location="../../build/test_report" />
-   </tests>
 </hy>

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/build.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/build.xml Sat Jul  4 08:38:13 2009
@@ -23,6 +23,8 @@
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
+    <property name="tests.output" location="../../build/test_report" />
+
     <!-- set global properties for this build. -->
     <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
 
@@ -180,7 +182,7 @@
 
     <target name="run-tests" depends="compile-tests,copy-test-resources">
 
-        <mkdir dir="${hy.tests.reports}" />
+        <mkdir dir="${tests.output}" />
 
         <property name="test.jre.home" value="${hy.jdk}/jre" />
 
@@ -200,7 +202,7 @@
             <jvmarg value="-Xbootclasspath/a:${hy.swing.bin.test}${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar"/>
 <!--            <jvmarg value="-Djava2d.opengl=true"/> -->
 
-            <batchtest todir="${hy.tests.reports}" haltonfailure="no" >
+            <batchtest todir="${tests.output}" haltonfailure="no" >
 
                 <fileset dir="${hy.swing.src.test.api}/java.injected">
                     <!-- if ${test.case}     -->
@@ -216,12 +218,12 @@
     </target>
 
     <target name="touch-failures-file" if="test.failures">
-        <echo file="${hy.tests.reports}/test.failures"
+        <echo file="${tests.output}/test.failures"
             append="true">swing${line.separator}</echo>
     </target>
 
     <target name="touch-errors-file" if="test.errors">
-        <echo file="${hy.tests.reports}/test.errors"
+        <echo file="${tests.output}/test.errors"
             append="true">swing${line.separator}</echo>
     </target>
 

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/make/exclude.common?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/make/exclude.common (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/make/exclude.common Sat Jul  4 08:38:13 2009
@@ -93,7 +93,6 @@
 javax/swing/text/PlainView_ChangesTest.java
 javax/swing/text/StringContentTest.java
 javax/swing/text/StringContentTest_CommonTest.java
-javax/swing/text/StyleConstantsTest.java
 javax/swing/text/StyleContextTest.java
 javax/swing/text/StyledEditorKitTest.java
 javax/swing/text/TextAction_MultithreadedTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/make/hyproperties.xml?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/make/hyproperties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/make/hyproperties.xml Sat Jul  4 08:38:13 2009
@@ -42,7 +42,4 @@
    <jdk location="../../deploy/jdk" />
    <build location="../../build/classes" />
 
-   <tests>
-      <reports location="../../build/test_report" />
-   </tests>
 </hy>

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JViewport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JViewport.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JViewport.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JViewport.java Sat Jul  4 08:38:13 2009
@@ -159,7 +159,7 @@
 
     @Override
     protected String paramString() {
-        StringBuffer result = new StringBuffer(super.paramString());
+        StringBuilder result = new StringBuilder(super.paramString());
         result.append(",isViewSizeSet=").append(isViewSizeSet)
               .append(",lastPaintPosition=").append(lastPaintPosition)
               .append(",scrollUnderway=").append(scrollUnderway);

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/UIManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/UIManager.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/UIManager.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/UIManager.java Sat Jul  4 08:38:13 2009
@@ -446,10 +446,10 @@
         List<LookAndFeelInfo> result = new LinkedList<LookAndFeelInfo>();
         for (int i = 0; i < names.length; i++) {
             String token = names[i];
-            String lfNameProperty = new StringBuffer(INSTALLED_LAF).append(".")
+            String lfNameProperty = new StringBuilder(INSTALLED_LAF).append(".")
                 .append(token)
                 .append(".name").toString();
-            String lfClassProperty = new StringBuffer(INSTALLED_LAF).append(".")
+            String lfClassProperty = new StringBuilder(INSTALLED_LAF).append(".")
                 .append(token)
                 .append(".class").toString();
 

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicFileChooserUI.java Sat Jul  4 08:38:13 2009
@@ -376,7 +376,7 @@
                     if (flavor.equals(DataFlavor.stringFlavor)
                         || flavor.equals(DataFlavor.plainTextFlavor)) {
 
-                        StringBuffer content = new StringBuffer();
+                        StringBuilder content = new StringBuilder();
                         for (int i = 0; i < transferingFiles.length; i++) {
                             content.append(transferingFiles[i].getAbsolutePath());
                             if (i < transferingFiles.length - 1) {

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java Sat Jul  4 08:38:13 2009
@@ -402,7 +402,7 @@
                 return null;
             }
 
-            StringBuffer content = new StringBuffer();
+            StringBuilder content = new StringBuilder();
             for (int i = 0; i < selectedValues.length; i++) {
                 content.append(selectedValues[i]);
                 if (i < selectedValues.length - 1) {

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java Sat Jul  4 08:38:13 2009
@@ -243,7 +243,7 @@
                 return null;
             }
 
-            StringBuffer content = new StringBuffer();
+            StringBuilder content = new StringBuilder();
             int rowMinSelectionIndex = table.getSelectionModel().getMinSelectionIndex();
             int rowMaxSelectionIndex = table.getSelectionModel().getMaxSelectionIndex();
             int colMinSelectionIndex = table.getColumnModel().getSelectionModel().getMinSelectionIndex();

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTreeUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTreeUI.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTreeUI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTreeUI.java Sat Jul  4 08:38:13 2009
@@ -603,7 +603,7 @@
                 return null;
             }
 
-            StringBuffer content = new StringBuffer();
+            StringBuilder content = new StringBuilder();
             TreePath[] selectionPaths = tree.getSelectionPaths();
             for (int i = 0; i < selectionPaths.length; i++) {
                 content.append(selectionPaths[i].getLastPathComponent());

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalFileChooserUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalFileChooserUI.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalFileChooserUI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalFileChooserUI.java Sat Jul  4 08:38:13 2009
@@ -444,7 +444,7 @@
                 if (file.canWrite() && !file.isHidden()) {
                     return null;
                 } else {
-                    StringBuffer result = new StringBuffer();
+                    StringBuilder result = new StringBuilder();
                     if (!file.canWrite()) {
                         result.append("R");
                     }
@@ -823,7 +823,7 @@
                         return;
                     }
 
-                    StringBuffer textSelection = new StringBuffer();
+                    StringBuilder textSelection = new StringBuilder();
                     if (selectedFiles.length == 1) {
                         textSelection.append(fileToText(selectedFiles[0]));
                         getViewRepresentation().setSelectedValue(selectedFiles[0], true);

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/table/AbstractTableModel.java Sat Jul  4 08:38:13 2009
@@ -32,7 +32,7 @@
     protected EventListenerList listenerList = new EventListenerList();
 
     public String getColumnName(final int column) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         int rest = column;
         do {
             int remainder = rest % 26;

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java Sat Jul  4 08:38:13 2009
@@ -603,7 +603,7 @@
 
         @Override
         public String toString() {
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             for (UndoableEdit edit : edits) {
                 result.append(", ")
                       .append(edit.toString());

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractWriter.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/AbstractWriter.java Sat Jul  4 08:38:13 2009
@@ -233,7 +233,7 @@
     protected void writeAttributes(final AttributeSet attrs)
         throws IOException {
 
-        StringBuffer content = new StringBuffer();
+        StringBuilder content = new StringBuilder();
         for (Enumeration keys = attrs.getAttributeNames(); keys.hasMoreElements();) {
             Object key = keys.nextElement();
             content.append(" ");

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/ComponentView.java Sat Jul  4 08:38:13 2009
@@ -182,7 +182,8 @@
     }
 
     protected Component createComponent() {
-        return StyleConstants.getComponent(getAttributes());
+        final AttributeSet attrs = getAttributes();
+        return attrs == null ? null : StyleConstants.getComponent(attrs);
     }
 
     private void isAxisValid(final int axis) {

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java Sat Jul  4 08:38:13 2009
@@ -404,7 +404,7 @@
             return str;
         }
         final int length = str.length();
-        final StringBuffer buffer = new StringBuffer(length);
+        final StringBuilder buffer = new StringBuilder(length);
         int prevIndex = 0;
         do {
             buffer.append(str.subSequence(prevIndex, index));

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabSet.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabSet.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabSet.java Sat Jul  4 08:38:13 2009
@@ -101,7 +101,7 @@
     }
 
     public String toString() {
-        StringBuffer result = new StringBuffer("[ ");
+        StringBuilder result = new StringBuilder("[ ");
         for (int i = 0; i < tabs.length; i++) {
             if (i != 0) {
                 result.append(" - ");

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabStop.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabStop.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabStop.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/TabStop.java Sat Jul  4 08:38:13 2009
@@ -87,7 +87,7 @@
     }
 
     public String toString() {
-        final StringBuffer result = new StringBuffer();
+        final StringBuilder result = new StringBuilder();
         switch (alignment) {
             case ALIGN_RIGHT:
                 result.append("right ");

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CSS.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CSS.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CSS.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CSS.java Sat Jul  4 08:38:13 2009
@@ -860,7 +860,7 @@
         }
 
         private static String getDeclaration(final ColorProperty[] colors) {
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             for (int i = 0; i < colors.length; i++) {
                 if (i > 0) {
                     result.append(' ');
@@ -934,7 +934,7 @@
         }
 
         private static String getDeclaration(final BorderStyleValue[] styles) {
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             for (int i = 0; i < styles.length; i++) {
                 if (i > 0) {
                     result.append(' ');
@@ -1323,7 +1323,7 @@
 
             final String lower = colorName.toLowerCase();
             if (lower.charAt(0) == '#') {
-                final StringBuffer name = new StringBuffer(6);
+                final StringBuilder name = new StringBuilder(6);
                 if (lower.length() == 4) {
                     for (int i = 1; i < 4; i++) {
                         name.append(lower.charAt(i))
@@ -1383,7 +1383,7 @@
         }
 
         private static String colorToString(final Color color) {
-            final StringBuffer result = new StringBuffer(7);
+            final StringBuilder result = new StringBuilder(7);
             final String hex = Integer.toHexString(color.getRGB() & 0x00FFFFFF);
             result.append('#').append(zeros, 0, 6 - hex.length()).append(hex);
             return result.toString();
@@ -1967,7 +1967,7 @@
                 return;
             }
 
-            StringBuffer family = new StringBuffer();
+            StringBuilder family = new StringBuilder();
             family.append(parts[i++]);
             for (; i < parts.length; i++) {
                 family.append(' ')
@@ -2676,7 +2676,7 @@
         }
 
         private String getValue() {
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             for (int i = 0; i < values.length; i++) {
                 if (values[i]) {
                     if (result.length() > 0) {

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CascadedStyle.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CascadedStyle.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CascadedStyle.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/CascadedStyle.java Sat Jul  4 08:38:13 2009
@@ -66,7 +66,7 @@
     }
 
     public static String getElementTreeSelector(final Element element) {
-        final StringBuffer result = new StringBuffer();
+        final StringBuilder result = new StringBuilder();
         result.append(getFullName(element));
         Element parent = element.getParentElement();
         while (parent != null) {
@@ -101,7 +101,7 @@
         final String id      = SelectorMatcher.getID(tag, element);
         final String clazz   = SelectorMatcher.getClass(tag, element);
 
-        final StringBuffer result = new StringBuffer();
+        final StringBuilder result = new StringBuilder();
         if (tagName != null) {
             result.append(tagName);
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/HTMLWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/HTMLWriter.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/HTMLWriter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/HTMLWriter.java Sat Jul  4 08:38:13 2009
@@ -183,7 +183,7 @@
             return;
         }
 
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         int writtenLength = 0;
         for (int i = 0; i < length; i++) {
             String entity = getEntity(chars[start + i]);
@@ -338,7 +338,7 @@
 
     protected void writeOption(final Option option) throws IOException {
         indent();
-        StringBuffer buffer = new StringBuffer(50);
+        StringBuilder buffer = new StringBuilder(50);
         buffer.append("<option");
         String value =
             (String)option.getAttributes().getAttribute(HTML.Attribute.VALUE);
@@ -365,7 +365,7 @@
 
         isOptionGroupOpen = true;
         indent();
-        StringBuffer buffer = new StringBuffer(50);
+        StringBuilder buffer = new StringBuilder(50);
         buffer.append("<optgroup");
         if (option.getLabel() != null) {
             buffer.append(" label=\"");

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/Selector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/Selector.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/Selector.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/Selector.java Sat Jul  4 08:38:13 2009
@@ -34,7 +34,7 @@
     }
 
     public String toString() {
-        final StringBuffer result = new StringBuffer();
+        final StringBuilder result = new StringBuilder();
         result.append(simpleSelectors[0]);
         for (int i = 1; i < simpleSelectors.length; i++) {
             result.append(' ').append(simpleSelectors[i]);

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/SimpleSelector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/SimpleSelector.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/SimpleSelector.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/SimpleSelector.java Sat Jul  4 08:38:13 2009
@@ -34,7 +34,7 @@
     }
 
     public String toString() {
-        final StringBuffer result = new StringBuffer();
+        final StringBuilder result = new StringBuilder();
         if (tag != null) {
             result.append(tag);
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/ExtendedListCellRenderer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/ExtendedListCellRenderer.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/ExtendedListCellRenderer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/ExtendedListCellRenderer.java Sat Jul  4 08:38:13 2009
@@ -66,7 +66,7 @@
 
 
     private static String createIndentation(final int indentationLevel) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         for (int i = 0; i < indentationLevel; i++) {
             result.append(SUB_ELEMENT_INDENT);
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParser.java?rev=791082&r1=791081&r2=791082&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParser.java Sat Jul  4 08:38:13 2009
@@ -389,7 +389,7 @@
   }
 
   final public String expr() throws ParseException {
-  StringBuffer result = new StringBuffer(); String term; String oper; boolean operSet;
+  StringBuilder result = new StringBuilder(); String term; String oper; boolean operSet;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case PLUS:
     case MINUS:



Mime
View raw message