Use String.stripTrailing instead of hand-crafted method in SwingUtilities2

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 18
    • Affects Version/s: 17, 18
    • Component/s: client-libs
    • None

      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);
          }

            Assignee:
            Andrey Turbanov
            Reporter:
            Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: