Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 30, 2023

Bumps mockito-inline from 4.8.0 to 5.1.0.

Release notes

Sourced from mockito-inline's releases.

v5.1.0

Changelog generated by Shipkit Changelog Gradle Plugin

5.1.0

v5.0.0

Mockito 5: prepare for future JDK versions

For a while now, we have seen an increase in problems/incompatibilities with recent versions of the JDK due to our usage of JVM-internal API. Most notably, JDK 17 made some changes which are incompatible with the current subclass mockmaker. Therefore, to prepare for the future of JDK, we are making some core changes to ensure Mockito keeps on working.

Switch the default mockmaker to mockito-inline

Back in Mockito 2.7.6, we published a new mockmaker based on the "inline bytecode" principle. This mockmaker creates mocks manipulating bytecode equivalent within the original class such that its method implementations hook into the normal Mockito machinery. As a comparison, the subclass mockmaker generates "real" subclasses for mocks, to mimic the same behavior. While the approaches are similar, the inline mockmaker avoids certain restrictions that the JDK imposes. For example, it does not violate module boundaries (introduced in JDK 9, but more heavily used in JDK 17) and avoids the leaking of the creation of the subclass.

Massive thanks to community member @​reta who implemented this change.

Note: this does not affect mockito-android nor testing on Android.

When should I still be using the subclass mockmaker?

There are legitimate remaining use cases for the subclass mockmaker. For example, on the Graal VM's native image, the inline mockmaker will not work and the subclass mockmaker is the appropriate choice. Additionally, if you would like to avoid mocking final classes, using the subclass mockmaker is a possibibility. Note however that if you solely want to use the subclass mockmaker to avoid mocking final, you will run into the above mentioned issues on JDK 17+. We want to leave this choice up to our users, which is why we will keep on supporting the subclass mockmaker.

If you want to use the subclass mockmaker instead, you can use the new mockito-subclass artifact (published on Maven Central along with all our other artifacts).

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Jan 30, 2023
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@bparrishMines
Copy link
Contributor

@dependabot rebase

Bumps [mockito-inline](https://github.com/mockito/mockito) from 4.8.0 to 5.1.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v4.8.0...v5.1.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/gradle/packages/webview_flutter/webview_flutter_android/android/org.mockito-mockito-inline-5.1.0 branch from b222e51 to 9be0e29 Compare January 30, 2023 19:57
Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 31, 2023
@auto-submit auto-submit bot merged commit 5dd0f41 into main Jan 31, 2023
@dependabot dependabot bot deleted the dependabot/gradle/packages/webview_flutter/webview_flutter_android/android/org.mockito-mockito-inline-5.1.0 branch January 31, 2023 03:28
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 31, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 31, 2023
* 90f447313 [ci] Increase timeouts for platform_tests (flutter/plugins#7036)

* f5568e4b1 [google_sign_in] Add doc for iOS auth with SERVER_CLIENT_ID (flutter/plugins#4747)

* 0c05e8d91 Roll Flutter from a815ee6 to 75680ae (58 revisions) (flutter/plugins#7048)

* a4c320902 [camera]: Bump camerax_version from 1.3.0-alpha02 to 1.3.0-alpha03 in /packages/camera/camera_android_camerax/android (flutter/plugins#7061)

* 8f12b27b6 [ci] Add LUCI versions of macOS ARM tests (flutter/plugins#6984)

* 3843b38e2 [tool] Improve main-branch detection (flutter/plugins#7038)

* d39e7569c [in_app_purchase] Prep for more const widgets (flutter/plugins#7030)

* ddb9777ee [ci] Switch remaining macOS host tests to LUCI (flutter/plugins#7063)

* 2edf56324 [ci] Part 1 of swapping iOS platform test arch (flutter/plugins#7064)

* 35f0b1a49 [camerax] Add system services to plugin (flutter/plugins#6986)

* 5dd0f41a2 [webview]: Bump mockito-inline (flutter/plugins#7056)

* 1896f10ca [webview_flutter_wkwebview][webview_flutter_android] Fixes bug where the `WebView`s could not be released (flutter/plugins#6996)

* a494825fa [camerax] Allow instance manager to create identical objects (flutter/plugins#7034)

* 6ef73da26 [ci] Increase heavy workload memory (flutter/plugins#7065)

* 9da327ca3 [various] Update to use sharedDarwinSource (flutter/plugins#7027)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App dependencies Pull requests that update a dependency file java Pull requests that update Java code needs tests p: webview_flutter Edits files for a webview_flutter plugin platform-android
Projects
None yet
2 participants