jackjlli commented on pull request #5343: URL: https://github.com/apache/incubator-pinot/pull/5343#issuecomment-625417622
Here are some plans for this PR. To solve casting issue: 1) Use a util function to avoid showing casting everywhere like ``` ByteBufferUtils.position(byteBuffer, byteBuffer.position() + size); ``` While this approach couldn't stop people from calling the native methods in ByteBuffer. 2) Use a class wrapper to hide the methods ``` CompatibleByteBuffer.position(byteBuffer.position() + size) ``` While ByteBuffer is an abstract class. If a new wrapper is needed, the subclasses also need to inherit the new wrapper as well, which seems unrealistic. To compile with the same jdk version: I have a local branch to compile with jdk8 whenever jdk9+ is used, and that works perfectly. But this doesn't seem like the right approach to build on higher jdk and runs on lower. lmk what are your thoughts? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
