This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Error in bracket matching: inserts extra ] if you type [] without looking | ||
---|---|---|---|
Product: | java | Reporter: | Torbjorn Norbye <tor> |
Component: | Editor | Assignee: | Jan Lahoda <jlahoda> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | issues, jiriprox, sustaining |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Torbjorn Norbye
2008-10-01 17:09:14 UTC
Probably duplicate of something. Might be a good candidate for a patch release. We should wait some time to see if this does not have negative side-effects, though: http://hg.netbeans.org/main?cmd=changeset;node=3c57dea43162 Integrated into 'main-golden', will be available in build *200810141401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3c57dea43162 User: Jan Lahoda <jlahoda@netbeans.org> Log: #148878: Match closing bracket correctly in cases like: Map[|] m = new Map[1]; I'm working in a release65 clone these days (for python work) so I'm not on the trunk bits to verify your fix, but I've noticed this is also broken: if (c == '\\') Typing the above without looking at the screen ends up with an extra quote. I don't know if this was fixed by your other fix -- but I think this is something we -really- need to consider integrating a fix for in 65 since basic bracket matching is something that just has to work or people will complain loudly. Well, I agree that this is quite ugly (especially the first case). This is why I proposed to add the fix into a patch release, if it proves to be "safe". The problem with fixes to brace matching is that they quite often cause regressions, and that it often takes a long time before the regressions are found (despite existing unit tests). So, waiting for some time before porting the fix into 6.5 might prevent regressions worse that the original problem. The second problem will be fixed soon (in trunk, and I believe that it is also a good candidate for backporting to 6.5). BTW: seems that the second problem may be reproducible also in Python :-). Fix for the second problem: http://hg.netbeans.org/main?cmd=changeset;node=ccfcf54afc3f Integrated into 'main-golden', will be available in build *200810241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ccfcf54afc3f User: Jan Lahoda <jlahoda@netbeans.org> Log: #148878: '\\ is not an escape sequence. Jirka, this seems to me like a good candidate for a patch release - do you agree? Tor, could you please verify, so it can be added into a patch? Thanks. Yes I agree Justification for including into patch: this issue is quite visible regression verified in Product Version: NetBeans IDE Dev (Build 20090112033331) Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16 System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb) The fix has been ported into the release65_fixes repository. http://hg.netbeans.org/release65_fixes/rev/258f0d39d688 |