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

Use append() without string concatentation in MultiUIDefaults.toString

XMLWordPrintable

      The implementation of MultiUIDefaults.toString() has the following code:

              while (keys.hasMoreElements()) {
                  Object key = keys.nextElement();
                  sb.append(key + "=" + get(key) + ", ");
              }

      The result of string concatenation is appended to StringBuilder, which creates another instance of StringBuilder to perform concatenation.

            aivanov Alexey Ivanov
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: