From cac01f0eb397c3ef8d4e578901040c540a109245 Mon Sep 17 00:00:00 2001 From: Peter Kriens Date: Tue, 23 Jan 2024 18:07:32 +0100 Subject: [PATCH] NPE on File System Compare --- Signed-off-by: Peter Kriens Signed-off-by: Peter Kriens --- .../src/bndtools/jareditor/internal/JarFileSystem.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java b/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java index f38144e8eb..0bed075df6 100644 --- a/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java +++ b/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java @@ -27,6 +27,7 @@ import org.eclipse.core.filesystem.provider.FileStore; import org.eclipse.core.filesystem.provider.FileSystem; import org.eclipse.core.internal.filesystem.NullFileStore; +import org.eclipse.core.internal.filesystem.NullFileSystem; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; @@ -54,7 +55,8 @@ */ public class JarFileSystem extends FileSystem { private static final ILogger logger = Logger.getLogger(JarFileSystem.class); - + @SuppressWarnings("unused") + private static final NullFileSystem INIT = new NullFileSystem(); private static final String SCHEME_JARF = "jarf"; private final ConcurrentMap> roots = new ConcurrentHashMap<>(); @@ -98,6 +100,7 @@ public String[] childNames(int options, IProgressMonitor monitor) throws CoreExc @Override public IFileStore getChild(String name) { + new NullFileSystem(); return new NullFileStore(new Path(getPath()).append(name)); }