portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r393932 - /portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java
Date Thu, 13 Apr 2006 20:54:36 GMT
Author: ate
Date: Thu Apr 13 13:54:34 2006
New Revision: 393932

URL: http://svn.apache.org/viewcvs?rev=393932&view=rev
Log:
Correcting fix for JS2-315 which always leads to an IllegalArgumentException when a PortletDefinition
isn't found.
As result of this fix, PersistenceBrokerPortletEntityAccess.generateEntityFromFragment() might
be called multiple times
when no PortletDefinition exists for a fragment.
As result, PersistenceBrokerPortletEntityAccess wants to store the same error message as "overrideRenderedContent"
also multiple times for the same fragment.
The ContentFragment.overrideRenderContent(String) method will now check for this and ignore
subsequent calls with the same error message.
See: http://issues.us.apache.org/jira/browse/JS2-315

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/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/om/page/ContentFragmentImpl.java?rev=393932&r1=393931&r2=393932&view=diff
==============================================================================
--- 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
Thu Apr 13 13:54:34 2006
@@ -105,11 +105,18 @@
      */
     public void overrideRenderedContent(String contnent)
     {
-        if(overridenContent == null)
+        if ( contnent != null )
         {
-            overridenContent = new StringBuffer();
+            if(overridenContent == null)
+            {
+                overridenContent = new StringBuffer();
+            }
+            // prevent repeated storing of the same error message
+            else if (!contnent.equals(overridenContent.toString()))
+            {
+                overridenContent.append(contnent);
+            }
         }
-        overridenContent.append(contnent);
         
     }
 



---------------------------------------------------------------------
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