tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Re: svn commit: r1508171 - /tomcat/trunk/java/org/apache/catalina/startup/WebappServiceLoader.java
Date Mon, 29 Jul 2013 21:32:23 GMT
On Mon, Jul 29, 2013 at 2:08 PM, Mark Thomas <markt@apache.org> wrote:

> On 29/07/2013 22:56, Nick Williams wrote:
> >
> > On Jul 29, 2013, at 3:53 PM, Jeremy Boynes wrote:
> >
> >> This is what lies under the syntactic sugar, and causes no warnings in
> >> javac or IDEA (and I presume Eclipse). Should we stick to it?
> >
> > I would say no. This is why generics exist, so that you don't have to
> write code like that.
>
> +1.
>
> It occurs to me that this might have been better as an explicit method
> on the ServletContext rather than as a special attribute. Given the J2EE
> view on backwards compatibility, this isn't to change but it is
> something to keep an eye out for in future specs.
>

Much better as a explicit method but there we go ...

I'm wary of IDE-specific suppressions as well. There is a legitimate reason
for this warning (the risk of CCE when the List is accessed) and the
annotation indicates that we are acknowledging that and deliberately
suppressing it, with the benefit that that decision is documented in the
code rather than externally in IDE settings.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message