You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by me...@apache.org on 2022/12/05 15:22:52 UTC
[myfaces] branch 3.0.x updated: MYFACES-4512: avoid NPE in createView (#406)
This is an automated email from the ASF dual-hosted git repository.
melloware pushed a commit to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/3.0.x by this push:
new 88f1664ed MYFACES-4512: avoid NPE in createView (#406)
88f1664ed is described below
commit 88f1664ed0c83e7425f98ddaf5f411c30778f185
Author: Paul A. Nicolucci <pn...@gmail.com>
AuthorDate: Mon Dec 5 10:22:47 2022 -0500
MYFACES-4512: avoid NPE in createView (#406)
---
.../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 db39e7996..053248bed 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
@@ -2059,9 +2059,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;
}