[gatein-commits] gatein SVN: r4696 - components/wsrp/trunk/common/src/main/java/org/gatein/wsrp.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Oct 15 19:35:34 EDT 2010
Author: chris.laprun at jboss.com
Date: 2010-10-15 19:35:34 -0400 (Fri, 15 Oct 2010)
New Revision: 4696
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java
Log:
- GTNWSRP-103: if we don't have a resource id and wsrp-requiresRewrite has not been specified, set it to false for better compatibility. Should be harmless to do so without a need for a compatibility mode.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java 2010-10-15 23:20:43 UTC (rev 4695)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPResourceURL.java 2010-10-15 23:35:34 UTC (rev 4696)
@@ -146,8 +146,14 @@
resourceId = resourceIDParam;
}
+ // GTNWSRP-103: if we don't have a resource id and wsrp-requiresRewrite has not been specified, set it to false for better compatibility
+ if (resourceIDParam == null && requireRewrite == null)
+ {
+ requiresRewrite = false;
+ }
+
// we either need a resource Id or (requiredRewrite and url)
- if (resourceIDParam == null && (requireRewrite == null || url == null))
+ if (resourceIDParam == null && url == null)
{
throw new IllegalArgumentException("The parsed parameters are not valid for a resource url. A resource URL must contain either a "
+ WSRP2RewritingConstants.RESOURCE_ID + " or " + WSRPRewritingConstants.RESOURCE_URL + " and " + WSRPRewritingConstants.RESOURCE_REQUIRES_REWRITE + " parameter in " + originalURL);
More information about the gatein-commits
mailing list