Viewing Issue Simple Details
[ Jump to Notes ]
|
[ View Advanced ]
[ Issue History ]
[ Print ]
|
ID |
Category |
Severity |
Reproducibility |
Date Submitted |
Last Update |
0002138 |
[Resin] |
minor |
always |
11-04-07 09:49 |
11-05-07 13:21 |
|
Reporter |
regor |
View Status |
public |
|
Assigned To |
ferg |
Priority |
normal |
Resolution |
fixed |
|
Status |
closed |
|
Product Version |
|
|
Summary |
0002138: Use Integer.valueOf(int) instead of new Integer(int) |
Description |
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 |
Additional Information |
|
|
Attached Files |
|
|