-
Notifications
You must be signed in to change notification settings - Fork 981
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
License violation in JsonUtils
#2762
Comments
The code for the prettyPrint method comes from Stackoverflow, which has a license incompatible with our Apache licensed code. The Stackoverflow code has been removed and the method/class deprecated for removal. On the off chance this API is used, I did not delete the whole class in a patch release. Though it was always intended to be an internal class, it was not clearly marked as such. The effect of this is that the `HttpSender.Request` class' `toString` will no longer be pretty-printed for JSON requests. This is an acceptable compromise for now rather than coming up with an original implementation for non-critical functionality. See gh-2762
JsonUtils
I've renamed the issue to focus it on the code in JsonUtils. We can look at tackling other Stackoverflow code in a separate issue since the solution here is wholly removing the code, whereas other places it is more likely we will need an alternate Apache-friendly implementation. |
This was an internal class that had problematically licensed code included. That code has been removed and so this class has been deleted going forward. See gh-2762
With 19e6bc6 I've removed the code for upcoming patch releases, leaving the |
I created #2833 to try to resolve the |
Describe the bug
The file file micrometer-core/src/main/java/io/micrometer/core/instrument/util/JsonUtils.java contains a method named prettyPrint which is (as stated by the author of the class himself) directly taken over from stackoverflow.com. There's a similar (though not that grave, as it is just a one-liner) issue in the file micrometer-core/src/main/java/io/micrometer/core/instrument/util/TimeUtils.java, method format. The issue is that micrometer is licensed under Apache 2.0 and copying code snippets from stackoverflow into own code creates derivative work under the CC BY-SA 4.0 license (under which all stackoverflow.com content is licensed) which is incompatible with Apache 2.0 for various reasons (copyleft, patent rights etc.).
Environment
All environments
To Reproduce
Check the source code and compare with stackoverflow
Expected behavior
No stackoverflow code snippets are used
Additional context
The text was updated successfully, but these errors were encountered: