Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bug: error when too long line before ending triple quotes

オープン
#969 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
tooling

調査の方向性

Start by reproducing the failure with the provided Problem.java example using google-java-format-1.17.0. Trace the formatter behavior for a long text block immediately before the closing triple quotes; done means formatting completes without the AST-change error and produces the expected concatenated string.

索引モデルが issue の本文から書いたものです。

説明

I have a very simple example where google-java-format errors:

class Problem {
  static String problematic() {
    return """
A too long string directly before the ending triple quote seems to cause a problem with google java formatter""";
  }
}

When I run the formatter on this file (using java -jar /path/to/google-java-format-1.17.0-all-deps.jar /path/to/Problem.java) I get the following error:

/path/to/Problem.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: ===

class Problem {
    
    static String problematic() {
        return "A too long string directly before the ending triple quote seems to cause a problem\"\n               + \" with google java formatter";
    }
}
=== Expected: ===

class Problem {
    
    static String problematic() {
        return "A too long string directly before the ending triple quote seems to cause a problem with google java formatter";
    }
}

主要言語
Java
スター
6.2k
フォーク
936
平均マージ
6分
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/google-java-format のほかの issue

google/google-java-format の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。