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

[Testbug] java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest creates an invalid nest relationship

    Details

    • Subcomponent:
    • Resolved In Build:
      b01

      Description

      PlatformLoggerBridgeTest uses a custom classloader to load a nested class that is to be a service provider. This results in the enclosing class and the nested class being in two different packages as they have different defining loaders. For a valid nest the nest-host and the nest members must all be in the same package.

      As PlatformLoggerBridgeTest does not rely on nestmate access it never validates the nest relationship and so this problem is not seen.

      However with future changes to lambda generation using dynamic nestmates (via Lookup.defineClass) the nest-host of the nested class now has to be retrieved, which results in a failure:

      java.lang.IncompatibleClassChangeError: Type PlatformLoggerBridgeTest$LogProducerFinder is not a nest member of PlatformLoggerBridgeTest: types are in different packages

      The test should be rewritten to use top-level classes rather then nested ones.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dfuchs Daniel Fuchs
                Reporter:
                dholmes David Holmes
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: