-
Notifications
You must be signed in to change notification settings - Fork 884
Fix indentation of case statements on JDK 17 #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes #643 PiperOrigin-RevId: 392966720
8ce2fc4
to
79257ed
Compare
gcf-merge-on-green bot
referenced
this pull request
in googleapis/google-oauth-java-client
Oct 26, 2021
…a-format to v1.12.0 (#763) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.googlejavaformat:google-java-format](https://togithub.com/google/google-java-format) | `1.7` -> `1.12.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>google/google-java-format</summary> ### [`v1.12.0`](https://togithub.com/google/google-java-format/releases/v1.12.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.11.0...v1.12.0) #### What's Changed - Format type annotation as part of the type, not part of the modifiers list ([https://github.com/google/google-java-format/pull/653](https://togithub.com/google/google-java-format/pull/653)) - Fix indentation of case statements on JDK 17 ([https://github.com/google/google-java-format/pull/654](https://togithub.com/google/google-java-format/pull/654)) **Full Changelog**: google/google-java-format@v1.11.0...v1.12.0 ### [`v1.11.0`](https://togithub.com/google/google-java-format/releases/v1.11.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.10.0...v1.11.0) `google-java-format` now has improved support for running on JDK 17 early access builds. Changes: - Handle `final` variables in `instanceof` patterns ([#​588](https://togithub.com/google/google-java-format/issues/588)) - Fix handling of annotations in compact record constructors ([#​574](https://togithub.com/google/google-java-format/issues/574)) - Fix a crash in `instanceof` pattern handling ([#​594](https://togithub.com/google/google-java-format/issues/594)) - Wrap multiple values in switch expression case ([#​540](https://togithub.com/google/google-java-format/issues/540)) - Fix formatting of module trees after [JDK-8255464](https://bugs.openjdk.java.net/browse/JDK-8255464) - Support `sealed` classes ([#​603](https://togithub.com/google/google-java-format/issues/603)) ### [`v1.10.0`](https://togithub.com/google/google-java-format/releases/v1.10.0) `google-java-format` now supports running on JDK 16. The following flags are required when running on JDK 16, due to [JEP 396: Strongly Encapsulate JDK Internals by Default](https://openjdk.java.net/jeps/396): java \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ -jar google-java-format-1.10.0-all-deps.jar T... Other changes: - Handle extra `;` in import lists (google/google-java-format@b769e81) - Add missing space between unary `-` and negative literals (google/google-java-format@6da736d) - Fix an off-by-one issue on the reflowing of string literals (google/google-java-format@b9fd8d2) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-oauth-java-client).
gcf-merge-on-green bot
referenced
this pull request
in googleapis/google-cloud-java
Nov 15, 2021
…a-format to v1.12.0 (#7719) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.googlejavaformat:google-java-format](https://togithub.com/google/google-java-format) | `1.11.0` -> `1.12.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>google/google-java-format</summary> ### [`v1.12.0`](https://togithub.com/google/google-java-format/releases/v1.12.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.11.0...v1.12.0) ##### What's Changed - Format type annotation as part of the type, not part of the modifiers list ([https://github.com/google/google-java-format/pull/653](https://togithub.com/google/google-java-format/pull/653)) - Fix indentation of case statements on JDK 17 ([https://github.com/google/google-java-format/pull/654](https://togithub.com/google/google-java-format/pull/654)) **Full Changelog**: google/google-java-format@v1.11.0...v1.12.0 </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-cloud-java).
gcf-merge-on-green bot
referenced
this pull request
in googleapis/google-auth-library-java
Nov 17, 2021
) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.googlejavaformat:google-java-format](https://togithub.com/google/google-java-format) | `1.7` -> `1.12.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>google/google-java-format</summary> ### [`v1.12.0`](https://togithub.com/google/google-java-format/releases/v1.12.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.11.0...v1.12.0) ##### What's Changed - Format type annotation as part of the type, not part of the modifiers list ([https://github.com/google/google-java-format/pull/653](https://togithub.com/google/google-java-format/pull/653)) - Fix indentation of case statements on JDK 17 ([https://github.com/google/google-java-format/pull/654](https://togithub.com/google/google-java-format/pull/654)) **Full Changelog**: google/google-java-format@v1.11.0...v1.12.0 ### [`v1.11.0`](https://togithub.com/google/google-java-format/releases/v1.11.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.10.0...v1.11.0) `google-java-format` now has improved support for running on JDK 17 early access builds. Changes: - Handle `final` variables in `instanceof` patterns ([#​588](https://togithub.com/google/google-java-format/issues/588)) - Fix handling of annotations in compact record constructors ([#​574](https://togithub.com/google/google-java-format/issues/574)) - Fix a crash in `instanceof` pattern handling ([#​594](https://togithub.com/google/google-java-format/issues/594)) - Wrap multiple values in switch expression case ([#​540](https://togithub.com/google/google-java-format/issues/540)) - Fix formatting of module trees after [JDK-8255464](https://bugs.openjdk.java.net/browse/JDK-8255464) - Support `sealed` classes ([#​603](https://togithub.com/google/google-java-format/issues/603)) ### [`v1.10.0`](https://togithub.com/google/google-java-format/releases/v1.10.0) `google-java-format` now supports running on JDK 16. The following flags are required when running on JDK 16, due to [JEP 396: Strongly Encapsulate JDK Internals by Default](https://openjdk.java.net/jeps/396): java \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ -jar google-java-format-1.10.0-all-deps.jar T... Other changes: - Handle extra `;` in import lists (google/google-java-format@b769e81) - Add missing space between unary `-` and negative literals (google/google-java-format@6da736d) - Fix an off-by-one issue on the reflowing of string literals (google/google-java-format@b9fd8d2) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-auth-library-java).
gcf-merge-on-green bot
referenced
this pull request
in googleapis/google-http-java-client
Nov 17, 2021
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.googlejavaformat:google-java-format](https://togithub.com/google/google-java-format) | `1.7` -> `1.12.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>google/google-java-format</summary> ### [`v1.12.0`](https://togithub.com/google/google-java-format/releases/v1.12.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.11.0...v1.12.0) ##### What's Changed - Format type annotation as part of the type, not part of the modifiers list ([https://github.com/google/google-java-format/pull/653](https://togithub.com/google/google-java-format/pull/653)) - Fix indentation of case statements on JDK 17 ([https://github.com/google/google-java-format/pull/654](https://togithub.com/google/google-java-format/pull/654)) **Full Changelog**: google/google-java-format@v1.11.0...v1.12.0 ### [`v1.11.0`](https://togithub.com/google/google-java-format/releases/v1.11.0) [Compare Source](https://togithub.com/google/google-java-format/compare/v1.10.0...v1.11.0) `google-java-format` now has improved support for running on JDK 17 early access builds. Changes: - Handle `final` variables in `instanceof` patterns ([#​588](https://togithub.com/google/google-java-format/issues/588)) - Fix handling of annotations in compact record constructors ([#​574](https://togithub.com/google/google-java-format/issues/574)) - Fix a crash in `instanceof` pattern handling ([#​594](https://togithub.com/google/google-java-format/issues/594)) - Wrap multiple values in switch expression case ([#​540](https://togithub.com/google/google-java-format/issues/540)) - Fix formatting of module trees after [JDK-8255464](https://bugs.openjdk.java.net/browse/JDK-8255464) - Support `sealed` classes ([#​603](https://togithub.com/google/google-java-format/issues/603)) ### [`v1.10.0`](https://togithub.com/google/google-java-format/releases/v1.10.0) `google-java-format` now supports running on JDK 16. The following flags are required when running on JDK 16, due to [JEP 396: Strongly Encapsulate JDK Internals by Default](https://openjdk.java.net/jeps/396): java \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ -jar google-java-format-1.10.0-all-deps.jar T... Other changes: - Handle extra `;` in import lists (google/google-java-format@b769e81) - Add missing space between unary `-` and negative literals (google/google-java-format@6da736d) - Fix an off-by-one issue on the reflowing of string literals (google/google-java-format@b9fd8d2) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client).
copybara-service bot
pushed a commit
that referenced
this pull request
Feb 4, 2022
Since the last plugin update was almost half a year ago, I thought it would be prudent to update it and resolve most of the issues regarding updating the plugin. It took around half an hour once I managed to correctly set up the module due to the gradle plugin version 1.2.1 + intellij version 2020.3 requiring java 11 to develop. All of the included annotation changes were requested by IntelliJ to add since the overrides added them as well. The change of `<? extends TextRange>` to `<TextRange>` was to resolve the syntax errors introduced by a change removing the wildcard requirement. NotificationGroup was deprecated and moved into the plugin xml file as per the SDK docs The same was required for `StdFileTypes.JAVA` being deprecated with the fix being `JavaFileType.INSTANCE` + changing the depend module to add that fix. I had to change the project SDK to JDK 11 on my end to have the gradle build work. I also tested the plugin with 1.12 and 1.10 on some test files such as from #653 and #654. Would be good to have some double checking though because I've had issues trying to get the test file reformatted in #558 working. Probably because it's locked behind an experimental flag? Fixes #688 COPYBARA_INTEGRATE_REVIEW=#688 from ze:idea-1.12.0 53f216c PiperOrigin-RevId: 426491735
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix indentation of case statements on JDK 17
Fixes #643