Skip to content
Advertisement

Tag: warnings

Why java allows “var” to declare generic variable without specifying type, leading to runtime issue? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 28 days ago. Improve this question Hi: this code get compiled: But with runtime issue. The list local variable is of ArrayList but not any ArrayList<xxx> generic type. Why java let

How to specifically suppress “Comparing identical expressions” in Eclipse-Helios JDT

I tried annotating the enclosing method with but this does not work (worse yet, the annotation results in its own Unsupported @SuppressWarnings(“compareIdentical”) warning!) I know that I can always use but that’d be more warning-suppression than I want. FWIW, I got the “compareIdentical” string from the “Warning Options” table in http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm (a hail-mary pass, to be sure). Thanks! Answer Officially,

Advertisement