[
https://issues.apache.org/jira/browse/LUCENE-6795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742008#comment-14742008
]
Uwe Schindler commented on LUCENE-6795:
---------------------------------------
Hi, I started to look into Solr. In fact after some fruitful discussions with
the Jigsaw people I figured out what the "main" issue is.
Also for Solr we should put {{AccessibleObject#setAccessible()}} onto the
forbidden-apis list and only allow it for some very special cases (which are
also supported by Oracle): The MMapDir cleaner. Any comments?
Solr has some violations on this, because it tries to make hidden fields or
methods available that are part of the Java runtime. With Java 9 Jigsaw (soon
to be merged into Java 9 mainline), any call to setAccessible() on any class
which is part of the Java runtime fails. PERIOD. No way to work around that.
There are only some "exceptions" for some APIs (see [JEP
260|http://openjdk.java.net/jeps/260]), but the general rule holds. If you try
to make one of the internal members accessible, setAccessible throws a new
RuntimeException. This lead to some discussions (e.g. the Groovy runtime engine
is completely broken by that, see GROOVY-7587). Oracle is working on solutions
for that, but the general rule holds:
[http://mail.openjdk.java.net/pipermail/jigsaw-dev/2015-September/004530.html]
I will now fix some issues in Solr. One of those is the SystemInfoHandler. This
just uses the OperatingSystemMXBean in a "wrong way", because it tries to call
hidden methods, which are only implemented by an interface. So it fails. You
just need to cast to correct interface and then you can call the methods as
usual. I will commit this fix in a minute.
> Remove all accessClassInPackage permissions for jigsaw
> ------------------------------------------------------
>
> Key: LUCENE-6795
> URL: https://issues.apache.org/jira/browse/LUCENE-6795
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
>
> With jigsaw builds this stuff is not allowed, its no longer an option of
> security manager or not.
> So we should remove these permissions and fix the test leaks, crappy code,
> remove hacks, etc.
> If the hack is really somehow needed for some special reason (e.g. well known
> case like mmap), it needs to gracefully handle not being able to do this, the
> code and tests should still "work" if it cannot do the hack.
> Otherwise there will be problems for java 9.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]