[ 
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.diff

The attached patch, check-null.diff, makes the database boot successfully in 
the case where it previously failed with a NullPointerException. Now, instead, 
if you perform an operation that requires a temporary file after the database 
has been successfully booted, you will see a message such as:

{noformat}
ij> declare global temporary table t(x int) not logged;
ERROR XSDF1: Exception during creation of file 
/tmp/d6396/db/tmp/T1383035594089.tmp for container
ERROR XJ001: Java exception: '/tmp/d6396/db/tmp/T1383035594089.tmp (Permission 
denied): java.io.FileNotFoundException'.
{noformat}

I'll see if I can cook up a regression test case for it.

All the existing regression tests passed with the patch.

> NullPointerException in DirFile
> -------------------------------
>
>                 Key: DERBY-6396
>                 URL: https://issues.apache.org/jira/browse/DERBY-6396
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions: 10.10.1.1
>         Environment: Windows 7
>            Reporter: Fabian Depry
>         Attachments: check-null.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
(v6.1#6144)

Reply via email to