Details
-
Type:
Enhancement
-
Status: Resolved
-
Priority:
P5
-
Resolution: Fixed
-
Affects Version/s: 17, 18
-
Fix Version/s: 18
-
Component/s: client-libs
-
Labels:None
-
Subcomponent:
-
Resolved In Build:b26
Description
There is opportunity to use String.stripTrailing() method in java.desktop in SwingUtilities2 class.
Currently used method has the same logic:
private static String trimTrailingSpaces(String s) {
int i = s.length() - 1;
while(i >= 0 && Character.isWhitespace(s.charAt(i))) {
i--;
}
return s.substring(0, i + 1);
}
Currently used method has the same logic:
private static String trimTrailingSpaces(String s) {
int i = s.length() - 1;
while(i >= 0 && Character.isWhitespace(s.charAt(i))) {
i--;
}
return s.substring(0, i + 1);
}