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

Exceptions::new_exception can return wrong exception

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 18
    • hotspot
    • b07

    Description

      >
      > You're right. new_exception does surprising things. If it gets an exception during the call, it returns a handle to that exception, which is not what I want at all. I'll return null in that case.

      From [~dholmes]:
      I have to wonder whether `new_exceptions`'s behaviour is what anyone would want! It could lead to some very strange exceptions being thrown - see for example `ConstantPool::throw_resolution_error` where it can throw a resolution error with the wrong cause!

      I expected new_exception to have a TRAPS in case the constructor call fails or an it gets an OOM allocating the exception, but that exception shouldn't be returned instead of the original exception.

      Need to write some tests for this.

      Attachments

        Issue Links

          Activity

            People

              coleenp Coleen Phillimore
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: