Hi, thanks for a great language and discussion group !

I got an error calling a static method on a java class using the new
calling form. I am using the december release of Clojure from the
download page (on windows XP, java 6)

Is this a bug, or is it a difference between (.method Class) and (.
Class (method)) that tricks me here?

I am calling newInstance() on javax.xml.transform.TransformerFactory,
and in the first case it fails and in the second it works as I would
expect:

user=> (def tf (.newInstance javax.xml.transform.TransformerFactory))

java.lang.IllegalAccessException: Class clojure.lang.Reflector can not
access a member of class javax.xml.transform.TransformerFactory with
modifiers "protected" (NO_SOURCE_FILE:26)

user=> (def tf (. javax.xml.transform.TransformerFactory
(newInstance)))

#'user/tf

user=> tf

#<TransformerFactoryImpl
com.sun.org.apache.xalan.internal.xsltc.trax.transformerfactoryi...@1d8c528>

user=>



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