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

jdeprscan --help causes an exception when the locale is ja, zh_CN or de

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 19
    • Component/s: globalization
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      19
    • Resolved In Build:
      b19
    • CPU:
      generic
    • OS:
      generic

      Description

      Running jdeprscan with --help option causes an exception on any OSs when the locale is ja or zh_CN.

      $ jdeprscan -J-Duser.language=ja --help
      Exception in thread "main" java.lang.IllegalArgumentException: can't parse argument number: dir|jar|class
              at java.base/java.text.MessageFormat.makeFormat(MessageFormat.java:1454)
              at java.base/java.text.MessageFormat.applyPattern(MessageFormat.java:492)
              at java.base/java.text.MessageFormat.<init>(MessageFormat.java:371)
              at java.base/java.text.MessageFormat.format(MessageFormat.java:860)
              at jdk.jdeps/com.sun.tools.jdeprscan.Messages.get(Messages.java:62)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.printHelp(Main.java:706)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.run(Main.java:529)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.call(Main.java:717)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.main(Main.java:725)
      Caused by: java.lang.NumberFormatException: For input string: "dir|jar|class"
              at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
              at java.base/java.lang.Integer.parseInt(Integer.java:668)
              at java.base/java.lang.Integer.parseInt(Integer.java:786)
              at java.base/java.text.MessageFormat.makeFormat(MessageFormat.java:1452)
              ... 8 more

      $ jdeprscan -J-Duser.language=zh -J-Duser.country=CN --help
      Exception in thread "main" java.lang.IllegalArgumentException: can't parse argument number: dir|jar|class
              at java.base/java.text.MessageFormat.makeFormat(MessageFormat.java:1454)
              at java.base/java.text.MessageFormat.applyPattern(MessageFormat.java:492)
              at java.base/java.text.MessageFormat.<init>(MessageFormat.java:371)
              at java.base/java.text.MessageFormat.format(MessageFormat.java:860)
              at jdk.jdeps/com.sun.tools.jdeprscan.Messages.get(Messages.java:62)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.printHelp(Main.java:706)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.run(Main.java:529)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.call(Main.java:717)
              at jdk.jdeps/com.sun.tools.jdeprscan.Main.main(Main.java:725)
      Caused by: java.lang.NumberFormatException: For input string: "dir|jar|class"
              at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
              at java.base/java.lang.Integer.parseInt(Integer.java:668)
              at java.base/java.lang.Integer.parseInt(Integer.java:786)
              at java.base/java.text.MessageFormat.makeFormat(MessageFormat.java:1452)
              ... 8 more

      Of course, it works well when the locale is anything other than those locales.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ksakata Koichi Sakata
              Reporter:
              ksakata Koichi Sakata
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: