Community
Participate
Working Groups
I ran FindBugs against the wst.xml.core plugin and one of the items it reported was the inefficient use of new String(). It suggests for performance and memory usage that the constant "" be used as java compilers and jvms will use the reference to the constant instead of creating new objects everytime. I'll attach a patch that addresses this issue in various parts of the core code.
Created attachment 153863 [details] Patch to correct memory performance
Created attachment 153873 [details] Refactored to make an EMPTY_STRING constant Refactored to make an XMLCorePlugin.EMPTY_STRING constant that can be used.
Mostly applied, except I made the string a package protected constant in NodeImpl itself and had the formatter classes use the existing NodeFormatter#EMPTY_STRING constant instead.