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 19:10:52 UTC
[myfaces] branch 2.2.x updated: MYFACES-4512: avoid NPE in createView (#408)
This is an automated email from the ASF dual-hosted git repository.
melloware pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.2.x by this push:
new e9acdeaac MYFACES-4512: avoid NPE in createView (#408)
e9acdeaac is described below
commit e9acdeaac23ad99a37643a4e0a8a71e8580a2f7e
Author: Paul A. Nicolucci <pn...@gmail.com>
AuthorDate: Mon Dec 5 14:10:47 2022 -0500
MYFACES-4512: avoid NPE in createView (#408)
---
.../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 bf93b0526..19c491cd9 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
@@ -2052,9 +2052,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;
}