Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8277504

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

    XMLWordPrintable

    Details

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

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: