commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Fong (JIRA)" <>
Subject [jira] [Commented] (JCS-163) false error message when reusing a cache directory
Date Wed, 29 Jun 2016 21:25:10 GMT


Ryan Fong commented on JCS-163:

This appears to be fixed in trunk which didn't make the beta-1 release. Can we expect a beta-2

> false error message when reusing a cache directory
> --------------------------------------------------
>                 Key: JCS-163
>                 URL:
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Indexed Disk Cache, JDBC Disk Cache
>    Affects Versions: jcs-2.0-beta-1
>            Reporter: Mark Fulton
> JCS logs an {{ERROR}} if the disk cache directory already existed:
> {noformat}
> 63   [main] ERROR org.apache.commons.jcs.auxiliary.disk.AbstractDiskCacheAttributes 
- Failed to create directory C:\MyCache
> {noformat}
> This is because [{{AbstractDiskCacheAttributes.setDiskPath(File)}}|]
the result of [{{File.mkdirs()}}|]
as if it returns {{true}} if the directories exist after invocation but this is not the case,
it only returns "{{true}} if and only if the directory was created, along with all necessary
parent directories; {{false}} otherwise."
> [{{File.exists()}}|]
(or similar) should be used instead to trigger logging an {{ERROR}} or not.

This message was sent by Atlassian JIRA

View raw message