scgilardi / slingshot

Enhanced try and throw for Clojure leveraging Clojure's capabilities
654 stars 28 forks source link

Eliminate Reflection Warnings #18

Closed ath closed 12 years ago

ath commented 12 years ago

In my project.clj file I typically set the option :warn-on-reflection true, and this way I noticed the following warnings in Slingshot 0.9.0:

Reflection warning, slingshot/support.clj:14 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, slingshot/support.clj:44 - reference to field getContext can't be resolved.
Reflection warning, slingshot/support.clj:45 - reference to field getCause can't be resolved.
Reflection warning, slingshot/support.clj:55 - reference to field getMessage can't be resolved.
Reflection warning, slingshot/support.clj:56 - reference to field getCause can't be resolved.
Reflection warning, slingshot/support.clj:57 - reference to field getStackTrace can't be resolved.
Reflection warning, slingshot/slingshot.clj:105 - reference to field getContext can't be resolved.

Would be nice if you could remove them, and also include that option in the project.clj file.

scgilardi commented 12 years ago

Thanks! Those reflection warnings were fixed in 0.10.0. I appreciate the tip about :warn-on-reflection true. I've included that change in project.clj, fixed reflection warnings in tests, and released version 0.10.1 which includes these fixes.

ath commented 12 years ago

Exellent! I just tested it and confirm that the warnings are now gone.