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
Update minimum support Java version from 8 to 11 #2798
Comments
As a third option, we can also drop Java 8, so that we can import the StackWalker directly. I am not sure what's best. A plugin for the @mockito/developers We have been hitting several Java 8 issues lately and this is yet another one where we have to workaround Java 8 to support modern JDK versions. WDYT of upgrading to Java 11 as a minimum requirement? I can create a separate issue for that if you want. |
I think it's fair to move on to Java 11. Today Spring 6 arrived which baselines to Java 17, we are not even on the edge of things with this in mind, so thumbs up for bumping to 11. |
@raphw that's unexpected win-win outcome :-), thanks @TimvdLippe for this 3rd option, I can take it (under new issue) if no one is working on it at the moment. |
I filed #2802 to consolidate the changes for Mockito 5. For this issue, we will need to:
We can clean up the source code in Let me know if you think I missed something. I would welcome some PRs to get these fixed! |
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Fixes #2798 Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Hello!
We [1] have been using Mockito with JDK's
SecurityManager
(for historical reasons), the things worked fine for us till Mockito4.8.0
release (and later versions). The culprit isJava9PlusLocationImpl
(see please stack trace below):By all means,
Mockito
should know nothing aboutSecurityManager
and the way we implemented mocking underSecurityManager
is by usingMockito
's extensibility model - plugins (primary,MockMaker
). Sadly forLocationFactory
/Location
there is no such plugin available so we are stuck on 4.7.x release line. If such plugin would have been available, we could provide privileged implementation for reflection calls. Alternatively, wrapping up Java 9 implementation into multi-release JAR (and getting rid of reflection), would have helped.We are happy to submit the pull request with either solution, but it would be helpful to know if there is an interest addressing this issue in general, and preferred approach in particular:
LocationFactory
/Location
Thank you.
Note that some configuration are impossible to mock via Mockito
(same as any question on stackoverflow.com)
[1] https://github.com/opensearch-project/OpenSearch
The text was updated successfully, but these errors were encountered: