Can someone please commit this diff to CVS? It's a trivial addition to 
ParameterParser to allow byte retrieval following the same pattern
as int, double, etc. Thanks.

-- 
Christopher Elkins

--
Index: ParameterParser.java
===================================================================
RCS file: 
/products/cvs/turbine/turbine/src/java/org/apache/turbine/util/ParameterParser.java,v
retrieving revision 1.9
diff -r1.9 ParameterParser.java
268a269,304
>         Return a byte for the given name. If the name does not 
>         exist, return 0.
>     */
>     public byte getByte(String name)
>     {
>         byte value = 0;
>         try
>         {
>             Object object = this.get(convert(name));
>             if (object != null)
>                 value = Byte.valueOf(((String[])object)[0]).byteValue();
>         }
>         catch (NumberFormatException exception)
>         {
>         }
>         return value;
>     }
>     /**
>         Return a byte for the given name. If the name does not 
>         exist, return defaultValue.
>     */
>     public byte getByte(String name, byte defaultValue )
>     {
>         byte value = defaultValue;
>         try
>         {
>             Object object = this.get(convert(name));
>             if (object != null)
>                 value = Byte.valueOf(((String[])object)[0]).byteValue();
>         }
>         catch (NumberFormatException exception)
>         {
>         }
>         return value;
>     }
>     /**
478c514
< }
\ No newline at end of file
---
> }


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to