Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove call to deprecated method & add type hint to parameter to avoid reflection #72

Closed
laczoka opened this issue Dec 17, 2014 · 1 comment

Comments

@laczoka
Copy link
Contributor

laczoka commented Dec 17, 2014

Symptom:

Reflection warning, cheshire/core.clj:63:3 - call to method createJsonGenerator on com.fasterxml.jackson.core.JsonFactory can't be resolved (argument types: unknown).

Check:
https://github.com/FasterXML/jackson-core/blob/master/src/main/java/com/fasterxml/jackson/core/JsonFactory.java#L1132
and #L1145

createJsonGenerator method is deprecated since jackson 2.2, should use createGenerator

to avoid reflection add a type hint

(defn create-generator [writer]
"Returns JsonGenerator for given writer."
(.createGenerator
^JsonFactory (or factory/json-factory
factory/json-factory) ^java.io.Writer writer))

@dakrone
Copy link
Owner

dakrone commented Dec 19, 2014

Fixed, thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants