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.
I am rewriting EmptyStatement to EmptyStatement: modified = make.EmptyStatement(); System.out.println("original: " + node); System.out.println("modified: " + modified); rewrite(node, modified); The source is public class X { void m1(int p) { if (p > 5); } } The result is: public class X { void m1(int p) { if (p > 5) } } which is not correct because the empty statement (';') is missing. In the log, there is: original: ; modified: ; ----- package testproject; public class X { void m1(int p) { if (p > 5); } } ----- INFO [org.netbeans.modules.java.source.save.CasualDiff]: Illegal values: from = -1; to = 80.Please, attach your messages.log to new issue!
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".
I am working on a refactoring module and these bugs are crucial for it to work.
I'd like to NetFIX [1] this bug. Is it possible? [1] http://wiki.netbeans.org/NetFIX
Created attachment 82247 [details] test case
Bug confirmed... the patch I submitted contains a failing test unit based on the OPs case.
Created attachment 82251 [details] test case and proposed fix
I've uploaded a proposed fix... if I understand it correctly, this was much more widespread than for diffIf. The bug was that all instances of kind JCTree.SKIP (i.e. empty statements ";") were being completely ignored by the diff engine! Now they are not ignored.
ACCEPTED.
jet-main #ef34c805eb0e
Integrated into 'main-golden', will be available in build *200905230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ef34c805eb0e User: Rastislav Komara <moonko@netbeans.org> Log: #159940: Error in rewriting of EmptyStatement