[ https://issues.apache.org/jira/browse/OGNL-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145297#comment-13145297 ]
Hudson commented on OGNL-38: ---------------------------- Integrated in ognl #186 (See [https://builds.apache.org/job/ognl/186/]) OGNL-38 - Remove JDK1.5 checking since OGNL now requires >=JDK1.5. The isJdk15() method is now deprecated. Variable naming (don't use acronyms. getPointerString(int) now uses StringBuilder instead of StringBuffer. getUniqueDescriptor(Object, boolean) now uses StringBuilder instead of StringBuffer. package private method findType() unused to removed. Simplify getMethods(Class<?>,boolean) with ternary. getStaticField(OgnlContext,String,String) test CONSTANT.equals(variable) and remove JDK1.5 conditionals. A lot of variable naming! OGNL-38 - Use StringBuilder instead of StringBuffer. OGNL-38 - Simplify conditionals. OGNL-38 - Test CONSTANT.equals(variable). OGNL-38 - Test CONSTANT.equals(variable). OGNL-38 - Test CONSTANT.equals(variable), remove JDK1.5 conditionals and variable naming. OGNL-38 - Variable naming (don't use acronyms), remove OgnlRuntime.isJdk15() check. OGNL-38 - Test CONSTANT.equals(variable). OGNL-38 - Test CONSTANT.equals(variable). mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198670 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198668 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlOps.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198666 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198665 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/IteratorPropertyAccessor.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198664 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198661 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198659 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMethod.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198657 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198656 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/enhance/ExpressionCompiler.java > [PATCH] Use StringBuilder instead of StringBuffer, deprecate >=JDK1.5 > conditionals and use CONSTANT.equals(variable). > --------------------------------------------------------------------------------------------------------------------- > > Key: OGNL-38 > URL: https://issues.apache.org/jira/browse/OGNL-38 > Project: OGNL > Issue Type: Improvement > Reporter: Adrian Cumiskey > Priority: Minor > Attachments: patch-OGNL38.txt > > > This patch replaces all StringBuffer references with StringBuilder for better > performance. Improved performance has not been verified but it is fairly > well established that StringBuilder performs better in single threaded use > cases (see > http://littletutorials.com/2008/07/16/stringbuffer-vs-stringbuilder-performance-comparison/). > All JDK1.5 checking has also been deprecated/removed since OGNL is now > dependent upon >=JDK1.5 these days. Lastly, all remaining > variable.equals(CONSTANT) has been flipped to the null safe > CONSTANT.equals(variable). > A list of modified classes and changes are given here :- > MenuItem: toString() now uses a chained StringBuilder instead of StringBuffer. > StaticsAndConstructorsTest: use StringBuilder instead of StringBuffer. > EnumerationPropertyAccessor: Test CONSTANT.equals(variable). > ExpressionCompiler: Test CONSTANT.equals(variable). > ASTMethod: Variable naming (don't use acronyms), remove OgnlRuntime.isJdk15() > check. > OgnlRuntime: > * Remove JDK1.5 checking since OGNL now requires >=JDK1.5. > * The isJdk15() method is now deprecated. > * Variable naming (don't use acronyms. > * getPointerString(int) now uses StringBuilder instead of StringBuffer. > * getUniqueDescriptor(Object, boolean) now uses StringBuilder instead of > StringBuffer. > * package private method findType() unused to removed. > * Simplify getMethods(Class<?>,boolean) with ternary. > * getStaticField(OgnlContext,String,String) test CONSTANT.equals(variable) > and remove JDK1.5 conditionals. > * A lot of variable naming! > SetPropertyAccessor: Test CONSTANT.equals(variable) and simplify conditionals. > ASTStaticField: Test CONSTANT.equals(variable), remove JDK1.5 conditionals > and variable naming. > MapPropertyAccessor: Simplify conditionals. > ArrayPropertyAccessor: Test CONSTANT.equals(variable). > IteratorPropertyAccessor: Test CONSTANT.equals(variable). > OgnlOps: Use StringBuilder instead of StringBuffer. > ognl.jjt: Variable naming, use StringBuilder instead of StringBuffer. Replace > new String(stringBuffer) with stringBuffer.toString(). > Cheers, Adrian. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira