cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor PlainBooleanConvertor.java
Date Tue, 02 Dec 2003 16:37:20 GMT
On Tue, 2003-12-02 at 15:49, Vadim Gritsenko wrote:
> vgritsenko@apache.org wrote:
> 
> >   Index: PlainBooleanConvertor.java
> >  ===================================================================
> >  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/PlainBooleanConvertor.java,v
> >  retrieving revision 1.1
> >  retrieving revision 1.2
> >  diff -u -r1.1 -r1.2
> >  --- PlainBooleanConvertor.java	12 Aug 2003 12:54:45 -0000	1.1
> >  +++ PlainBooleanConvertor.java	2 Dec 2003 14:44:56 -0000	1.2
> >  @@ -7,6 +7,9 @@
> >    */
> >   public class PlainBooleanConvertor implements Convertor {
> >       public Object convertFromString(String value, Locale locale, Convertor.FormatCache
formatCache) {
> >  +        if (value == null || value.length() == 0) {
> >  +            return "";
> >  +        }
> >           return Boolean.valueOf(value);
> >       }
> >  
> >
> 
> Can somebody else confirm that this is ok? Works for me...

My intuition tells me that a BooleanConvertor should return a Boolean
object.

What's the purpose of this, IOW what is affected by this?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message