Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Inconsistent indentation of long log statements

Open
#1,157 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
tooling

Research direction

Start by running google-java-format on the Java snippet in the issue and compare the indentation of the two long log statements. Trace the formatter behavior for chained calls and multiline arguments, then add or update coverage so both forms produce the expected indentation consistently.

Written by the indexing model from the issue text.

Description

There seems to be an inconsistency in how long log statements are indented when they break across lines. See the example below. If there's a line break, I'd expect the output to be like the first snippet.

class Test {
  void test() {
    logger.atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo()
        .log(
            "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");

    logger.atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo().atInfo()
        .atInfo().log(
        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
  }
}
Dominant language
Java
Stars
6.2k
Forks
936
Avg merge
6m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/google-java-format

All issues in google/google-java-format

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.