Replies: 1 comment 5 replies
-
Regarding the buffer example, I imagine the reason it is ok to ignore is because the closeable is already handled in some outer scope? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Gene and I discussed having a compiler warning for methods returning a
Closeable
value that is ignored by the caller. This seemed reasonable at first, but having implemented it, it turns out that we have many, many places that naturally return aCloseable
value that is ignored. For example, various buffers (supporting a fluent style interface) are bothCloseable
and typicallyreturn this
. Sobuf.add(val);
would generate this warning, and we have that in thousands of places.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions