Community
Participate
Working Groups
Consider the following code: package test; public class Test { void foo() { throw new IllegalStateException("aaa |" ); } } Assume "|" is the cursor position. Try to type: { (open curly brace) Expected behaviour: throw new IllegalStateException("aaa {"); Actual behaviour: throw new IllegalStateException("aaa ") {; Indeed, it seems like the editor tries to propose some sort of "create new anonymous inner class" proposal, but it's very annoying that this is triggered when I'm typing inside a string literal, because it's indeed an undesired behaviour. By trial and error I discovered that if you hit backspace immediately, the "{" is put back into the string literal, but when this happens you usually have a "WTF" moment and hitting backspace immediately after the "{" is not the first thing that comes into your mind, especially because you meanwhile may have written something else after the "{", and then pressing backspace repeatedly is useless to recover: you'll end up deleting the undesired output and trying again to put it inside the string literal, in an endless loop... It's a bit frustrating ;-)
*** This bug has been marked as a duplicate of bug 520081 ***