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

Don't print to error stream about failure to load JDK 7 types #1628

Closed
Villane opened this issue May 18, 2017 · 4 comments
Closed

Don't print to error stream about failure to load JDK 7 types #1628

Villane opened this issue May 18, 2017 · 4 comments

Comments

@Villane
Copy link

Villane commented May 18, 2017

In version 2.7.x, it is supposedly usable on Java 6, since Java 7 types are loaded dynamically. However, what is the reasoning for printing to error stream "WARNING: Could not load ..." when running on Java 6? If Jackson 2.7 in general still works with Java 6, I don't want my application error stream to be polluted just for fun - my tests may actually be expecting a clean error stream!

@cowtowncoder
Copy link
Member

@Villane Did you even try to figure out what was going on? It's not printed directly to error stream, nor for fun. It is logging a warning using java.util.logging.

@Villane
Copy link
Author

Villane commented May 19, 2017

I beg to differ, please check the 2.7 branch, as I'm talking about 2.7.x. It clearly has System.err.println usages:

https://github.com/FasterXML/jackson-databind/blob/2.7/src/main/java/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory.java

@Villane Villane changed the title Don't print to error stream just for fun! Don't print to error stream in 2.7 May 19, 2017
@cowtowncoder
Copy link
Member

@Villane Ok. Then this is incorrect. I thought it was using java.util.Logger. Thank you for reporting this.

@cowtowncoder
Copy link
Member

Ah ok. So, Jackson 2.7 did indeed only use System.err. 2.8 change to use java.util.logging for Java 7 classes. But there was one other place (for DOM Node and Document types) where System.err was used, will fix that.

Will also backport in 2.7, although it is not certain if new versions from that branch will be released.

@cowtowncoder cowtowncoder changed the title Don't print to error stream in 2.7 Don't print to error stream about failure to load JDK 7 types Jun 3, 2017
@cowtowncoder cowtowncoder added this to the 2.7.10 milestone Jun 3, 2017
@cowtowncoder cowtowncoder removed the 2.8 label Jun 3, 2017
cowtowncoder added a commit that referenced this issue Jun 3, 2017
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