@SafeVarargs on final classes
cowwoc
cowwoc at bbs.darktech.org
Thu Oct 10 07:27:59 UTC 2013
On 10/10/2013 3:22 AM, cowwoc wrote:
> Hi,
>
> JDK7 triggers a compiler error on non-final methods annotated with
> @SafeVarargs even if the class itself is final. I couldn't find any
> literature indicating whether this is intentional (the Javadoc states
> that the method must be final but says nothing about final classes).
> Can we change the behavior so final classes no longer trigger a
> compiler error?
>
> Gili
A follow-up question is why the "Possible heap pollution" warning
shows for interface methods since @SafeVarargs cannot be used to
suppress it (an interface method cannot be final).
Gili
More information about the core-libs-dev
mailing list