我正在开发一些
Java / Clojure互操作性,并发现了以下代码的反射警告:
(defn load-image [resource-name] (javax.imageio.ImageIO/read (.getResource (class javax.imageio.ImageIO) resource-name))) => Reflection warning,clojure/repl.clj:37 - reference to field read can't be resolved.
我很惊讶,因为getResource总是返回一个URL,因此我希望编译器在javax.imageio.ImageIO / read中使用适当的静态方法.
所以两个问题: