[SNMP4J] Minor optimization in PDU.toString() method
Frank Fock
fock at agentpp.com
Fri Dec 2 19:26:21 CET 2005
Hi,
Yes, Java 1.4 or later uses StringBuffer for String concatenation.
So, there is no need for optimization.
Best regards,
Frank
Alan D. Cabrera wrote:
> 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
>>
>>
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list