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] [Updated] (DERBY-6396) NullPointerException in DirFile
Date Tue, 29 Oct 2013 12:18:30 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-6396:

    Attachment: check-null-with-test.diff

Attaching an updated patch that includes a test case (check-null-with-test.diff). The test
fails with a NullPointerException without the fix (at least on platforms where java.io.File.setReadable()
has an effect) and passes with the fix. I've verified that the test passes on Windows and
Linux, with Java 6, 7 and 8. That should hopefully cover most platform differences.

> NullPointerException in DirFile
> -------------------------------
>                 Key: DERBY-6396
>                 URL: https://issues.apache.org/jira/browse/DERBY-6396
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions:
>         Environment: Windows 7
>            Reporter: Fabian Depry
>            Assignee: Knut Anders Hatlen
>         Attachments: check-null.diff, check-null-with-test.diff
> We got a NullPointerException trying to start a Derby database in embedded mode; the
stacktrace indicated it happened in org.apache.derby.impl.io.DirFile.deleteAll(); that method
got called from org.apache.derby.impl.io.BaseStorageFactory.createTempDir().
> After investigating, it appears that the deleteAll() method calls "super.list()", which
according to the java.io.File specifications, can return null. But the deleteAll() method
doesn't handle that case gracefully.

This message was sent by Atlassian JIRA

View raw message