Found 2 redundant allocations in java.util.prefs.WindowsPreferences
1.
if ((windowsName.length() > 1) &&
(windowsName.substring(0, 2).equals("/!"))) {
return toJavaAlt64Name(windowsName);
}
No need to call substring here. We can use startWith instead.
2. String array allocated and then unused in a method childrenNamesSpi
String[] subkeys = new String[subKeysNumber];
1.
if ((windowsName.length() > 1) &&
(windowsName.substring(0, 2).equals("/!"))) {
return toJavaAlt64Name(windowsName);
}
No need to call substring here. We can use startWith instead.
2. String array allocated and then unused in a method childrenNamesSpi
String[] subkeys = new String[subKeysNumber];