This document describes the changes in the Java formatter engine of Jalopy 1.2.1 that may have an impact on formatting style (depending on your code convention).
With Javadoc formatting enabled, wrapping could wrongly occur before reaching the maximal line length.
/* | * <p><strong>Caution:</strong> method assumes that all given files belong to| */ | void foo() { | } |
was wrongly formatted as
/* | * <p><strong>Caution:</strong> method assumes that all given files belong | * to | */ | void foo() { | } |
Now it will be printed (depending on your settings)
/* | * <p><strong>Caution:</strong> method assumes that all given files belong to| */ | void foo() { | } |
When the endline indentation policy was enabled, parenthesized expressions were wrongly indented when wrapping occured.
String test = ("multi" + // comment 1 "line") + "";
was wrongly formatted as
String test = ("multi" + // comment 1 "line") + "";
Now it will be printed (depending on your settings)
String test = ("multi" + // comment 1 "line") + "";
For if
, while
and
do-while
statements no line break occured after the left
parenthesis even if the expression exceeded the maximal line length.
| while (conditionHoldsTrue()) { ... | } |
was wrongly formatted as
| while (conditionHoldsTrue()) { ... | } |
Now it will be printed (depending on your settings)
| while ( | conditionHoldsTrue()) {| ... | } |