[tp-devel] [tp-cvs] libtpproto-java (midp) - Removed String.Format from all these classes, also replaced some for-each loops with for loops. All string buffer issues have been replaced to use default string functions. Finally, some generics that were missed have been removed. Very few errors remain in the majority of classes

[tp-devel] [tp-cvs] libtpproto-java (midp) - Removed String.Format from all these classes, also replaced some for-each loops with for loops. All string buffer issues have been replaced to use default string functions. Finally, some generics that were missed have been removed. Very few errors remain in the majority of classes

Krzysztof Sobolewski jezuch at interia.pl
Mon May 12 06:58:46 EDT 2008


Brendan Matthew Roberts pisze:
> --- a/src-generated/net/thousandparsec/netlib/tp03/AddCategory.java
> +++ b/src-generated/net/thousandparsec/netlib/tp03/AddCategory.java
> @@ -51,11 +51,7 @@ public class AddCategory extends Category
>  
>  	public String toString()
>  	{
> -		StringBuilder buf=new StringBuilder();
> -		buf.append("{AddCategory");
> -		buf.append("; super:").append(super.toString());
> -		buf.append("}");
> -		return buf.toString();
> +                return "(AddCategory; super:" +super.toString()+")";
>  	}
>  
>  }

I admire all this laborious replacing, but that wasn't necessary, I'm
afraid... First, these files are automatically generated, so it would be
much faster to modify the generator (and that's true for all types of
changes), and second, it's enough here to simply replace StringBuilder with
StringBuffer (I assume StringBuffer is in midp).
-- 
KS
"To an engineer, everyone looks like a chimp" - Dilbert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.thousandparsec.net/pipermail/tp-devel/attachments/20080512/9bd8d543/attachment.pgp 


More information about the tp-devel mailing list