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.

Bug 159985 - Error in rewriting of SwitchTree
Summary: Error in rewriting of SwitchTree
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords: NETFIX
Depends on:
Blocks:
 
Reported: 2009-03-10 11:44 UTC by tronicek
Modified: 2013-12-13 14:33 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tronicek 2009-03-10 11:44:13 UTC
I rewrite SwitchTree:

            SwitchTree t = make.Switch(node.getExpression(), cas2);
            System.out.println("t: " + t);
            wc.rewrite(node, t);

In the log, I can see that t is as I expect:
t: switch (p) {
case 1: 
    System.out.println("1");

case 0: 
    System.out.println("0");

}

But in the result, case 0 is missing:

        switch (p) {
            case 1:
                System.out.println("1");
        }
Comment 1 Rastislav Komara 2009-03-11 13:52:15 UTC
Lowering priority. This issues are very specific.
Comment 2 Rastislav Komara 2009-03-11 13:52:31 UTC
Lowering priority. This issues are very specific.
Comment 3 David Strupl 2009-03-31 15:52:50 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 4 tronicek 2009-04-01 08:01:02 UTC
I am working on a refactoring module and these bugs are crucial for it to work.
Comment 5 fommil 2009-05-18 23:21:55 UTC
I'd like to NetFIX [1] this bug. Is it possible? [1] http://wiki.netbeans.org/NetFIX
Comment 6 fommil 2009-05-24 15:31:18 UTC
OK, found the issue... it's the ordering of the annotations!
Comment 7 fommil 2009-05-24 15:35:09 UTC
IGNORE LAST COMMENT: stupid bugzilla moved to next issue.
Comment 8 Jan Lahoda 2009-08-20 09:57:42 UTC
Reassigning all moonko's java/source bugs to myself.
Comment 9 Svata Dedic 2013-12-13 14:33:13 UTC
no votes, 4 years old. Please reopen if it is still an issue & happens in 7.4 or dev versions.