portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r452732 - /portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
Date Wed, 04 Oct 2006 05:07:44 GMT
Author: taylor
Date: Tue Oct  3 22:07:43 2006
New Revision: 452732

URL: http://svn.apache.org/viewvc?view=rev&rev=452732
Log:
need to unravel the wrappering of the real fragment objects, otherwise we get a class cast
exception


Modified:
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java?view=diff&rev=452732&r1=452731&r2=452732
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
Tue Oct  3 22:07:43 2006
@@ -578,7 +578,8 @@
          */
         public void add(int index, Object element)
         {
-            
+            if (element instanceof ContentFragmentImpl)
+                element = ((ContentFragmentImpl)element).fragment;
             baseList.add(index, element);
         }
 
@@ -587,7 +588,8 @@
          */
         public boolean add(Object o)
         {
-            
+            if (o instanceof ContentFragmentImpl)
+                o = ((ContentFragmentImpl)o).fragment;            
             return baseList.add(o);
         }
 



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


Mime
View raw message