From bbd8cb1a979cd74fce2899b5fdc52ef57ba02bdc Mon Sep 17 00:00:00 2001 From: Christoph Rueger Date: Fri, 29 Dec 2023 22:52:20 +0100 Subject: [PATCH] synchronize JAREditor.getFolder() With this I can no longer reproduce the racecondition and the java.lang.Exception: Resource '/.BndtoolsJAREditorTempFiles/temp/10000002' already exists Signed-off-by: Christoph Rueger --- .../src/bndtools/jareditor/internal/JARTreePage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bndtools.jareditor/src/bndtools/jareditor/internal/JARTreePage.java b/bndtools.jareditor/src/bndtools/jareditor/internal/JARTreePage.java index 2e05a71662..bd479299e0 100644 --- a/bndtools.jareditor/src/bndtools/jareditor/internal/JARTreePage.java +++ b/bndtools.jareditor/src/bndtools/jareditor/internal/JARTreePage.java @@ -132,7 +132,7 @@ void setInput(URI uri) { update(); } - private IFolder getFolder(URI input, IProgressMonitor monitor) throws CoreException { + private synchronized IFolder getFolder(URI input, IProgressMonitor monitor) throws CoreException { URI full = JarFileSystem.jarf(input, "/") .orElseThrow(IllegalArgumentException::new);