Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5173

RAFContainer.privGetRandomAccessFile() unwraps wrong exception type

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.7.1.1
    • 10.8.1.2
    • Store
    • None

    Description

      RAFContainer.privGetRandomAccessFile() catches and unwraps PrivilegedActionExceptions raised in the privileged code:

      catch( PrivilegedActionException pae)

      { throw (StandardException) pae.getException(); }

      The problem is that the privileged code is this:

      case GET_RANDOM_ACCESS_FILE_ACTION:

      { return actionFile.getRandomAccessFile("rw"); }

      // end of case BACKUP_CONTAINER_ACTION

      getRandomAccessFile() only has one checked exception, and that is FileNotFoundException. If it ever happens to raise FNFE, privGetRandomAccessFile() will fail with a ClassCastException and hide the underlying error.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment