Details
Description
Improvements to lang-management classes from running findbugs, and exclusions list.
Most changes are performance suggestions, e.g. Boolean.valueOf and removing new String(<existing String>), and some redundant logic, e.g. String fileNameValue = (fileName == null) ? null : new String(fileName)
The exclude is for returning a mutable object from java.lang.management.ThreadInfo.getStackTrace(), but I checked the RI and it does the same, so I didn't make any changes:
StackTraceElement[] stack1 = ti.getStackTrace();
String dummyData = "dummy";
StackTraceElement dummyElement = new StackTraceElement(dummyData, dummyData, dummyData, 0);
stack1[0] = dummyElement;
StackTraceElement[] stack2 = ti.getStackTrace();
assertNotSame(stack1[0], stack2[0]); // this fails on Sun and Harmony