From 155ae98e49beadc294b47f0ecf76b3bdafba16f0 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Thu, 17 Nov 2022 15:51:43 +0800 Subject: [PATCH] Fix NPE in ClasspathMultiDirectory#directoryList() Signed-off-by: Sheng Chen --- .../jdt/internal/core/builder/ClasspathMultiDirectory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java index e127fb7c718..f13dfa75877 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java @@ -75,6 +75,9 @@ protected boolean isExcluded(IResource resource) { } @Override String[] directoryList(String qualifiedPackageName) { + if (this.directoryCache == null) { + this.reset(); + } String[] dirList = (String[]) this.directoryCache.get(qualifiedPackageName); if (dirList != null) return dirList;