The first method of the String class does not take varargs:
user=> (.isVarArgs (first (.getMethods String)))
false

The above is the Right Kind of False, as shown here:
user=> (if (.isVarArgs (first (.getMethods String))) :true :false)
:false

However 'bean' returns the Wrong Kind of False:
user=> (if (:varArgs (bean (first (.getMethods String)))) :true :false)
:true


For those unfamiliar with this lovely feature of Java, it has to do
with ignoring the documented recommendation to use Boolean/valueOf and
instead using the constructor:

user=> (if (Boolean/valueOf "false") :true :false) ; correct
:false

user=> (Boolean. "false") ; don't do this, even though it looks ok
false

user=> (if (Boolean. "false") :true :false) ; see I told you
:true

So the only bug here is that 'bean' is somehow creating the Wrong Kind
of False.

--Chouser

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to