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

(jdeps) jdeps can use String.repeat instead of String.replaceAll

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • tools
    • None
    • b15

      jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java

      jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java
      793│ internalApiTitle.replaceAll(".", "-"),
      794│ replacementApiTitle.replaceAll(".", "-"));

      The above calls can be replaced with

      "-".repeat(internalApiTitle.length())
      "-".repeat(replacementApiTitle.length())

      which will avoid regex/replacement.

            henryjen Henry Jen
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: