package sandbox; /** * Steps to reproduce: * O) FindBugs plugin must be installed and active * (Editor -> Hints -> Language = FindBugs -> Run FindBugs in editor = checked) * 1) Cut (using ctrl+x) the code between the two comments (InnerClass1) * * AIOB exception is produced consistently in dev 20130927 * * @author Jacob Dilles */ public class Issue235630 { private StringBuilder sb = new StringBuilder(); public void method1() { method2("abc"); } public void method2(String str) { staticMethod3(sb, str); staticMethod3(sb, new InnerClass1().toString()); staticMethod3(sb, new InnerClass2().toString()); } private static void staticMethod3(StringBuilder sb, String str) { staticMethod4(sb, str, 1); staticMethod4(sb, str, 2); staticMethod4(sb, str, 3); } private static void staticMethod4(StringBuilder sb, String str, int i) { sb.append(i).append(str); } /// (1) Begin cut here V private class InnerClass1 implements Runnable { public void run() { throw new UnsupportedOperationException("InnerClass1.run"); } } // (1)end cut here ^ public static final class InnerClass2 { protected void method5(int i) { i = 4; } } private static int unusedStaticMethod0(int z) { return z - 1; } }