Share

Jalopy Java Source Code Formatter

Tracker: Bugs

1 if blocks and comments - ID: 595160
Last Update: Settings changed ( marcohu )

If I have an if block w/o braces, and at the end of the if
line is a single line comment, the conversion of the code
is a bit messed up when the option to use Sun-style
braces is set (default).


Test Case:
public class Test {


public static void main(String args[]) {


if (true) // blah blah
System.out.println("Blah");
else
System.out.println("Blah Blah");


}


}


Current results


public class Test {
public static void main(String[] args) {
if (true) // blah blah


{
System.out.println("Blah");
} else
{
System.out.println("Blah Blah");
}
}
}


Desired results


public class Test {
public static void main(String[] args) {
if (true) { // blah blah
System.out.println("Blah");
} else {
System.out.println("Blah Blah");
}
}
}


John Zukowski ( jzukowski ) - 2002-08-14 17:57

1

Closed

Fixed

Marco Hunsicker

None

None

Public


Comment ( 1 )

Date: 2002-08-18 22:38
Sender: marcohuProject Admin

Logged In: YES
user_id=44430

Should be fixed with the next beta.

Thanks.


Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2002-11-13 00:02 marcohu
close_date - 2002-11-13 00:02 marcohu
resolution_id None 2002-09-15 21:56 marcohu
priority 5 2002-08-21 16:56 marcohu
assigned_to nobody 2002-08-18 22:38 marcohu