Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

'Illegal reflective access operation has occurred' using WithObjectMocked #489

Copy link
Copy link
@matt-calderaz

Description

@matt-calderaz
Issue body actions

Hi folks,

I'm using:

  • openJDK 11
  • scala 2.13.10
  • mockito-scala-cats 1.17.12
  • scalaTestPlus 5.1.0

I've added src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker to enable the inline mock maker. After doing so I am able to write a unit test using the withObjectMocked block; however I also notice the following warnings:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.mockito.ReflectionUtils$ (file:/Users/mcalde28/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/mockito/mockito-scala_2.13/1.17.12/mockito-scala_2.13-1.17.12.jar) to method java.lang.Class.getDeclaredFields0(boolean) WARNING: Please consider reporting this to the maintainers of org.mockito.ReflectionUtils$ WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
Any remedy for this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.