Skip to content

Restore enum-compatible methods on JavaFormatterOptions.Style - #1472

Open
Goooler wants to merge 1 commit into
google:masterfrom
Goooler:style-enum-compat
Open

Goooler wants to merge 1 commit into
google:masterfrom
Goooler:style-enum-compat

Conversation

@Goooler

@Goooler Goooler commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Style was changed from an enum to a record, which removed the implicit enum methods. Tools such as Spotless call Style.valueOf(String) to map user configuration to a style, and fail with NoSuchMethodError against the new version.

`Style` was changed from an enum to a record, which removed the implicit
enum methods. Tools such as Spotless call `Style.valueOf(String)` to map
user configuration to a style, and fail with `NoSuchMethodError` against
the new version.
@Goooler Goooler changed the title Restore enum-compatible methods on JavaFormatterOptions.Style Restore enum-compatible methods on JavaFormatterOptions.Style Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google-java-format 1.37.0: NoSuchMethodError on JavaFormatterOptions$Style.valueOf (Style is now a record)

1 participant