MayHoldCloseableResource vs AutoCloseable
Brian Goetz
brian.goetz at oracle.com
Mon Jul 8 08:32:31 PDT 2013
> Thanks Brian. So I go back to my question. Why not just use the
> annotation and dump the interface? If any AutoCloseable sub-interface is
> annotated with @MayHoldResource, resource leak warnings and catching can
> be disabled. The current sub-interface, imo, does not achieve anything.
Perhaps a better question is: why *would* we use annotations here? Why
do you think this is somehow "better" (especially given the obvious and
numerous challenges of annotations)?
More information about the lambda-dev
mailing list