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 rewriting of CaseTree | ||
---|---|---|---|
Product: | java | Reporter: | tronicek <tronicek> |
Component: | Source | Assignee: | Rastislav Komara <moonko> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | fommil, jkovalsky |
Priority: | P3 | Keywords: | NETFIX |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
failing test case
proposed bugfix and test case |
Description
tronicek
2009-02-07 18:10:57 UTC
. I'd like to NetFIX [1] this bug. Is it possible? [1] http://wiki.netbeans.org/NetFIX Notes from @jlahoda ============== Having a reproducible test case, this should not be very hard to fix. Most likely a bug in the code generator. Bugs in code generator are typically fixed as follows: - add one or more tests into the generator test suite (package org.netbeans.api.java.source.gen in java.source's tests). - fix the problem, so that the test passes. - run whole codegen test suite by executing "ant -Dtest.config=generator test" inside java.source module. All tests must pass (this test suite is being run during the jet-main continuous build, so all tests should be passing). @jlahoda... worth pointing out to others that TutorialTest has a lot of examples in it. I just stumbled across it! Created attachment 81596 [details]
failing test case
This is a pesky one! Lots of code that needs to be understood. I'm pretty sure the bug is in (or called from) CasualDiff.diff(Context, WorkingCopy, TreePath, JCTree, Map, Map, Map) Created attachment 81830 [details]
proposed bugfix and test case
@moonko I'm not 100% happy with this bug fix. It comprises:- - test case (now passes) - add empty do {} to while statements (to make it explicit that this is not a typo!) - the fix: add a tokenSequence.moveNext() to diffCase following the iteration to COLON The reason I am not happy is that the whitespace is not coming out right. I expect a space to be entered between the "case:break;" and no newline afterward. Please amend the testcase if you wish to also test this. Patch accepted. jet-main #c77f10c5666e Integrated into 'main-golden', will be available in build *200905120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c77f10c5666e User: Rastislav Komara <moonko@netbeans.org> Log: #158129: Error in rewriting of CaseTree Adding NETFIX keyword. |