myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r642958 - /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
Date Mon, 31 Mar 2008 10:38:59 GMT
Author: imario
Date: Mon Mar 31 03:38:44 2008
New Revision: 642958

URL: http://svn.apache.org/viewvc?rev=642958&view=rev
Log:
workaround initialization NPE with MyFaces 1.2 implementation of UIViewRoot

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java?rev=642958&r1=642957&r2=642958&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
Mon Mar 31 03:38:44 2008
@@ -324,6 +324,15 @@
 
     public void setRendererType(String rendererType)
     {
+        if (delegateViewRoot == null)
+        {
+            // the MyFaces 1.2 implmemenation of UIViewRoot calls setRendererType(null) from
within the
+            // constructor. This breaks the decorator pattern as delegateViewRoot has not
been called yet.
+            // Since every instance of UIViewRoot will issue this call it doesn't matter
if we just
+            // discard this request.
+            return;
+        }
+
         delegateViewRoot.setRendererType(rendererType);
     }
 



Mime
View raw message