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

NullPointerException in DirFile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.2.0, 10.11.1.1
    • Component/s: Miscellaneous
    • Labels:
      None
    • Environment:
      Windows 7
    • Bug behavior facts:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: