Community
Participate
Working Groups
/** * Put a breakpoint where indicated below, and "Debug As Java Application". * Once the breakpoint hits, select each of the things in the allInScope array, * and hit Shift+Ctrl+D ("Display") to display their values (or use the * "Display View"). Of the 4 things that are in scope, only the "local" * variable can be displayed. For the others, you get a * '... cannot be resolved to a variable". */ public class AnonClassDebugDisplayBug { public static void main(final String[] args) { final String bar = "bar"; new Runnable() { String baz = "baz"; @Override public void run() { String local = "local"; Object[] allInScope = new Object[]{args, bar, baz, local}; System.out.println(allInScope.length); // PUT A BREAKPOINT HERE } }.run(); } }
It has been fixed in 4.5 M5. *** This bug has been marked as a duplicate of bug 45507 ***