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

[TESTBUG] compiler.codecache.stress.Helper.TestCaseImpl can't be defined in different runtime package as its nest host

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b14

      Description

      compiler.codecache.stress.Helper.TestCaseImpl is a nested inner class of
      compiler.codecache.stress.Helper so they have nestmate relationship.
      However the test defines TestCaseImpl class with a different class loader in
      a different runtime package as its nest host class
      compiler.codecache.stress.Helper.

      TestCaseImpl has a NestHost attribute but TestCaseImpl does not rely on
      nestmate access it never validates the nest relationship and so this
      problem is not seen.

      These tests must be fixed before JDK-8171335 that will change the lambda
      generation using dynamic nestmates where the nest-host of the nested class
      has to be retrieved and results in a failure:

      Exception: java.lang.IncompatibleClassChangeError: Type compiler.codecache.stress.Helper$TestCaseImpl (loader: jdk.test.lib.ByteCodeLoader ...) is not a nest member of compiler.codecache.stress.Helper (loader: 'app'): types are in different packages

      The nest-host and the nest members must all be in the same package.
      The test should be rewritten to use top-level classes rather then nested ones.

      http://hg.openjdk.java.net/valhalla/valhalla/rev/ab7ea72963c9
      is the patch fixing these tests in valhalla repo nestmates branch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rraghavan Rahul Raghavan
              Reporter:
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: