Skip to content

Inconsistent formatting (first pass, second pass results in a different output). #1260

Description

@dweiss

This class:

class Xyz {
  void foo() {
    int i = 0;
switch (i) {
          case 18:
            { /* Break so we don't hit fall-through warning: */ break;/* ignore STRING */
            }
          }}}

results in a different output when you run gjf multiple times:

$ java -jar google-java-format-1.27.0-all-deps.jar src.java > 1.java
$ java -jar google-java-format-1.27.0-all-deps.jar 1.java > 2.java
$ diff 1.java 2.java 
7c7
<             /* Break so we don't hit fall-through warning: */
---
>           /* Break so we don't hit fall-through warning: */

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions