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

Run java/net/URL/HandlerLoop.java in othervm mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b13

      Description

      HandlerLoop should be run in othervm, as it sets the system-wide URL protocol handler factory which could inadvertently affect subsequent tests run in the same agentvm. For example, it can affect OpenStream.java:

      $ rm -rf JT*
      $
      $ ~/tools/jtreg/bin/jtreg -agentvm -v:time -conc:1 -esa -ea -jdk:build/macosx-x64/images/jdk test/jdk/java/net/URL/HandlerLoop.java test/jdk/java/net/URL/OpenStream.java
      Directory "JTwork" not found: creating
      Directory "JTreport" not found: creating
      Passed: java/net/URL/HandlerLoop.java
      [2019-03-19 20:19:07,599] Agent[0]: stderr: WARNING: An illegal reflective access operation has occurred
      [2019-03-19 20:19:07,599] Agent[0]: stderr: WARNING: Illegal reflective access by HandlerLoop$HandlerFactory (file:/Users/chhegar/repos/jdk/jdk/open/JTwork/classes/java/net/URL/HandlerLoop.d/) to constructor sun.net.www.protocol.http.Handler()
      [2019-03-19 20:19:07,599] Agent[0]: stderr: WARNING: Please consider reporting this to the maintainers of HandlerLoop$HandlerFactory
      [2019-03-19 20:19:07,600] Agent[0]: stderr: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      [2019-03-19 20:19:07,600] Agent[0]: stderr: WARNING: All illegal access operations will be denied in a future release
        build: 0.956 seconds
        compile: 0.951 seconds
        main: 0.045 seconds
      Passed: java/net/URL/OpenStream.java
        build: 0.101 seconds
        compile: 0.101 seconds
        main: 0.027 seconds
      Test results: passed: 2
      Report written to /Users/chhegar/repos/jdk/jdk/open/JTreport/html/report.html
      Results written to /Users/chhegar/repos/jdk/jdk/open/JTwork
      $
      $ find JTwork/ -name "*.jtr" -exec grep "Agent id" {} \; -print
      Agent id: 0
      Agent id: 0
      JTwork//java/net/URL/OpenStream.jtr
      Agent id: 0
      Agent id: 0
      JTwork//java/net/URL/HandlerLoop.jtr
      $
      $ grep "Loading handler" JTwork/java/net/URL/HandlerLoop.jtr
      Loading handler class: sun.net.www.protocol.file.Handler
      $
      $ grep "Loading handler" JTwork/java/net/URL/OpenStream.jtr
      Loading handler class: sun.net.www.protocol.http.Handler

        Attachments

          Activity

            People

            Assignee:
            chegar Chris Hegarty
            Reporter:
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: