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

NullPointerException in DirFile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.10.1.1
    • 10.10.2.0, 10.11.1.1
    • Miscellaneous
    • None
    • Windows 7
    • Seen in production

    Description

      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.

      Attachments

        1. check-null-with-test.diff
          8 kB
          Knut Anders Hatlen
        2. check-null.diff
          2 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            fabian_depry@yahoo.com Fabian Depry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: