{"id":840,"date":"2010-12-12T17:52:24","date_gmt":"2010-12-12T15:52:24","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/2010\/12\/eclipse-3-5-zu-eclipse-3-6-suppresswarningsunchecked-und-suppresswarningsrawtypes\/"},"modified":"2010-12-12T17:52:24","modified_gmt":"2010-12-12T15:52:24","slug":"eclipse-3-5-zu-eclipse-3-6-suppresswarningsunchecked-und-suppresswarningsrawtypes","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2010\/12\/eclipse-3-5-zu-eclipse-3-6-suppresswarningsunchecked-und-suppresswarningsrawtypes\/","title":{"rendered":"Eclipse 3.5 zu Eclipse 3.6 &ndash;&gt; @SuppressWarnings(&quot;unchecked&quot;) und @SuppressWarnings(&quot;rawtypes&quot;)"},"content":{"rendered":"<p>Von <a href=\"http:\/\/help.eclipse.org\/helios\/index.jsp?topic=\/org.eclipse.jdt.doc.isv\/porting\/3.6\/incompatibilities.html\">http:\/\/help.eclipse.org\/helios\/index.jsp?topic=\/org.eclipse.jdt.doc.isv\/porting\/3.6\/incompatibilities.html<\/a> Punkt 3:<\/p>\n<h4><a name=\"SuppressWarningRawTypes\"><code>@SuppressWarnings(&quot;unchecked&quot;)<\/code> does not ignore raw types warnings anymore<\/a><\/h4>\n<p><strong>What is affected:<\/strong> Usage of <code>@SuppressWarnings(&quot;unchecked&quot;)<\/code>.<\/p>\n<p><strong>Description:<\/strong> Up to Eclipse 3.5, <code>@SuppressWarnings(&quot;unchecked&quot;)<\/code> was used to suppress the unchecked and raw types warnings. This was not consistent with other compilers (e.g. javac). A new warning token <code>&quot;rawtypes&quot;<\/code> has been added to cover the case of raw type warnings exclusively. So in order to get rid of all warnings, in Eclipse 3.6, it might be required to add <code>&quot;rawtypes&quot;<\/code> in the warning token list.<\/p>\n<p>If it is not possible to update the code, a system property (<code>-DsuppressRawWhenUnchecked=true<\/code>) can be added to the <code>-vmargs<\/code> list on startup. This preserves the old behavior. The projects need to be manually cleaned and rebuilt after toggling the property.<\/p>\n<p><strong>Action required:<\/strong> When new warnings that were previously ignored are now reported, add <code>&quot;rawtypes&quot;<\/code> to the list of warning tokens.<\/p>\n<p>Before:<\/p>\n<pre>@SuppressWarnings(&quot;unchecked&quot;)\n    void bar(List list) {\n        List&lt;String&gt; ls2 = list;\n    }\n@SuppressWarnings(&quot;unchecked&quot;)\nprivate List l;<\/pre>\n<p>After:<\/p>\n<pre>@SuppressWarnings(<b>{<\/b>&quot;unchecked&quot;, &quot;rawtypes&quot;<b>}<\/b>)\n    void bar(List list) {\n        List&lt;String&gt; ls2 = list;\n    }\n@SuppressWarnings(&quot;rawtypes&quot;)\nprivate List l;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Von http:\/\/help.eclipse.org\/helios\/index.jsp?topic=\/org.eclipse.jdt.doc.isv\/porting\/3.6\/incompatibilities.html Punkt 3: @SuppressWarnings(&quot;unchecked&quot;) does not ignore raw types warnings anymore What is affected: Usage of @SuppressWarnings(&quot;unchecked&quot;). Description: Up to Eclipse 3.5, @SuppressWarnings(&quot;unchecked&quot;) was used to suppress the unchecked and raw types warnings. This was not consistent with other compilers (e.g. javac). A new warning token &quot;rawtypes&quot; has been added to cover the case [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[7],"tags":[45,8],"class_list":["post-840","post","type-post","status-publish","format-standard","hentry","category-entwicklungsumgebung","tag-suppresswarnings","tag-eclipse"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=840"}],"version-history":[{"count":0,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/840\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}