Adjusted fix for issue in CryptoFileSystem when deleting a file

* CryptoWritableFile now only invokes writeTaks.get if not already
closed
* CryptoWritableFile now cancels writeTask before delete
This commit is contained in:
Markus Kreusch
2016-01-16 00:47:13 +01:00
parent a7eb99f7d5
commit 51f5b6661f
3 changed files with 11 additions and 4 deletions
@@ -27,7 +27,7 @@ public class InMemoryWritableFile implements WritableFile {
private final Consumer<Void> deleter;
private final WriteLock writeLock;
private boolean open;
private boolean open = true;
private int position = 0;
public InMemoryWritableFile(Consumer<Instant> lastModifiedSetter, Consumer<Instant> creationTimeSetter, Supplier<ByteBuffer> contentGetter, Consumer<ByteBuffer> contentSetter, Consumer<Void> deleter,