Bug 130471

Summary: Strange placing of '.method(' part in Java Conventions formatter
Product: [Eclipse Project] JDT Reporter: Mauritz Løvgren <mauritz.lovgren>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: gunnar, srikanth_sankaran
Version: 3.2   
Target Milestone: 3.6 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mauritz Løvgren CLA 2006-03-05 14:08:15 EST
The result of formatting the following code produces strange line wrapping:

import java.util.logging.Logger;

public class Test {
    private final static Logger logger = Logger.getLogger("Test");

    void logHeartBeat() {
        String host = "localhost";
        int port = 8080;
        if (true) {
            if (true) {
                logger
                        .finer("Sending heartbeat to [" + host + ":" + port
                                + "]");
            }
        }
    }
}


Why is the .finer put on a new line? This does not look very pretty.
Ideally, this would be formatted as:

                logger.finer("Sending heartbeat to [" + host + ":" + port
                              + "]");
Comment 1 Olivier Thomann CLA 2006-11-21 12:32:45 EST

*** This bug has been marked as a duplicate of 59891 ***
Comment 2 Frederic Fusier CLA 2010-04-14 05:38:40 EDT
It was in fact more a duplicate of bug 264112, hence it's fixed since 3.6M5.

*** This bug has been marked as a duplicate of bug 264112 ***
Comment 3 Srikanth Sankaran CLA 2010-04-27 02:19:47 EDT
Verified for 3.6M7 using build I20100424-2000
Comment 4 Srikanth Sankaran CLA 2010-04-28 02:40:20 EDT
Verified.