Mantis - Resin
Viewing Issue Advanced Details
2138 minor always 11-04-07 09:49 11-05-07 13:21
regor  
ferg  
normal  
closed  
fixed  
none    
none 3.1.4  
0002138: Use Integer.valueOf(int) instead of new Integer(int)
You should consider to use expressions like "Integer.valueOf(int)" instead of "new Integer(int)". The former returns Objects from an Object pool.

I saw this in Hessian's BasicDeserializer class. This is especially bad for Boolean and Byte Objects which fit entirely into the Object pool.

Cheers
-Roger

There are no notes attached to this issue.