RFR: 8017513: Support for closeable streams
Henry Jen
henry.jen at oracle.com
Thu Jul 11 12:37:41 PDT 2013
On 07/10/2013 03:17 PM, Zhong Yu wrote:
> A few things that require clarification:
>
> If we have
>
> interface A extends B, C
> interface B extends MayHoldCloseableResource
> interface C extends AutoCloseable
>
> is A considered definitely holding resource?
Not programatically. A is both, from MHCR perspective, it's not without
the annotation.
>
> If @HoldsResource is applied to a subtype of MayHoldCloseableResource
>
> @HoldsResource
> interface D extends B
>
> What does it mean?
>
I would think that means instances of D holds resource.
> If it mean that D definitely holds resource, is @HoldResource still
> necessary on methods that return D?
Not necessary.
Cheers,
Henry
More information about the lambda-dev
mailing list