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 162486 - Error in rewriting of BlockTree
Summary: Error in rewriting of BlockTree
Status: RESOLVED DUPLICATE of bug 160048
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-12 20:49 UTC by tronicek
Modified: 2009-04-13 20:52 UTC (History)
0 users

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-04-12 20:49:00 UTC
I rewrite BlockTree:

                BlockTree original = (BlockTree) node;
                List<StatementTree> list = new ArrayList<StatementTree>();
                list.add(original.getStatements().get(0));
                list.add(original.getStatements().get(0));
                modified = make.Block(list, false);
                rewrite(node, modified);

That is, the new list contains two references to a single statement in the original list.
The input is:

    int x;

    void m1() {
        x++;
    }

The log is:

original: {
    x++;
}
modified: {
    x++;
    x++;
}

However, the source is not changed.
Comment 1 Jan Lahoda 2009-04-13 20:52:58 UTC
Seems the same as issue #160048.

*** This issue has been marked as a duplicate of 160048 ***