[Skip to content]

Changes

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).

Wrong wrapping when Javadoc formatting

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() {                                                                 |
}                                                                            |

Wrong indentation for parenthesized expressions

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") + "";

Missing line break after left paren

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()) {|
  ...                      |
}                          |

What is Jalopy?

Jalopy is a world-class source code formatter for Java. It automates and enforces all aspects of source code layout—to meet a certain coding style without putting any burden on individual developers.

Learn more

Who needs it?

Jalopy is for everyone involved with source code editing. It scales from single developer usage to large scale enterprise deployment and seamlessly integrates with your favorite Java IDE or build tool.

Go and see yourself

I want some!

Concentrate on your problem domain and don’t waste time shuffling characters around. Pricing starts at USD $40 for a single-user license. Buy now using secure online purchase or wire transfer.

What are you waiting for?

Learn the details

Deploy, configure and use the software to best meet your needs. Download the printable user’s guide and learn everything there is to know to put Jalopy’s capabilities to full use.

Download (.pdf - 8.3MB)