Author: chris.laprun(a)jboss.com
Date: 2008-06-12 20:13:52 -0400 (Thu, 12 Jun 2008)
New Revision: 11009
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
- Minor.
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java 2008-06-13
00:13:23 UTC (rev 11008)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSRPUtils.java 2008-06-13
00:13:52 UTC (rev 11009)
@@ -299,7 +299,7 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription,
"RegistrationPropertyDescription");
PropertyDescription propDesc =
WSRPTypeFactory.createPropertyDescription(propertyDescription.getName().toString(),
- propertyDescription.getType());
+ propertyDescription.getType());
// todo: deal with languages properly!!
LocalizedString hint = propertyDescription.getHint();
@@ -324,7 +324,7 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription,
"PropertyDescription");
RegistrationPropertyDescription desc = new
RegistrationPropertyDescription(propertyDescription.getName(),
- propertyDescription.getType());
+ propertyDescription.getType());
desc.setLabel(getLocalizedStringOrNull(propertyDescription.getLabel()));
desc.setHint(getLocalizedStringOrNull(propertyDescription.getHint()));
@@ -376,7 +376,7 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(regLocalizedString,
"LocalizedString");
return
WSRPTypeFactory.createLocalizedString(toString(regLocalizedString.getLocale()),
- regLocalizedString.getResourceName(), regLocalizedString.getValue());
+ regLocalizedString.getResourceName(), regLocalizedString.getValue());
}
/**
@@ -423,9 +423,7 @@
catch (ConversionException e)
{
// Previous behavior on using ConversionException was like that
- IllegalArgumentException iae = new IllegalArgumentException();
- iae.initCause(e);
- throw iae;
+ throw new IllegalArgumentException(e);
}
}
@@ -438,9 +436,7 @@
catch (ConversionException e)
{
// Previous behavior on using ConversionException was like that
- IllegalArgumentException iae = new IllegalArgumentException();
- iae.initCause(e);
- throw iae;
+ throw new IllegalArgumentException(e);
}
}
@@ -461,7 +457,7 @@
sb.append("(secure)");
}
sb.append("[M=").append(params.getMode()).append("][WS=").append(params.getWindowState()).append("]")
-
.append("[NS=").append(params.getNavigationalState()).append("]");
+
.append("[NS=").append(params.getNavigationalState()).append("]");
return sb.toString();
}
return null;
@@ -480,7 +476,7 @@
{
StringBuffer sb = new StringBuffer("InteractionParams");
sb.append("[IS=").append(interactionParams.getInteractionState()).append("]")
-
.append("[StateChange=").append(interactionParams.getPortletStateChange().getValue()).append("]");
+
.append("[StateChange=").append(interactionParams.getPortletStateChange().getValue()).append("]");
NamedString[] formParams = interactionParams.getFormParameters();
if (formParams != null)
{
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java 2008-06-13
00:13:23 UTC (rev 11008)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPActionContext.java 2008-06-13
00:13:52 UTC (rev 11009)
@@ -69,7 +69,7 @@
Mode mode, WindowState windowState, StateString
interactionState, String characterEncoding)
{
super(navigationalState, securityContext, markupInfo, portalContext, userContext,
instanceContext,
- windowContext, mode, windowState);
+ windowContext, mode, windowState);
this.interactionState = interactionState;
this.characterEncoding = characterEncoding;
}
@@ -113,7 +113,7 @@
String characterEncoding, String contentType,
NamedString[] formParams)
{
super(navigationalState, securityContext, markupInfo, portalContext,
userContext, instanceContext,
- windowContext, mode, windowState, interactionState, characterEncoding);
+ windowContext, mode, windowState, interactionState, characterEncoding);
this.contentType = contentType;
if (formParams != null && formParams.length > 0)
@@ -175,7 +175,7 @@
NamedString[] formParams, UploadContext[]
uploadContexts) throws IOException, MessagingException
{
super(navigationalState, securityContext, markupInfo, portalContext,
userContext, instanceContext,
- windowContext, mode, windowState, interactionState, characterEncoding);
+ windowContext, mode, windowState, interactionState, characterEncoding);
MimeMultipart parts = new MimeMultipart();
if (uploadContexts != null && uploadContexts.length > 0)
@@ -369,25 +369,23 @@
try
{
return new WSRPMultiActionContext(navigationalState, securityContext,
markupInfo,
- portalContext, userContext, instanceContext, windowContext,
- WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()),
-
WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()),
interactionState,
- markupRequest.getCharacterSet(), formParams, uploadContexts);
+ portalContext, userContext, instanceContext, windowContext,
+ WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()),
+
WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()),
interactionState,
+ markupRequest.getCharacterSet(), formParams, uploadContexts);
}
catch (Exception e)
{
- IllegalArgumentException illegalArgumentException = new
IllegalArgumentException("Invalid upload context");
- illegalArgumentException.initCause(e); // init cause for JDK 1.4
- throw illegalArgumentException;
+ throw new IllegalArgumentException("Invalid upload context", e);
}
}
else
{
return new WSRPSimpleActionContext(navigationalState, securityContext,
markupInfo,
- portalContext, userContext, instanceContext, windowContext,
- WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()),
- WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()),
interactionState,
- markupRequest.getCharacterSet(), markupRequest.getMimeType(), formParams);
+ portalContext, userContext, instanceContext, windowContext,
+ WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()),
+
WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()),
interactionState,
+ markupRequest.getCharacterSet(), markupRequest.getMimeType(),
formParams);
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2008-06-13
00:13:23 UTC (rev 11008)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2008-06-13
00:13:52 UTC (rev 11009)
@@ -277,15 +277,11 @@
}
catch (ClassNotFoundException e)
{
- IllegalArgumentException iae = new
IllegalArgumentException("Couldn't find policy class " + policyClassName +
".");
- iae.initCause(e);
- throw iae;
+ throw new IllegalArgumentException("Couldn't find policy class
" + policyClassName + ".", e);
}
catch (Exception e)
{
- IllegalArgumentException iae = new
IllegalArgumentException("Couldn't instantiate policy class.");
- iae.initCause(e);
- throw iae;
+ throw new IllegalArgumentException("Couldn't instantiate policy
class.", e);
}
}
else
@@ -308,15 +304,11 @@
}
catch (ClassNotFoundException e)
{
- IllegalArgumentException iae = new
IllegalArgumentException("Couldn't find validator class " +
validatorClassName + ".");
- iae.initCause(e);
- throw iae;
+ throw new IllegalArgumentException("Couldn't find validator class
" + validatorClassName + ".", e);
}
catch (Exception e)
{
- IllegalArgumentException iae = new
IllegalArgumentException("Couldn't instantiate validator class.");
- iae.initCause(e);
- throw iae;
+ throw new IllegalArgumentException("Couldn't instantiate
validator class.", e);
}
}
else
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2008-06-13
00:13:23 UTC (rev 11008)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2008-06-13
00:13:52 UTC (rev 11009)
@@ -77,7 +77,7 @@
if (wsdlDefinitionURL == null || wsdlDefinitionURL.length() == 0)
{
throw new IllegalArgumentException("Require a non-empty, non-null URL
specifying where to find the WSRP " +
- "services definition");
+ "services definition");
}
this.wsdlDefinitionURL = wsdlDefinitionURL;
try
@@ -88,12 +88,9 @@
}
catch (MalformedURLException e)
{
- IllegalArgumentException iae = new IllegalArgumentException("Require a
well-formed URL specifying where to " +
- "find the WSRP services definition");
- iae.initCause(e);
available = false;
failed = true;
- throw iae;
+ throw new IllegalArgumentException("Require a well-formed URL specifying
where to find the WSRP services definition", e);
}
catch (Exception e)
{