Description
FindBugs is currently showing 2 performance warnings in StackKeyedObjectPool due to the usage of
new Integer(value)
as opposed to
Integer.valueOf(value)
Also, it seems we create a new Integer instance each time we need to store 1 in the map – since the Integer class is immutable, we can actually share one single instance for these cases, and reduce pressure on the GC, and this patch addresses this minor optimization as well.