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 — Adds a Google Java Format for JDK17 by bric3 · Pull Request #2572 · mockito/mockito

Conversation

@bric3

@bric3 bric3 commented Feb 18, 2022

Copy link
Copy Markdown
Member

Currently Google Java Format rely on javac internal classes

diffplug/spotless#834
https://github.com/diffplug/spotless/tree/main/plugin-gradle#google-java-format

Running ./gradlew spotlessJava with JDK 17 produces this error

> Task :spotlessJava FAILED
Step 'google-java-format' found problem in 'src/main/java/org/mockito/invocation/DescribedInvocation.java':
class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x1b6d12d8) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x1b6d12d8
java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x1b6d12d8) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x1b6d12d8
        at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:349)
        at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:334)
        at com.google.googlejavaformat.java.JavaInput.<init>(JavaInput.java:276)

Checklist

  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • If possible / relevant include an example in the description, that could help all readers
    including project members to get a better picture of the change
  • Avoid other runtime dependencies
  • Meaningful commit history ; intention is important please rebase your commit history so that each
    commit is meaningful and help the people that will explore a change in 2 years
  • The pull request follows coding style
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should mention Fixes #<issue number> if relevant

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bric3
bric3 force-pushed the spotless-format-jdk17-mitigation branch from 494e6c0 to 260bf20 Compare February 18, 2022 16:54
@bric3
Adds a Google Java Format for JDK17
384f792
Currently Google Java Format rely on javac internal classes

diffplug/spotless#834
https://github.com/diffplug/spotless/tree/main/plugin-gradle#google-java-format
@bric3
bric3 force-pushed the spotless-format-jdk17-mitigation branch from 260bf20 to 384f792 Compare February 18, 2022 16:58
TimvdLippe
TimvdLippe approved these changes Feb 18, 2022
View reviewed changes

@TimvdLippe TimvdLippe left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix Brice! Feel free to merge when CI is fully green.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@codecov-commenter

codecov-commenter commented Feb 18, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.65%. Comparing base (50d7e71) to head (384f792).
⚠️ Report is 612 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2572   +/-   ##
=========================================
  Coverage     86.65%   86.65%           
  Complexity     2795     2795           
=========================================
  Files           321      321           
  Lines          8368     8368           
  Branches       1024     1024           
=========================================
  Hits           7251     7251           
  Misses          849      849           
  Partials        268      268           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimvdLippe
TimvdLippe merged commit 6ccc121 into main Feb 18, 2022
@theaspect theaspect mentioned this pull request Mar 15, 2022
Bump mockito-core from 4.3.1 to 4.4.0 theaspect/sandbox#41
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@TimvdLippe TimvdLippe TimvdLippe approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@bric3 @codecov-commenter @TimvdLippe
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.
You are visitor 01402792 — 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.