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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • None
    • b100
    • generic
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: