Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanUp fails by new empty archive #26

Closed
FreakyBytes opened this issue Jan 30, 2017 · 0 comments
Closed

cleanUp fails by new empty archive #26

FreakyBytes opened this issue Jan 30, 2017 · 0 comments

Comments

@FreakyBytes
Copy link
Member

Trac Ticket #24

component: code
owner: Martin Scharm martin@binfalse.de
reporter: martinP
created: 2014-11-20 11:09:56
milestone:
type: defect
version:
keywords:

In !CombineArchive.cleanUp(Path p) line 1375 throws an error, when creating a new archive.
cf. source:/src/main/java/de/unirostock/sems/cbarchive/CombineArchive.java#L1377

{{{
java.lang.NullPointerException
at com.sun.nio.zipfs.ZipFileSystem.removeFromTree(ZipFileSystem.java:2329)
at com.sun.nio.zipfs.ZipFileSystem.updateDelete(ZipFileSystem.java:1102)
at com.sun.nio.zipfs.ZipFileSystem.deleteFile(ZipFileSystem.java:1339)
at com.sun.nio.zipfs.ZipPath.delete(ZipPath.java:655)
at com.sun.nio.zipfs.ZipFileSystemProvider.delete(ZipFileSystemProvider.java:206)
at java.nio.file.Files.delete(Files.java:1077)
at de.unirostock.sems.cbarchive.CombineArchive.cleanUp(CombineArchive.java:1375)
at de.unirostock.sems.cbarchive.CombineArchive.cleanUp(CombineArchive.java:1356)
at de.unirostock.sems.cbarchive.CombineArchive.(CombineArchive.java:147)
at de.unirostock.sems.cbarchive.web.UserManager.createArchive(UserManager.java:247)
at de.unirostock.sems.cbarchive.web.UserManager.createArchive(UserManager.java:222)
at de.unirostock.sems.cbarchive.web.rest.RestApi.createArchive(RestApi.java:495)
}}}

comment 1

time: 2015-07-14 11:21:29
author: Martin Scharm martin@binfalse.de

In None:


do not fail anymore for newly created files [fixes #24]

new the constructor checks if file has size 0 if it exists. in that case it simply gets deleted...

also added a test for that

comment 2

time: 2015-07-14 11:21:29
author: Martin Scharm martin@binfalse.de

Updated owner to Martin Scharm martin@binfalse.de

comment 3

time: 2015-07-14 11:21:29
author: Martin Scharm martin@binfalse.de

Updated resolution to fixed

comment 4

time: 2015-07-14 11:21:29
author: Martin Scharm martin@binfalse.de

Updated status to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant