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

jdk/jfr/api/consumer/TestHiddenMethod uses nashorn script engine

    XMLWordPrintable

Details

    • jfr
    • b21

    Description

      test/jdk/jdk/jfr/api/consumer/TestHiddenMethod uses nashorn script engine. But nashorn engine has been removed (JEP: https://openjdk.java.net/jeps/372). Port the test to avoid nashorn.

      Test also fails in CI with NullPointerException:
      Test: jdk/jfr/api/consumer/TestHiddenMethod.java
      Platforms: ALL
      Failure:
      java.lang.NullPointerException
      at jdk.jfr.api.consumer.TestHiddenMethod.main(TestHiddenMethod.java:66)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:832)


      ====== Related to Nashorn removal, the failure is in engine.eval():
                 ScriptEngine engine = manager.getEngineByName("nashorn");
                  engine.eval(...) <<------ Line 66, NPE

      Attachments

        Issue Links

          Activity

            People

              egahlin Erik Gahlin
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: