You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sg...@apache.org on 2005/08/15 22:49:20 UTC

svn commit: r232872 - in /portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout: ColumnLayout.java FragmentNotInLayoutException.java

Author: sgala
Date: Mon Aug 15 13:49:13 2005
New Revision: 232872

URL: http://svn.apache.org/viewcvs?rev=232872&view=rev
Log:
Unusual situation: if a fragment is null, it can try to raise a FragmentNotInLayoutException, but this will in turn raise an ExceptionInInitializerError, which is not caught, spoiling the whole rendering process. It happened here.

Modified:
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/FragmentNotInLayoutException.java

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java?rev=232872&r1=232871&r2=232872&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java (original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java Mon Aug 15 13:49:13 2005
@@ -596,7 +596,7 @@
         }
         else
         {
-            throw new FragmentNotInLayoutException(fragment);
+            throw new FragmentNotInLayoutException((fragment == null)? "null fragment": fragment.getId());
         }
     }
 

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/FragmentNotInLayoutException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/FragmentNotInLayoutException.java?rev=232872&r1=232871&r2=232872&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/FragmentNotInLayoutException.java (original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/FragmentNotInLayoutException.java Mon Aug 15 13:49:13 2005
@@ -15,7 +15,6 @@
  */
 package org.apache.jetspeed.portlets.layout;
 
-import org.apache.jetspeed.om.page.Fragment;
 
 /**
  * This exception indicates that an attmept was made get the coordinates
@@ -26,9 +25,9 @@
  */
 public class FragmentNotInLayoutException extends LayoutException
 {
-    public FragmentNotInLayoutException(Fragment fragment)
+    public FragmentNotInLayoutException(String fragmentId)
     {
-        super("The fragment "+fragment.getId()+" could not be located in this layout.");
+        super("The fragment "+fragmentId+" could not be located in this layout.");
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org