On Jan 21, 12:14 am, Chouser <chou...@gmail.com> wrote:
> 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:
>

To clarify, it is Java's own reflection API that is ignoring this.

Worked-around in SVN 1221.

Thanks for the report,

Rich

p.s. for those of you calling Java's reflection API directly (as does
bean), you'll need to canonicalize Booleans, which you can do by
calling clojure.lang.Reflector/prepRet on values returned by
reflection.

--~--~---------~--~----~------------~-------~--~----~
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