Bug 76530 [options] Warn about unused local variables and private members
I think we should warn about unused local variables and unused private members by default. These things are errors akin to unused imports, which we already warn about.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ConvertIterableLoopQuickFixTest.java
"		Collection<Collection<String>> cc= null;\r\n" + 
				"		for (Collection<String> c : cc) {\r\n" + 
				"			for (final Iterator<String> inner= c.iterator(); inner.hasNext();) {\r\n" + 
				"				System.out.println(inner.next());\r\n" + 
				"			}\r\n" + 
				"		}\r\n" + 
				"	}\r\n" + 
				"}");
		String expected= buf.toString();
		assertEqualString(preview, expected);
	}
	public void testMethodCall3() throws Exception {
		IPackageFragment pack= fSourceFolder.createPackageFragment("test", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test;\r\n" + 
				"import java.util.Collection;\r\n" + 
				"import java.util.Iterator;\r\n" + 
				"public class A {\r\n" + 
				"	Collection<String> c;\r\n" + 
				"	private Collection<String> getCollection() {\r\n" + 
				"		return c;\r\n" + 
				"	}\r\n" + 
				"	public A() {\r\n" + 
				"		for (final Iterator<String> iterator= new A().getCollection().iterator(); iterator.hasNext();) {\r\n" + 
				"			String test= iterator.next();\r\n" + 
				"			String backup= test;\r\n" + 
				"			System.out.println(backup);\r\n" + 
				"		}\r\n" + 
				"	}\r\n" + 
				"}");