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

Java linker indexed property getter does not work for computed nashorn string

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b100
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        This issue was reported by Axel Faust via a tweet (https://twitter.com/ReluctantBird83/status/679754932094930944)

        Link to test is as follows: http://fpaste.org/304445/90077614/

        The test case cut-pasted here for convenience:



            var locale = new Packages.java.util.Locale('de', 'DE');
            var prop = 'ISO3Language';
            var prop1 = 'ISO3';
            var prop2 = prop1 + 'Language';
            var prop3 = String(prop2);
            print(locale.ISO3Language);
            // prints: deu
            print(locale['ISO3Language']);
            // prints: deu
            print(locale[prop]);
            // prints: deu
            print(locale[prop1 + 'Language']);
            // prints: null
            print(locale[prop2]);
            // prints: null
            print(locale[prop3]);
            // prints: deu
            print(locale[String(prop1 + 'Language')]);
            // prints: deu

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sundar Sundararajan Athijegannathan
                  Reporter:
                  sundar Sundararajan Athijegannathan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: