ok - use Eclipse quick-fix to insert the proper suppreswarnings
/max
Dmitry Geraskov wrote:
I want to remove some raw class warnings. For example such code
List list =
doc.getRootElement().element("session-factory").elements("mapping");
//$NON-NLS-1$ //$NON-NLS-2$
Iterator iterator = list.iterator();
while ( iterator.hasNext() ) {
Node element = (Node) iterator.next();
element.getParent().remove(element);
}
will be changed to
List<Node> list =
doc.getRootElement().element("session-factory").elements("mapping");
//$NON-NLS-1$ //$NON-NLS-2$
for (Node element : list) {
element.getParent().remove(element);
}
But in second variant I get type safety warning as *elements* method
returns not parametrized generic type.
I want to remove such types warnings(not for all project, but for some
places).
Max Rydahl Andersen пишет:
> Second hit in google
>
(
http://www.google.com/search?hl=da&client=opera&rls=en&hs=drk...)
>
>
>
http://www.breakitdownblog.com/supported-values-for-suppresswarnings/
> dicsuss this and points to
>
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jdt.doc.isv/g...
>
>
> But what warnings are you trying to remove ? SuppresWarnings is to be
> avoided unless really called for ;)
>
> /max
>
> Dmitry Geraskov wrote:
>> Hi, folks,
>>
>> anybody know how to explore warning name in eclipse which can be
>> used @SuppressWarnings annotation?
>>
>> Thanks