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 160048

Summary: Feature of rewriting
Product: java Reporter: tronicek <tronicek>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description tronicek 2009-03-10 22:01:41 UTC
When I rewrite BlockTree with a single statement to BlockTree with two such statements

                BlockTree original = (BlockTree) node;
                List<? extends StatementTree> sts = original.getStatements();
                StatementTree st = sts.get(0);
                List<StatementTree> st2 = new ArrayList<StatementTree>();
                st2.add(st);
                st2.add(st);
                modified = make.Block(st2, false);
                wc.rewrite(node, modified);

the statement is only once in the result. That is, even if I add a statement to the list more than once,
it will appear only once in the resulting source code. Is this a feature or defect?
If it is a feature, could it be changed?
Comment 1 Rastislav Komara 2009-03-11 13:52:16 UTC
Lowering priority. This issues are very specific.
Comment 2 Rastislav Komara 2009-03-11 13:52:32 UTC
Lowering priority. This issues are very specific.
Comment 3 David Strupl 2009-03-31 16:02:55 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:04:10 UTC
I am working on a refactoring module and these bugs are crucial for it to work.
Comment 5 Jan Lahoda 2009-04-13 20:52:57 UTC
*** Issue 162486 has been marked as a duplicate of this issue. ***
Comment 6 Jan Lahoda 2009-08-20 09:59:01 UTC
Reassigning all moonko's java/source bugs to myself.
Comment 7 David Strupl 2012-10-25 13:41:39 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.
Comment 8 Martin Balin 2016-07-07 07:18:32 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss