commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@scalaris.com>
Subject Re: [discuss][Digester] The future of Digester an the Digester3 in sandbox
Date Tue, 01 Mar 2011 08:00:02 GMT
Hi Simone,

Simone Tripodi wrote:

[snip]


> @SuppressWarnings("unchecked")
> public <T> T parse(InputSource input, Class<T> returnedType) throws
> IOException, SAXException {
>  .
>  .
>  .
>  return returnedType.cast(this.root);
> }

It would be nice, if we can start to avoid such method global suppressions, 
because it hides possibly unwanted stuff. You can always assign the 
annotation directly to a variable instead:

@SuppressWarnings("unchecked")
T t = returnedType.cast(this.root);
return t;

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message