You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by cz...@apache.org on 2005/08/11 14:18:31 UTC

cvs commit: ws-wsrp4j/src/org/apache/wsrp4j/util ParameterChecker.java

cziegeler    2005/08/11 05:18:31

  Modified:    src/org/apache/wsrp4j/util ParameterChecker.java
  Log:
  Code cleanup
  
  Revision  Changes    Path
  1.10      +11 -27    ws-wsrp4j/src/org/apache/wsrp4j/util/ParameterChecker.java
  
  Index: ParameterChecker.java
  ===================================================================
  RCS file: /home/cvs/ws-wsrp4j/src/org/apache/wsrp4j/util/ParameterChecker.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ParameterChecker.java	11 Aug 2005 12:17:14 -0000	1.9
  +++ ParameterChecker.java	11 Aug 2005 12:18:31 -0000	1.10
  @@ -135,18 +135,10 @@
       {
   		if (isCheckEnabled())
   		{
  -			// check ClonePortlet request object pointer
  -			if (request instanceof ModifyRegistration)
  -			{
  -
  -				// check for registration context
  -				check(request.getRegistrationContext(), Constants.NILLABLE_TRUE);
  -				check(request.getRegistrationData(), Constants.NILLABLE_FALSE);
  -
  -			} else
  -			{
  -				throwMissingParametersFault("Input object is not from type ModifyRegistration or is null");
  -			}
  +            // check ClonePortlet request object pointer
  +			// check for registration context
  +			check(request.getRegistrationContext(), Constants.NILLABLE_TRUE);
  +			check(request.getRegistrationData(), Constants.NILLABLE_FALSE);
   		}
       }
   
  @@ -170,20 +162,12 @@
   		if (isCheckEnabled())
   		{
   			// check ClonePortlet request object pointer
  -			if (request instanceof GetMarkup)
  -			{
  -
  -				// check for registration context
  -				check(request.getRegistrationContext(), Constants.NILLABLE_TRUE);
  -				check(request.getPortletContext(), Constants.NILLABLE_FALSE);
  -				check(request.getRuntimeContext(), Constants.NILLABLE_FALSE);
  -				check(request.getUserContext(), Constants.NILLABLE_TRUE);
  -				check(request.getMarkupParams(), Constants.NILLABLE_FALSE);
  -
  -			} else
  -			{
  -				throwMissingParametersFault("Input object is not from type GetMarkup or is null");
  -			}
  +			// check for registration context
  +			check(request.getRegistrationContext(), Constants.NILLABLE_TRUE);
  +			check(request.getPortletContext(), Constants.NILLABLE_FALSE);
  +			check(request.getRuntimeContext(), Constants.NILLABLE_FALSE);
  +			check(request.getUserContext(), Constants.NILLABLE_TRUE);
  +			check(request.getMarkupParams(), Constants.NILLABLE_FALSE);
   		}
       }