Replace new Integer() by Integer.valueOf()
------------------------------------------
Key: HHH-5610
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5610
Project: Hibernate Core
Issue Type: Improvement
Affects Versions: 3.5.1
Reporter: Ondrej Medek
Priority: Minor
Hi,
I have seen in org.hibernate.impl.CriteriaImpl and other parts of Hibernate constructions
like:
this.maxResults = new Integer(maxResults);
AFAIK it better to use
this.maxResults = Integer.valueOf(maxResults);
e.g. see
* [
http://download.oracle.com/javase/6/docs/api/java/lang/Integer.html#value...]
* [
http://tech.puredanger.com/2007/02/01/valueof/]
Or leave this to the compiler and write:
this.maxResults = maxResults;
Pleas, grep all your code to find such cunstructs or use FindBugs
[
http://findbugs.sourceforge.net/] to find it for you.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira