You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pa...@apache.org on 2022/12/05 12:33:54 UTC
[myfaces] branch main updated: MYFACES-4512: avoid NPE in createView
This is an automated email from the ASF dual-hosted git repository.
paulnicolucci pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/main by this push:
new 05e29e5c4 MYFACES-4512: avoid NPE in createView
new db3763474 Merge pull request #404 from pnicolucci/MYFACES-4512
05e29e5c4 is described below
commit 05e29e5c4b301a9fcd0f331f821255e6d6ffe827
Author: Paul Nicolucci <pn...@gmail.com>
AuthorDate: Mon Dec 5 06:11:56 2022 -0500
MYFACES-4512: avoid NPE in createView
---
.../myfaces/view/facelets/FaceletViewDeclarationLanguage.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index 2253c6d34..ed0a98dac 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -1926,9 +1926,13 @@ public class FaceletViewDeclarationLanguage extends FaceletViewDeclarationLangua
//Ensure calculateResourceLibraryContracts() can be decorated
ViewDeclarationLanguage vdl = context.getApplication().getViewHandler()
.getViewDeclarationLanguage(context, viewId);
- List<String> contracts = vdl.calculateResourceLibraryContracts(
- context, root.getViewId() != null ? root.getViewId() : viewId);
- context.setResourceLibraryContracts(contracts);
+
+ if (vdl != null)
+ {
+ List<String> contracts = vdl.calculateResourceLibraryContracts(
+ context, root.getViewId() != null ? root.getViewId() : viewId);
+ context.setResourceLibraryContracts(contracts);
+ }
}
return root;
}