cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime JspRuntimeLibrary.java

2000-11-20 Thread larryi

larryi  00/11/20 14:01:47

  Modified:src/share/org/apache/jasper/runtime Tag: tomcat_32
JspRuntimeLibrary.java
  Log:
  Apply Gareth Morgan's patch for value="", but don't allow setProperty with
  param="..." to set the property if parameter is empty.
  
  Modify introspect() to allow introspecthelper() to decide whether to set or
  not set the property since it can tell if the property is an array or not.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.4.2   +4 -7  
jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.4.4.1
  retrieving revision 1.4.4.2
  diff -u -r1.4.4.1 -r1.4.4.2
  --- JspRuntimeLibrary.java2000/11/15 01:51:54 1.4.4.1
  +++ JspRuntimeLibrary.java2000/11/20 22:01:45 1.4.4.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v 
1.4.4.1 2000/11/15 01:51:54 pierred Exp $
  - * $Revision: 1.4.4.1 $
  - * $Date: 2000/11/15 01:51:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v 
1.4.4.2 2000/11/20 22:01:45 larryi Exp $
  + * $Revision: 1.4.4.2 $
  + * $Date: 2000/11/20 22:01:45 $
*
* 
* 
  @@ -149,8 +149,6 @@
while ( e.hasMoreElements() ) {
String name  = (String) e.nextElement();
String value = request.getParameter(name);
  - if (value == null || value.equals(""))
  - continue;
introspecthelper(bean, name, value, request, name, true);
}
   }
  @@ -196,8 +194,7 @@
createTypedArray (bean, method, values, t); 
}
} else {
  - //XXX please check.
  - if(value == null || value.equals("")) return;
  + if(value == null || (param != null  value.equals(""))) return;
Object oval = convert(value, type);
if ( oval != null )
method.invoke(bean, new Object[] { oval });
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime JspRuntimeLibrary.java

2000-11-15 Thread larryi

larryi  00/11/15 06:53:07

  Modified:src/share/org/apache/jasper/runtime JspRuntimeLibrary.java
  Log:
  Port fix for: Conversion of String to boolean was erroneous
  
  Submitted by: Gareth Morgan [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.6   +4 -4  
jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspRuntimeLibrary.java2000/07/25 12:13:53 1.5
  +++ JspRuntimeLibrary.java2000/11/15 14:53:07 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v 
1.5 2000/07/25 12:13:53 glenn Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/07/25 12:13:53 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v 
1.6 2000/11/15 14:53:07 larryi Exp $
  + * $Revision: 1.6 $
  + * $Date: 2000/11/15 14:53:07 $
*
* 
* 
  @@ -322,7 +322,7 @@
} else if (t.equals(boolean.class)) {
boolean[] tmpval = new boolean[values.length];
for (int i = 0 ; i  values.length; i++)
  - tmpval[i] = Boolean.getBoolean (values[i]);
  + tmpval[i] = (Boolean.valueOf(values[i])).booleanValue();
method.invoke (bean, new Object[] {tmpval});
} else if (t.equals(short.class)) {
short[] tmpval = new short[values.length];
  
  
  

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