db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-5173) RAFContainer.privGetRandomAccessFile() unwraps wrong exception type
Date Fri, 01 Apr 2011 12:41:05 GMT
RAFContainer.privGetRandomAccessFile() unwraps wrong exception type

                 Key: DERBY-5173
                 URL: https://issues.apache.org/jira/browse/DERBY-5173
             Project: Derby
          Issue Type: Bug
          Components: Store
    Affects Versions:
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen

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:

             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.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message