json_simple uses deprecated-for-removal primitive constructors
OpenJDK documentation. Eventually these constructors will be removed/made private and client code using that version of the JDK will fail to compile.
There appears to only be two affected classes. I’ve linked to the first instance in each one (but there’re more than just one).
This doesn’t appear to be fixed upstream yet. So perhaps treat this as a tracking bug to merge fixes when they become available (unless you maintain local patches).
Comments (6)
-
reporter -
repo owner - changed status to open
-
repo owner Thanks for raising this Mitch, I was blissfully unaware. (I do now see
JSONParser.java uses or overrides a deprecated API that is marked for removal.
etc output from the build).For better or worse, no relation with the original json-simple code has been maintained. So these changes should probably just be made here in this project. As I understand it, those changes amount to using
valueOf(...)
rather than the constructors?
-
reporter Yeah (sorry for not sending a pull request, until this morning I didn’t have a Bitbucket account).
- JSONParser:
new Integer(...) -> Integer.valueOf(...)
- Yylex:
new Character(yycharat(0)) -> yycharat(0)
(although before and after, this leaks one character of potentially sensitive JSON in an exception message)
- JSONParser:
-
No need to apologize. I should probably apologize for not having moved away from Bitbucket :/ Anyway, I’ll make those changes. Thanks again for raising this.
-
repo owner - changed status to resolved
discontinue use wrapper class constructors that are deprecated for removal (to fix Issue
#219)→ <<cset a3a21a6c3169>>
- Log in to comment
There seems to be an old pull request that handles most of it though