GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Start a text block after `return` on its own line · Issue #128 · openjavaformat/open-java-format

Start a text block after return on its own line #128

New issue
Copy link
New issue
Copy link
Open
Open
Start a text block after return on its own line#128
Copy link
Labels
enhancementNew feature or requestNew feature or request

Description

@abashev
abashev
opened on Oct 16, 2026
Issue body actions

Upstream: google/google-java-format#1467 | Kind: idea | Priority: low

Open PR google-java-format#1467 (fixes issue google-java-format#1258): visitReturn always emits a space before the
expression, so return """ stays on one line. Google Java Style 4.8.9 wants the opening
delimiter of a text block on its own line; the PR detects a text-block literal and emits
a forced +4 break before it, like assignments and variable initializers.

Why it matters to us: our visitReturn is identical (no text-block case), so GOOGLE style
output disagrees with the style guide. For PALANTIR style we keep text blocks attached in
method chains (the isTextBlock special case in visitDot), so the change may be wanted for
GOOGLE style only.

Affected files in our repo:

  • open-java-format/src/main/java/com/palantir/javaformat/java/JavaInputAstVisitor.java (visitReturn, around line 1807)

Suggested action: investigate. Check how both our styles currently format return """
and how assignments with text blocks are laid out; adopt the idea for GOOGLE style if the
result is consistent with our assignment handling.


Filed from an upstream-watch ticket after manual review.

Activity

  1. abashev
    added
    enhancementNew feature or requestNew feature or request
    on Oct 30, 2026
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

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.