deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject git commit: DELTASPIKE-529 better lazy init
Date Thu, 27 Feb 2014 18:58:49 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master db37a83a2 -> 6d1278201


DELTASPIKE-529 better lazy init

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

Branch: refs/heads/master
Commit: 6d1278201aab8fae40b1423a5204fc989003a89a
Parents: db37a83
Author: tandraschko <tandraschko@apache.org>
Authored: Thu Feb 27 19:57:43 2014 +0100
Committer: tommy <tommy@tommy-notebook>
Committed: Thu Feb 27 19:58:33 2014 +0100

----------------------------------------------------------------------
 .../jsf/impl/exception/DeltaSpikeExceptionHandler.java  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/6d127820/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/exception/DeltaSpikeExceptionHandler.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/exception/DeltaSpikeExceptionHandler.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/exception/DeltaSpikeExceptionHandler.java
index 3dbb878..e2b8f47 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/exception/DeltaSpikeExceptionHandler.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/exception/DeltaSpikeExceptionHandler.java
@@ -60,7 +60,7 @@ public class DeltaSpikeExceptionHandler extends ExceptionHandlerWrapper
implemen
     {
         if (isActivated)
         {
-            init();
+            lazyInit();
             
             FacesContext context = FacesContext.getCurrentInstance();
 
@@ -101,7 +101,15 @@ public class DeltaSpikeExceptionHandler extends ExceptionHandlerWrapper
implemen
 
         super.handle();
     }
-    
+
+    private void lazyInit()
+    {
+        if (this.initialized == null)
+        {
+            init();
+        }
+    }
+
     private synchronized void init()
     {
         if (this.initialized == null)


Mime
View raw message