Replaced File.mkdirs with FileUtils.mkdir of Apache Commons IO in order to notice failure of directory creation which is easier with IOException than the boolean return value of File.mkdirs (which has been ignored so far anyway).
Short description of what this resolves:
Ignored failures of java.io.File.mkdirs which would require handling of the boolean return value which is already done in Apache Commons IO.
Since the if (!file.getParentFile().exists()) branch in UncompressTool.process isn't covered by a unit test, yet, I'd be happy for a suggestion how to acchieve that (in the linked SO question the failure is caused by a failure to create the directory at the statement wrapped with the mentioned if condition).
I have no idea why Travis CI fails (complains about erroneous JAVA_HOME, while the main repo passes.
Changes proposed in this pull request:
replacement of File.mkdirs with FileUtils.mkdir of Apache Commons IO
Replaced File.mkdirs with FileUtils.mkdir of Apache Commons IO in order to notice failure of directory creation which is easier with IOException than the boolean return value of File.mkdirs (which has been ignored so far anyway).
Short description of what this resolves:
Ignored failures of
java.io.File.mkdirs
which would require handling of the boolean return value which is already done in Apache Commons IO.This requires throwing
IOException
inSpaceliftConfiguration.cache
andcachePath(String)
, but that's necessary anyway since ignoring the failure of directory creation which would lead to bizarre behaviour (which has been the motivation for this PR, see e.g. https://stackoverflow.com/questions/47217087/why-does-my-arquillian-drone-functional-test-not-work-on-gitlab-ci) is not an option.Since the
if (!file.getParentFile().exists())
branch inUncompressTool.process
isn't covered by a unit test, yet, I'd be happy for a suggestion how to acchieve that (in the linked SO question the failure is caused by a failure to create the directory at the statement wrapped with the mentioned if condition).I have no idea why Travis CI fails (complains about erroneous
JAVA_HOME
, while the main repo passes.Changes proposed in this pull request:
File.mkdirs
withFileUtils.mkdir
of Apache Commons IO