vivekpatani opened a new pull request #760: ZOOKEEPER-3215: Handle Java 9/11 additions of covariant return types … URL: https://github.com/apache/zookeeper/pull/760 …to java.nio.ByteBuffer methods Co-authored-by: Brandon Miles <[email protected]> Java 9 introduces covariant return types which allows one to have different return types if return type in the overridden method is a sub type. Since Java 9, few functions return ByteBuffer, whereas the parent method return Buffer, resulting in causing issues for Java 8 and below since for them the method does not exist. To fix this, we must cast the ByteBuffer instances to Buffer before we call the method. The methods that need this are: - position(int newPosition) - limit(int newLimit) - flip() - clear() - mark() - reset() - rewind() Signed-off-by: Vivek Patani <[email protected]>
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
