WBEMListenerSBLIM methods call the Integer constructor instead of using the better performing valueOf() method.
Bug: Method org.sblim.cimclient.WBEMListenerSBLIM.addListener(IndicationListener, int, String, String, Properties) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead
Bug: Method org.sblim.cimclient.WBEMListenerSBLIM.removeListener(int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead
Pattern id: DM_NUMBER_CTOR, type: Bx, category: PERFORMANCE
Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.
Fixing this eliminates 2 FindBugs issues
Patch sent for community review. During a 2 week period any
exploiter may comment on the patch, request changes or turn it
down completely (with good reason). For the time being the patch is part of the "Experimental" branch in CVS.
Patch against HEAD
The community review has completed and we received no substantial critisism. Therefore the patch has been approved and merged into the "HEAD" branch. The next release will pick it up.
The patch was picked up by release 2.1.6 and will therefore be closed.