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

Bruno Dumon (JIRA) issues at cocoondev.org
Mon Nov 5 04:33:29 CST 2007


     [ http://issues.cocoondev.org//browse/DSY-576?page=all ]

Bruno Dumon updated DSY-576:
----------------------------

    Fix Version: 2.2

> 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
>      Fix For: 2.2
>  Attachments: AbstractDaisyTestCase.java.patch
>
> 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