Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (#2328)
Fixes #2326 An explicit cast is needed here due to an API change in Java 9, see #2218. In Java 8 and earlier, the `position(I)` method was final in `Buffer`, and returned a `Buffer`. In Java 9 and later, the method was opened, and `ByteBuffer` overrides it, returning a `ByteBuffer`. This causes a `NoSuchMethodError` when running a class, compiled with a newer Java version, on Java 8.
- Loading branch information