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

suboptimal exception choice for Policy.getPolicyNoCheck debugging

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • security-libs
    • beta
    • generic
    • generic

      Policy.getPolicyNoCheck first attempts to instantiate the policy in the bootstrap loader, and if that fails, then tries the extension loader. If both fail, the debugging prints the stack trace for the first failure, rather than the second. This is suboptimal. If the policy class is actually in the extension loader, but loading or instantiation of it fails for some reason, the actual failure is not revealed: the stack trace will just show the ClassNotFoundException from the failed attempt to find it in the bootstrap loader. Printing the stack trace of the second exception should always be preferable, given that forName will delegate to the bootstrap loader first anyway.
      ###@###.### 2005-06-02 21:10:38 GMT

            claisunw Charlie Lai (Inactive)
            bscheiflsunw Bob Scheifler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: