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

StackWalker.walk throws InternalError if called from a constructor invoked through reflection.

    Details

    • Subcomponent:
    • Resolved In Build:
      b157
    • Verification:
      Verified

      Backports

        Description

        Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:466)
        at Test.main(Test.java:45)
        Caused by: java.lang.InternalError: Not jdk.internal.reflect.MethodAccessor: class jdk.internal.reflect.NativeConstructorAccessorImpl
        at java.base/java.lang.StackStreamFactory.isReflectionFrame(StackStreamFactory.java:984)
        at java.base/java.lang.StackStreamFactory.access$000(StackStreamFactory.java:59)
        at java.base/java.lang.StackStreamFactory$AbstractStackWalker.peekFrame(StackStreamFactory.java:264)
        at java.base/java.lang.StackStreamFactory$AbstractStackWalker.hasNext(StackStreamFactory.java:349)
        at java.base/java.lang.StackStreamFactory$StackFrameTraverser.tryAdvance(StackStreamFactory.java:591)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dfuchs Daniel Fuchs
                  Reporter:
                  dfuchs Daniel Fuchs
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: