Author: chris.laprun(a)jboss.com
Date: 2010-06-20 15:50:09 -0400 (Sun, 20 Jun 2010)
New Revision: 3396
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ActionHandler.java
Log:
- Properly report an error if both redirect URL and update response are null.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ActionHandler.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ActionHandler.java 2010-06-20
19:48:45 UTC (rev 3395)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ActionHandler.java 2010-06-20
19:50:09 UTC (rev 3396)
@@ -224,9 +224,14 @@
UpdateResponse updateResponse = blockingInteractionResponse.getUpdateResponse();
if (redirectURL != null && updateResponse != null)
{
- return new ErrorResponse(new IllegalArgumentException("Response cannot both
redirect and update state."));
+ return new ErrorResponse(new IllegalArgumentException("Producer error:
response cannot both redirect and update state."));
}
+ if (redirectURL == null && updateResponse == null)
+ {
+ return new ErrorResponse(new IllegalArgumentException("Producer error:
response must redirect or update state."));
+ }
+
if (redirectURL != null)
{
return new HTTPRedirectionResponse(redirectURL); // do we need to process URLs?