Community
Participate
Working Groups
public class Test { void test(String s) { if (s == null) s = ""; //$NON-NLS-1$ } } Formatted using Java Conventions: public class Test { void test(String s) { if (s == null) s = ""; //$NON-NLS-1$ } } @@@@ The //$NON-NLS-1$ should be kept on the same line.
Comments on the line of a statement should probably always stay on the line of the statement. (also for cases like /* protected */ void foo() {..}) We should have the same heuristic in mapping comments to nodes in the AST rewrite and in the formatting (work in progress)
This is not a guardian clause, but a simple if-then statement. Update the title accordingly. Fixed and released in HEAD. Regression test added.
Verified in 200402121200.