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/ConvertForLoopQuickFixTest.java
List proposals= fetchConvertingProposal(buf, cu);
		assertNotNull(fConvertLoopProposal);
		assertCorrectLabels(proposals);
		        String preview1 = getPreviewContent(fConvertLoopProposal);
		        
		
		        buf = new StringBuffer();
		        buf.append("package test1;\n");
		        buf.append("class Weirdy{}\n");
		        buf.append("public class A {\n");
		        buf.append("	private Weirdy[] weirdies;\n");
		        buf.append("	private Weirdy[] getArray(){\n");
		        buf.append("		return weirdies;\n");
		        buf.append("	}\n");
		        buf.append("    public void foo(){\n");
		        buf.append("		for (Weirdy p : getArray()) {\n");
		        buf.append("			System.out.println();\n");
			    buf.append("		    if (p != null){\n");
			    buf.append("				System.out.println(p);\n");
			    buf.append("	    	}\n");
			    buf.append("	    }\n");
		        buf.append("    }\n");
		        buf.append("}\n");
		        String expected = buf.toString();
		        assertEqualString(preview1, expected);
	}
	public void testMatrix() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");