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

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/579f29de113a
            User: sundar
            Date: 2015-12-24 11:22:38 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/579f29de113a User: sundar Date: 2015-12-24 11:22:38 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/579f29de113a
            User: lana
            Date: 2016-01-06 20:14:20 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/579f29de113a User: lana Date: 2016-01-06 20:14:20 +0000

              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: