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 198630

Summary: Wrong formatting when changing multiple expressionStatements
Product: java Reporter: Ralph Ruijs <ralphbenjamin>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.0.1   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Testcase

Description Ralph Ruijs 2011-05-16 12:36:23 UTC
I try to inline the method printGreeting but the first two lines end up on the same line (and an empty line at the end). Like:

public class MultipleExpressionsTest {
    public void testMethod() {
        System.out.println("Hello World!");System.out.println("Hello World!");
        System.out.println("Hello World!");

    }
    public void printGreeting() {
        System.out.println("Hello World!");
    }
}

I think this is a problem in CasualDiff.
Comment 1 Ralph Ruijs 2011-05-16 12:38:02 UTC
Created attachment 108317 [details]
Testcase
Comment 2 Jan Lahoda 2011-05-19 12:37:16 UTC
http://hg.netbeans.org/jet-main/rev/9542a0364119
Comment 3 Quality Engineering 2011-05-20 08:55:48 UTC
Integrated into 'main-golden', will be available in build *201105200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9542a0364119
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #198630: fixing rewrite of statements in blocks.
Comment 4 Jan Lahoda 2011-05-23 09:09:40 UTC
release701:
http://hg.netbeans.org/releases/rev/83e220e6f720