Skip to content
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

"Covariant return type change detected" on discarded return value #61

Closed
lukehutch opened this issue Dec 2, 2018 · 1 comment
Closed

Comments

@lukehutch
Copy link

Given the code:

ByteBuffer byteBuf = getByteBuf();
byteBuf.position(offset);

Animal Sniffer reports:

Covariant return type change detected: java.nio.Buffer java.nio.ByteBuffer.position(int) has been changed to java.nio.ByteBuffer java.nio.ByteBuffer.position(int)

This is not a helpful warning, especially as the return value is discarded :-)

@lukehutch
Copy link
Author

Actually, I take that back, it's a helpful warning. This causes breakage if you compile if JDK<9 compatibility mode using JDK9+: plasma-umass/doppio#497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant