Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-ui-dev] Compiler check / warning for the usage of new Integer or new Boolean?

Hi,

AFAIK using new Integer() is wrong and Integer.valueof(int) should be prefered.
See http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html#valueOf%28int%29

Is there a way / trick to tell JDT to warn about new Integer(int) or
new Boolean(value) statements in a code base?

I think I check all entries in Error/Warnings but did not see anything fitting.

Best regards, Lars

P.S. I tried posting to JDT core but got the message that the email is
unprocessed

-- 
Eclipse Platform UI and e4 project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com


Back to the top