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

javac i18n message for protected member access wrongly translated for S. Chinese

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u73, 9, 10
    • Fix Version/s: 10
    • Component/s: globalization
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_73"
      Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [10.0.14393]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Language: Simplified Chinese

      A DESCRIPTION OF THE PROBLEM :
      When accessing a protected member from where is not permitted, javac compilation error message shown is not correct.

      The translation for Simplified Chinese is:

      错误: seat()可以在Chair中访问protected

      Meaning "seat() can access protected in Chair", while the real message is: "seat() has protected access in Chair". Meaning reversed.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      0. Change your Windows language to Chinese.
      1. Create a class, named A, with a protected method/variable, named var.
      2. Create another class, named B, without extending A.
      3. Access var from B in code.
      4. Compiled B with javac.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The error message should be like:
      错误:var在A中的访问控制修饰符是protected
      ACTUAL -
      错误: seat()可以在Chair中访问protected

      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            Assignee:
            ljiang Leo Jiang (Inactive)
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: