Ahh, I understand now ... issues fixed in http://jira.codehaus.org/browse/JBEHAVE-1019.

On 19/05/2014 16:28, Frank Pedroza wrote:
Greek how? I wrote the sample code to better understand the BooleanConverter and I'm quite confused by the results. Is the code not obvious and the results different than people would expect?



On Sat, May 17, 2014 at 8:29 AM, Mauro Talevi <mauro.tal...@aquilonia.org <mailto:mauro.tal...@aquilonia.org>> wrote:

    This is Greek to me :-)

    See previous email ...

    > On 16 May 2014, at 22:55, Frank Pedroza <fpedr...@part.net
    <mailto:fpedr...@part.net>> wrote:
    >
    > public static void main(String[] args) {
    >     System.out.println("accepts :" + new
    ParameterConverters.BooleanConverter().accept(Boolean.TYPE));
    >     System.out.println("true==true :" + ((Boolean)new
    ParameterConverters.BooleanConverter().convertValue("true",
    Boolean.TYPE) == true));
    >     System.out.println("false==false : " + ((Boolean)new
    ParameterConverters.BooleanConverter().convertValue("false",
    Boolean.TYPE) == false));
    >     System.out.println("unknown==null : " + new
    ParameterConverters.BooleanConverter().convertValue("unknown",
    Boolean.TYPE) == null);
    >   }
    >
    > produces:
    >
    > accepts :false
    > true==true :true
    > false==false : true
    > Exception in thread "main" java.lang.IllegalArgumentException:
    The String did not match either specified value
    >     at
    org.apache.commons.lang.BooleanUtils.toBoolean(BooleanUtils.java:763)
    >     at
    
org.jbehave.core.steps.ParameterConverters$BooleanConverter.convertValue(ParameterConverters.java:498)
    >     at
    
com.partnet.emall.automation.ConfigurationProducer.main(ConfigurationProducer.java:86)
    >
    > WTF?

    ---------------------------------------------------------------------
    To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
--------------------------------------------
Frank M. Pedroza  -  Software Engineer
Partnet  -  Development
801.708.5050

-----------------------------------------------------------------
The nice part about being a pessimist is that you are constantly being either proven right or pleasantly surprised.
-- George F. Will

Reply via email to