A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/google/google-java-format/issues/400 below:

Formatting of tabular array initializer confused by negative numbers · Issue #400 · google/google-java-format · GitHub

Negative numbers in the initializer of an array with tabular formatting makes google-java-format not preserve the layout.

$ cat T.java
package foo;

public class FormattingTester {

  private static final double[] flinePoints = {
    95.0, 75.0, 95.0, 75.0,
    95.0, 75.0, 95.0, 75.0
  };

  private static final double[] flinePoints2 = {
    95.0, 75.0, -95.0, 75.0,
    -95.0, 75.0, 95.0, 75.0
  };
}

$ java -jar ~/Downloads/google-java-format-1.7-all-deps.jar T.java
package foo;

public class FormattingTester {

  private static final double[] flinePoints = {
    95.0, 75.0, 95.0, 75.0,
    95.0, 75.0, 95.0, 75.0
  };

  private static final double[] flinePoints2 = {95.0, 75.0, -95.0, 75.0, -95.0, 75.0, 95.0, 75.0};
}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4