deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject git commit: DELTASPIKE-601 legacy support for ViewConfigPathValidator
Date Tue, 20 May 2014 10:06:16 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master f8626a75c -> 0b93d70ec


DELTASPIKE-601 legacy support for ViewConfigPathValidator


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/0b93d70e
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/0b93d70e
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/0b93d70e

Branch: refs/heads/master
Commit: 0b93d70ec1d572865809642cf505814ef32d1340
Parents: f8626a7
Author: gpetracek <gpetracek@apache.org>
Authored: Tue May 20 11:58:30 2014 +0200
Committer: gpetracek <gpetracek@apache.org>
Committed: Tue May 20 11:58:33 2014 +0200

----------------------------------------------------------------------
 .../impl/config/view/ViewConfigPathValidator.java    | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/0b93d70e/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigPathValidator.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigPathValidator.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigPathValidator.java
index 0e8351c..1bfbf06 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigPathValidator.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigPathValidator.java
@@ -45,7 +45,18 @@ public class ViewConfigPathValidator implements ServletContextListener,
Deactiva
     {
         if (ClassDeactivationUtils.isActivated(getClass()))
         {
-            ViewConfigResolver viewConfigResolver = BeanProvider.getContextualReference(ViewConfigResolver.class);
+            ViewConfigResolver viewConfigResolver;
+
+            try
+            {
+                viewConfigResolver = BeanProvider.getContextualReference(ViewConfigResolver.class);
+            }
+            catch (Exception e)
+            {
+                LOGGER.log(Level.WARNING, "Container issue detected -> can't validate
view-configs.", e);
+                return;
+            }
+
             List<String> supportedExtensions = new ArrayList<String>();
             supportedExtensions.add(View.Extension.XHTML);
             supportedExtensions.add(View.Extension.JSP);
@@ -116,7 +127,7 @@ public class ViewConfigPathValidator implements ServletContextListener,
Deactiva
     protected void printException(Exception e)
     {
         //for easier analysis (in combination with several servers)
-        Logger.getLogger(ViewConfigPathValidator.class.getName()).log(Level.SEVERE, "invalid
view-config found", e);
+        LOGGER.log(Level.SEVERE, "invalid view-config found", e);
     }
 
     @Override


Mime
View raw message