[SNMP4J] Minor optimization in PDU.toString() method

Alan D. Cabrera adc at toolazydogs.com
Fri Dec 2 10:44:29 CET 2005


Is explicit string buffer usage still required?  I thought that the 
compiler automatically used them for string contacts.


Regards,
Alan

Matthieu Casanova wrote, On 12/2/2005 1:26 AM:

>Hi, il the last release 1.6b (but probably in previous one) there is a minor
>optimization to do :
>
>The method contains line 601 this
>buf.append(getErrorStatusText()+"("+errorStatus+")");
>
>Since we have a StringBuffer it would be better to use it for those String
>concatenations like that
>buf.append(getErrorStatusText());
>buf.append('(');
>buf.append(errorStatus);
>buf.append(')');
>
>Matthieu
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>  
>




More information about the SNMP4J mailing list