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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: 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.

            Assignee:
            Henry Jen
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: