Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Text block formatting bug in 1.25.0 #1195

Copy link
Copy link
@protocol7

Description

@protocol7
Issue body actions

In 1.25.0 we're seeing text block formatting failing in some cases, for example:

package com.helloworld;

class Foo {
  void foo() {
    var bar = """
        bar\
         bar""";
  }
}

java -jar google-java-format-1.25.0-all-deps.jar Foo.java gives:

Foo.java:error: Something has gone terribly wrong. We planned to make the below formatting change, but have aborted because it would unexpectedly change the AST.
Please file a bug: https://github.com/google/google-java-format/issues/new

=== Actual: ===
package com.helloworld;

class Foo {

    void foo() {
        /*missing*/ bar = "barbar";
    }
}
=== Expected: ===
package com.helloworld;

class Foo {

    void foo() {
        /*missing*/ bar = "bar bar";
    }
}

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.