taylor      2004/04/10 21:07:43

  Modified:    portal/src/java/org/apache/jetspeed/engine/servlet
                        ServletRequestImpl.java
  Log:
  Patch from Ate Douma for issue JS2-10 - Class Cast Exceptoin 

  

  PR:

  Obtained from:

  Submitted by: 

  Reviewed by:  

  CVS: ----------------------------------------------------------------------

  CVS: PR:

  CVS:   If this change addresses a PR in the problem report tracking

  CVS:   database, then enter the PR number(s) here.

  CVS: Obtained from:

  CVS:   If this change has been taken from another system, such as NCSA,

  CVS:   then name the system in this line, otherwise delete it.

  CVS: Submitted by:

  CVS:   If this code has been contributed to Apache by someone else; i.e.,

  CVS:   they sent us a patch or a new module, then include their name/email

  CVS:   address here. If this is your work then delete this line.

  CVS: Reviewed by:

  CVS:   If we are doing pre-commit code reviews and someone else has

  CVS:   reviewed your changes, include their name(s) here.

  CVS:   If you have not had it reviewed then delete this line.

  
  Revision  Changes    Path
  1.11      +19 -4     
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
  
  Index: ServletRequestImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ServletRequestImpl.java   8 Apr 2004 15:52:30 -0000       1.10
  +++ ServletRequestImpl.java   11 Apr 2004 04:07:42 -0000      1.11
  @@ -56,9 +56,24 @@
       //  ServletRequestWrapper overlay
   
       public String getParameter(String name)
  -    {
  -        return (String) this.getParameterMap().get(name);
  -
  +    {       
  +        Object value = this.getParameterMap().get(name);
  +        if (value == null)
  +        {
  +            return (null);
  +        }
  +        else if (value instanceof String[])
  +        {
  +            return (((String[]) value)[0]);
  +        }
  +        else if (value instanceof String)
  +        {
  +            return ((String) value);
  +        }
  +        else
  +        {
  +            return (value.toString());
  +        }
       }
   
       public Map getParameterMap() 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to