harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sian January <sianjanu...@googlemail.com>
Subject Re: svn commit: r785966 - in /harmony/enhanced/classlib/trunk/modules: jndi/src/main/java/javax/naming/ jndi/src/main/java/javax/naming/directory/ jndi/src/main/java/javax/naming/ldap/ jndi/src/main/java/org/apache/harmony/jndi/internal/parser/ jndi/
Date Thu, 18 Jun 2009 09:54:18 GMT
Hi Regis,

I'm going to revert these change in pack200 because it's designed to
work with Java 1.4 at the moment and StringBuilder is a 1.5 API.

If we do stop supporting Java 1.4, then obviously it would be good to
be able to use StringBuilder and some other 1.5 APIs like
Integer.valueOf(int) to improve performance, but it probably needs
discussing first.

Thanks,

Sian



2009/6/18  <regisxu@apache.org>:
> Author: regisxu
> Date: Thu Jun 18 09:00:04 2009
> New Revision: 785966
>
> URL: http://svn.apache.org/viewvc?rev=785966&view=rev
> Log:
> replace local StringBuffer variable with StringBuilder in jndi and pack200 modules
>
> Modified:
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/LinkException.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NameClassPair.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NamingException.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/AttributeModificationException.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/ModificationItem.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/SearchResult.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/Rdn.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSName.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Message.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderMgr.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/QuestionRecord.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ResourceRecord.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/dnsURLContextFactory.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/ParseException.java
>    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/TokenMgrError.java
>    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
>    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
>    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
>    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
>    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
>    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/LinkException.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/LinkException.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/LinkException.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/LinkException.java
Thu Jun 18 09:00:04 2009
> @@ -86,7 +86,7 @@
>     }
>
>     private String toStringImpl(boolean b) {
> -        StringBuffer sb = new StringBuffer(super.toString());
> +        StringBuilder sb = new StringBuilder(super.toString());
>         sb
>                 .append("; the link remaining name is - '").append(linkRemainingName).append(
//$NON-NLS-1$
>                         "'"); //$NON-NLS-1$
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NameClassPair.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NameClassPair.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NameClassPair.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NameClassPair.java
Thu Jun 18 09:00:04 2009
> @@ -202,7 +202,7 @@
>      */
>     @Override
>     public String toString() {
> -        StringBuffer buf = new StringBuffer();
> +        StringBuilder buf = new StringBuilder();
>         if (!isRel) {
>             buf.append("(not relative)"); //$NON-NLS-1$
>         }
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NamingException.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NamingException.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NamingException.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/NamingException.java
Thu Jun 18 09:00:04 2009
> @@ -300,7 +300,7 @@
>
>     @SuppressWarnings("nls")
>     private String toStringImpl(boolean flag) {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         sb.append(super.toString());
>         if (null != rootException) {
>             sb.append(" [Root exception is ").append(rootException.toString())
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/AttributeModificationException.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/AttributeModificationException.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/AttributeModificationException.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/AttributeModificationException.java
Thu Jun 18 09:00:04 2009
> @@ -119,7 +119,7 @@
>     }
>
>     private String toStringImpl(boolean flag) {
> -        StringBuffer sb = new StringBuffer(super.toString(flag));
> +        StringBuilder sb = new StringBuilder(super.toString(flag));
>         if (null != unexecs && unexecs.length > 0) {
>             sb.append(". The unexecuted modification items are: \""); //$NON-NLS-1$
>             for (ModificationItem element : unexecs) {
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/ModificationItem.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/ModificationItem.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/ModificationItem.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/ModificationItem.java
Thu Jun 18 09:00:04 2009
> @@ -117,7 +117,7 @@
>      */
>     @Override
>     public String toString() {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         switch (mod_op) {
>             case DirContext.ADD_ATTRIBUTE:
>                 sb.append("Operation is add attribute: "); //$NON-NLS-1$
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/SearchResult.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/SearchResult.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/SearchResult.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/SearchResult.java
Thu Jun 18 09:00:04 2009
> @@ -210,7 +210,7 @@
>      */
>     @Override
>     public String toString() {
> -        return new StringBuffer(super.toString()).append(":") //$NON-NLS-1$
> +        return new StringBuilder(super.toString()).append(":") //$NON-NLS-1$
>                 .append(attrs.toString()).toString();
>     }
>
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
Thu Jun 18 09:00:04 2009
> @@ -304,7 +304,7 @@
>             return ""; //$NON-NLS-1$
>         }
>
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         sb.append(rdns.get(rdns.size() - 1).toString());
>         for (int i = rdns.size() - 2; i >= 0; i--) {
>             sb.append(',');
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/Rdn.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/Rdn.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/Rdn.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/Rdn.java
Thu Jun 18 09:00:04 2009
> @@ -308,7 +308,7 @@
>     }
>
>     public String toString() {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         for (Iterator<Attribute> iter = list.iterator(); iter.hasNext();) {
>             Attribute element = iter.next();
>             NamingEnumeration<?> ne = null;
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java
Thu Jun 18 09:00:04 2009
> @@ -107,7 +107,7 @@
>     }
>
>     private static String getEscaped(char[] chars) {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         int leftSpaceCnt = 0, rightSpaceCnt = 0;
>         int pos = chars.length - 1;
>         while (pos >= 0 && chars[pos] == ' ') {
> @@ -131,7 +131,7 @@
>     }
>
>     private static String getHexValues(byte[] byteArray) {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         for (int i = 0; i < byteArray.length; i++) {
>             sb.append(Integer.toHexString(byteArray[i] >> 4 & 0x0F));
>             sb.append(Integer.toHexString(byteArray[i] & 0x0F));
> @@ -190,7 +190,7 @@
>     }
>
>     private static String getUnEscapedValues(char[] chars) {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         boolean trailing20h = false;
>         for (int i = 0; i < chars.length; i++) {
>             trailing20h = false;
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSName.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSName.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSName.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSName.java
Thu Jun 18 09:00:04 2009
> @@ -409,7 +409,7 @@
>      */
>     @Override
>     public String toString() {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>
>         for (int i = components.size() - 1; i >= 0; i--) {
>             String comp = components.elementAt(i);
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Message.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Message.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Message.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Message.java
Thu Jun 18 09:00:04 2009
> @@ -317,7 +317,7 @@
>     @Override
>     @SuppressWarnings("nls")
>     public String toString() {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>
>         sb.append("ID=" + id + "\n");
>         if (qr) {
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderMgr.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderMgr.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderMgr.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderMgr.java
Thu Jun 18 09:00:04 2009
> @@ -482,7 +482,7 @@
>      *             if given array has the length less than four
>      */
>     public static String getIpStr(byte[] ip) {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>
>         if (ip == null || ip.length < 4) {
>             // jndi.61=Given array is null or has the length less than four
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/QuestionRecord.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/QuestionRecord.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/QuestionRecord.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/QuestionRecord.java
Thu Jun 18 09:00:04 2009
> @@ -130,7 +130,7 @@
>
>     @Override
>     public String toString() {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         String qClassStr, qTypeStr;
>
>         if (qType > 0 && qType < 256) {
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ResourceRecord.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ResourceRecord.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ResourceRecord.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ResourceRecord.java
Thu Jun 18 09:00:04 2009
> @@ -382,7 +382,7 @@
>                     serial + " " + refresh + " " + retry + " " + expire + "
" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
>                     minimum;
>         } else if (rrType == ProviderConstants.TXT_TYPE) {
> -            StringBuffer sbuf = new StringBuffer();
> +            StringBuilder sbuf = new StringBuilder();
>             int idx0 = idx;
>
>             while (true) {
> @@ -438,7 +438,7 @@
>
>     @Override
>     public String toString() {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         sb.append(name);
>         sb.append(" "); //$NON-NLS-1$
>         sb.append(ProviderConstants.rrTypeNames[rrType]);
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/dnsURLContextFactory.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/dnsURLContextFactory.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/dnsURLContextFactory.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/dnsURLContextFactory.java
Thu Jun 18 09:00:04 2009
> @@ -71,7 +71,7 @@
>         } else if (obj instanceof String[]) {
>             Hashtable<Object, Object> newEnv = (Hashtable<Object, Object>)
environment
>                     .clone();
> -            StringBuffer sb = new StringBuffer();
> +            StringBuilder sb = new StringBuilder();
>             String urlArr[] = (String[]) obj;
>
>             for (int i = 0; i < urlArr.length; i++) {
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/ParseException.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/ParseException.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/ParseException.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/ParseException.java
Thu Jun 18 09:00:04 2009
> @@ -162,7 +162,7 @@
>    * string literal.
>    */
>   protected String add_escapes(String str) {
> -      StringBuffer retval = new StringBuffer();
> +      StringBuilder retval = new StringBuilder();
>       char ch;
>       for (int i = 0; i < str.length(); i++) {
>         switch (str.charAt(i))
>
> Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/TokenMgrError.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/TokenMgrError.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/TokenMgrError.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/TokenMgrError.java
Thu Jun 18 09:00:04 2009
> @@ -55,7 +55,7 @@
>     * equivalents in the given string
>     */
>    protected static final String addEscapes(String str) {
> -      StringBuffer retval = new StringBuffer();
> +      StringBuilder retval = new StringBuilder();
>       char ch;
>       for (int i = 0; i < str.length(); i++) {
>         switch (str.charAt(i))
>
> Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
Thu Jun 18 09:00:04 2009
> @@ -447,7 +447,7 @@
>      * zero fields are not shown.
>      */
>     public String toString() {
> -        StringBuffer buffer = new StringBuffer(11);
> +        StringBuilder buffer = new StringBuilder(11);
>         buffer.append('(');
>         buffer.append(b);
>         buffer.append(',');
>
> Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
Thu Jun 18 09:00:04 2009
> @@ -434,11 +434,11 @@
>             if (signature.length() > 1 && signature.indexOf('L') !=
-1) {
>                 List classes = new ArrayList();
>                 char[] chars = signature.toCharArray();
> -                StringBuffer signatureString = new StringBuffer();
> +                StringBuilder signatureString = new StringBuilder();
>                 for (int i = 0; i < chars.length; i++) {
>                     signatureString.append(chars[i]);
>                     if (chars[i] == 'L') {
> -                        StringBuffer className = new StringBuffer();
> +                        StringBuilder className = new StringBuilder();
>                         for (int j = i + 1; j < chars.length; j++) {
>                             char c = chars[j];
>                             if (Character.isLetter(c) || Character.isDigit(c)
>
> Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
Thu Jun 18 09:00:04 2009
> @@ -814,7 +814,7 @@
>      */
>     private StringReader getStreamUpToMatchingBracket(StringReader stream)
>             throws IOException {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         int foundBracket = -1;
>         while (foundBracket != 0) {
>             char c = (char) stream.read();
> @@ -877,7 +877,7 @@
>      */
>     private String readUpToMatchingBracket(StringReader stream)
>             throws IOException {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         int foundBracket = -1;
>         while (foundBracket != 0) {
>             char c = (char) stream.read();
>
> Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
Thu Jun 18 09:00:04 2009
> @@ -358,7 +358,7 @@
>         for (int i = 0; i < cpSignatureCount; i++) {
>             String form = cpSignatureForm[i];
>             int len = form.length();
> -            StringBuffer signature = new StringBuffer(64);
> +            StringBuilder signature = new StringBuilder(64);
>             ArrayList list = new ArrayList();
>             for (int j = 0; j < len; j++) {
>                 char c = form.charAt(j);
>
> Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
Thu Jun 18 09:00:04 2009
> @@ -270,7 +270,7 @@
>     }
>
>     public String toString() {
> -        StringBuffer result = new StringBuffer();
> +        StringBuilder result = new StringBuilder();
>         result.append("IcTuple ");
>         result.append('(');
>         result.append(simpleClassName());
>
> Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java?rev=785966&r1=785965&r2=785966&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java
Thu Jun 18 09:00:04 2009
> @@ -848,7 +848,7 @@
>      */
>     private StringReader getStreamUpToMatchingBracket(StringReader stream)
>             throws IOException {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         int foundBracket = -1;
>         while (foundBracket != 0) {
>             char c = (char) stream.read();
> @@ -896,7 +896,7 @@
>      */
>     private String readUpToMatchingBracket(StringReader stream)
>             throws IOException {
> -        StringBuffer sb = new StringBuffer();
> +        StringBuilder sb = new StringBuilder();
>         int foundBracket = -1;
>         while (foundBracket != 0) {
>             char c = (char) stream.read();
>
>
>



-- 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Mime
View raw message