-
Notifications
You must be signed in to change notification settings - Fork 49
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
Cherry-pick upstream changes. #615
Merged
Merged
Conversation
This file contains 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 google/google-java-format#588 PiperOrigin-RevId: 368117115
Fixes google/google-java-format#574 PiperOrigin-RevId: 368124032
Fixes https://github.com/google/google-java-format PiperOrigin-RevId: 368720966
This implements support for JEP 409: Sealed Classes, see https://openjdk.java.net/jeps/409. The implementation handles the sealed and non-sealed keywords and sorts them according to their JLS order. This requires us to look at the actual text of the Tok, as there’s no TokenKind for sealed and non-sealed. The optional permits clause is handled in the same manner as the implements clause. A new private method, classDeclarationTypeList, has been added to facilitate this. This fixes #603. I implemented this in a manner that I deemed fit with the surrounding code, but if I missed something, don’t hesitate to get back to me and I’ll adjust this PR to suit. Fixes #629 COPYBARA_INTEGRATE_REVIEW=google/google-java-format#629 from now:I603 4825e3310e00a1145304d64b4b73e9d3d03d08b3 PiperOrigin-RevId: 387160750
Fixes google/google-java-format#643 PiperOrigin-RevId: 392966720
See openjdk/jdk@0ca094b#diff-a7107e3c172ba7be51af55e33db0d236c16cd3a65cb8d242c289c425879239cbL71 PiperOrigin-RevId: 404714793
google/google-java-format#684 PiperOrigin-RevId: 411136606
…` can be quite slow so it's best to avoid doing it repeatedly. PiperOrigin-RevId: 387621256
for AST changes in Java 17, in particular the addition of CaseTree#getLabels, which returns a single `DefaultCaseLabelTree` to represent the default case. google/google-java-format#683 google/google-java-format#684 PiperOrigin-RevId: 411146137
Generate changelog in
|
Might be nice to rebase-merge this instead of squashing to keep the cherry-picked commits in the history for easier tracking. |
carterkozak
approved these changes
Jan 7, 2022
+1 for retaining original commit data |
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.
After this PR
Cherry-pick a bunch of commits from google-java-format that contain logic fixes for newer Java versions.
Mostly 1:1 copy of the upstream change and rebasing them into the slightly changed structure of palantir-java-format.
==COMMIT_MSG==
Cherry-pick upstream changes.
==COMMIT_MSG==
Possible downsides?
Large list of changes but they all merged upstream and don't change our existing tests so this should be good.