lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Hyde (JIRA)" <>
Subject [jira] [Commented] (SOLR-9893) EasyMock/Mockito no longer works with Java 9 b148+
Date Mon, 09 Jan 2017 18:25:59 GMT


Julian Hyde commented on SOLR-9893:

[~thetaphi], Thanks for replying. I agree with your strategy. I've disabled our offending
tests using Assume, and we can still claim that Avatica works on JDK9, albeit with less coverage.

I am concerned that the Mockito/Cglib community seem to think that JDK9 support == adding
support for new JDK9 features. Whereas we just want the same old functionality to run on a
JDK9 runtime. (We can't use JDK9 features until we drop support for JDK1.7 and JDK1.8.) I'll
weigh in on and until then I guess we'll have to
be patient.

> EasyMock/Mockito no longer works with Java 9 b148+
> --------------------------------------------------
>                 Key: SOLR-9893
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Tests
>    Affects Versions: 6.x, master (7.0)
>            Reporter: Uwe Schindler
>            Priority: Blocker
> EasyMock does not work anymore with latest Java 9, because it uses cglib behind that
is trying to access a protected method inside the runtime using setAccessible. This is no
longer allowed by Java 9.
> Actually this is really stupid. Instead of forcefully making the protected defineClass
method available to the outside, it is much more correct to just subclass ClassLoader (like
the Lucene expressions module does).
> I tried updating to easymock/mockito, but all that does not work, approx 25 tests fail.
The only way is to disable all Mocking tests in Java 9. The underlying issue in cglib is still
not solved, master's code is here:
> As we use an old stone-aged version of mockito (1.x), a fix is not expected to happen,
although cglib might fix this!
> What should we do? This stupid issue prevents us from testing Java 9 with Solr completely!

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message