diff options
author | Eduard Bartsch | 2011-03-10 12:56:46 +0000 |
---|---|---|
committer | Eduard Bartsch | 2011-03-10 12:56:46 +0000 |
commit | abe451c8a2ff0231c503986a201c24830c9283de (patch) | |
tree | 6dfaedd28f7e4c040b06c25ae36492e577690bbd | |
parent | 8e347242600daed2a7ae3317618a8c5bdc77c4f4 (diff) | |
download | org.eclipse.e4.resources-abe451c8a2ff0231c503986a201c24830c9283de.tar.gz org.eclipse.e4.resources-abe451c8a2ff0231c503986a201c24830c9283de.tar.xz org.eclipse.e4.resources-abe451c8a2ff0231c503986a201c24830c9283de.zip |
Bug 339508 - [sfs] SFS tests are failing for e4 0.11 Integration Build: I20110310-0100v20110311-0205
-rw-r--r-- | bundles/org.eclipse.core.resources.semantic/src/org/eclipse/core/internal/resources/semantic/cacheservice/CachingOutputStream.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.core.resources.semantic/src/org/eclipse/core/internal/resources/semantic/cacheservice/CachingOutputStream.java b/bundles/org.eclipse.core.resources.semantic/src/org/eclipse/core/internal/resources/semantic/cacheservice/CachingOutputStream.java index 80e0039..265ba11 100644 --- a/bundles/org.eclipse.core.resources.semantic/src/org/eclipse/core/internal/resources/semantic/cacheservice/CachingOutputStream.java +++ b/bundles/org.eclipse.core.resources.semantic/src/org/eclipse/core/internal/resources/semantic/cacheservice/CachingOutputStream.java @@ -27,6 +27,7 @@ class CachingOutputStream extends OutputStream { private final ITemporaryContentHandle fileHandle; private final ICacheUpdateCallback callback; private final boolean appendMode; + private boolean closed; protected CachingOutputStream(CacheService service, ITemporaryContentHandle tempHandle, boolean append, ICacheUpdateCallback callback) { @@ -34,16 +35,22 @@ class CachingOutputStream extends OutputStream { this.fileHandle = tempHandle; this.appendMode = append; this.callback = callback; - + this.closed = false; } @Override @SuppressWarnings("boxing") public void close() throws IOException { + if (closed) { + return; + } + InputStream stream = null; try { long timestamp = System.currentTimeMillis(); + closed = true; + this.cacheService.addFromTempHandle(this.fileHandle); IPath path = this.fileHandle.getKey(); |