[daisy] [JIRA] Created: (DSY-576) NullPointerException when running tests with non-existant 'blobstore' or 'indexstore'

Elvis Willems (JIRA) issues at cocoondev.org
Wed Oct 31 02:21:29 CST 2007


NullPointerException when running tests with non-existant 'blobstore' or 'indexstore'
-------------------------------------------------------------------------------------

         Key: DSY-576
         URL: http://issues.cocoondev.org//browse/DSY-576
     Project: Daisy
        Type: Bug
  Components: Repository  
 Reporter: Elvis Willems
    Priority: Minor


When you try to run 'maven test:test' in dsy-src/repository/test, and you have specified a blobstore/indexstore directory in local.testsupport.properties which does not exist, the tests will fail.

In the appropriate log file you will see the following error message (in case of blobstore):

java.lang.NullPointerException
        at org.outerj.daisy.repository.testsupport.AbstractDaisyTestCase.emptyDir(AbstractDaisyTestCase.java:72)
        at org.outerj.daisy.repository.testsupport.AbstractDaisyTestCase.setUp(AbstractDaisyTestCase.java:55)


This can simply be fixed by replacing 

if (!blobstoreFile.exists() && blobstoreFile.isDirectory())
                throw new Exception("Blobstore directory does not exist or is not a directory: " + blobstoreFile.getAbsolutePath());

with

if (!(blobstoreFile.exists() && blobstoreFile.isDirectory()))
                throw new Exception("Blobstore directory does not exist or is not a directory: " + blobstoreFile.getAbsolutePath());

at lines 52 and 53.

Same goes for the indexstore check, at lines 58 and 59.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list