flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Emit @CanIgnoreReturnValue annotations on flatbuffer APIs.

Open kluever opened this issue 3 years ago • 6 comments

kluever avatar Aug 26 '22 17:08 kluever

@paulovap Can you help with the kotlin issue?

dbaileychess avatar Aug 26 '22 21:08 dbaileychess

Hello @kluever, may I ask why is it necessary to add this dependency?

paulovap avatar Aug 31 '22 13:08 paulovap

I think linters complain that some methods have return values that are not used. This annotation marks that those values can be ignored safely, since the method had some other side affect.

dbaileychess avatar Aug 31 '22 15:08 dbaileychess

Indeed. ~all of the Java classes / packages in flatbuffers should really be tagged with @CheckReturnValue as well, so external users of these APIs don't make coding mistakes (if they're using https://github.com/google/error-prone)

kluever avatar Aug 31 '22 15:08 kluever

@kluever can you rebase?

dbaileychess avatar Sep 13 '22 06:09 dbaileychess

@kluever could we move this forward again?

dbaileychess avatar Oct 29 '22 00:10 dbaileychess