Project Coin: Inducing contributory heap pollution
forax at univ-mlv.fr
Thu Jun 10 10:50:50 PDT 2010
Le 10/06/2010 19:06, Neal Gafter a écrit :
> Re: http://blogs.sun.com/darcy/entry/projectcoin_inducing_contributory_pollution
> I thought technical documents for project Coin were supposed to be
> published here?
> A nit: the @Inherited annotation "has no effect if [...] used to
> annotate anything other than a class", and so can't be used for the
> purpose described.
I have never understood why ?
> Inheriting the diagnostic-suppression annotation would be a great way
> to induce contributory heap pollution. All you have to do is extend a
> class with a warning-suppressed varargs method, providing an unsafe
> overriding implementation, and voila! Heap pollution without a
I think that the idea is to say, if an implementation is tagged as safe,
all methods that override this implementation must be safe.
If you guarantee that and if @SuppressWarnings("varargs") is
a runtime annotation (visible or invisible) then you can avoid
to warn at all call sites of the method.
More information about the coin-dev