From a38363a41e0d1dfbbf94d92e386eeef151b18dfb Mon Sep 17 00:00:00 2001 From: zfq <5785006+zfqjava@users.noreply.github.com> Date: Fri, 23 Dec 2022 16:41:32 +0800 Subject: [PATCH] fix NPE --- .../faces/application/resource/ResourcePathsIterator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java b/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java index 7a40f7fafa..9e393224ad 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java @@ -64,7 +64,10 @@ public String next() { } private void visit(String resourcePath) { - stack.addAll(externalContext.getResourcePaths(resourcePath)); + java.util.Set set = externalContext.getResourcePaths(resourcePath); + if(set != null) { + stack.addAll(set); + } } private void tryTake() {