[ https://issues.apache.org/jira/browse/OGNL-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145313#comment-13145313 ]
Hudson commented on OGNL-38: ---------------------------- Integrated in ognl #187 (See [https://builds.apache.org/job/ognl/187/]) Added OGNL-38 to the change list OGNL-38 - Use StringBuilder instead of StringBuffer, removed boxing, replaced for loop with foreach OGNL-38 - Use StringBuilder instead of StringBuffer. OGNL-38 - Variable naming, use StringBuilder instead of StringBuffer. Replace new String(stringBuffer) with stringBuffer.toString(). OGNL-38 - Variable naming, use StringBuilder instead of StringBuffer. Replace new String(stringBuffer) with stringBuffer.toString(). OGNL-38 - Test CONSTANT.equals(variable) and simplify conditionals. OGNL-38 - Removed useless extends object. mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198685 Files : * /commons/proper/ognl/trunk/src/changes/changes.xml mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198683 Files : * /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/StaticsAndConstructorsTest.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198682 Files : * /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198681 Files : * /commons/proper/ognl/trunk/src/main/jjtree/ognl.jjt mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198680 Files : * /commons/proper/ognl/trunk/src/main/javacc/ognl.jj mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198679 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/SetPropertyAccessor.java mcucchiara : http://svn.apache.org/viewvc/?view=rev&rev=1198671 Files : * /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.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 > Assignee: Maurizio Cucchiara > 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