[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2122?page=c...
]
Diego Pires Plentz updated HHH-2122:
------------------------------------
Component/s: core
optimization patch based on pmd rules
-------------------------------------
Key: HHH-2122
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2122
Project: Hibernate3
Issue Type: Patch
Components: core
Environment: latest svn source
Reporter: Xavier Le Vourch
Priority: Minor
Attachments: Optimizations.patch
I've run pmd with a custom ruleset and made a few optimization changes:
Double.valueOf(x).doubleValue() -> Double.parseDouble(x)
append("x") -> append('x')
x != null && x instanceof X -> x instanceof X
list.toArray uses correctly sized array as argument
new String(str) -> str
if (expr == false) -> if (!expr)
append(s1 + s2) -> append(s1).append(s2)
loop over array to add to list -> list.addAll(Arrays.asList(<array>))
extra ; removed
name.toLowerCase().equals("rowid") ->
name.equalsIgnoreCase("rowid")
use of System.arraycopy instead of loop
I could break the patch in several parts if that makes it easier to analyze.
Xavier
--
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