lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject lucene-solr git commit: LUCENE-6989: fix javadocs bug (Java 8)
Date Tue, 16 Feb 2016 07:49:40 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_5x 4bdc8980d -> 4eacebd89


LUCENE-6989: fix javadocs bug (Java 8)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4eacebd8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4eacebd8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4eacebd8

Branch: refs/heads/branch_5x
Commit: 4eacebd89ccf8abec0989691fad4a6aa2b408378
Parents: 4bdc898
Author: Uwe Schindler <uschindler@apache.org>
Authored: Tue Feb 16 08:49:30 2016 +0100
Committer: Uwe Schindler <uschindler@apache.org>
Committed: Tue Feb 16 08:49:30 2016 +0100

----------------------------------------------------------------------
 .../core/src/java/org/apache/lucene/store/MMapDirectory.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4eacebd8/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
index f990c49..5668f80 100644
--- a/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
@@ -163,11 +163,15 @@ public class MMapDirectory extends FSDirectory {
   /**
    * <code>true</code>, if this platform supports unmapping mmapped files.
    */
-  public static final boolean UNMAP_SUPPORTED = (Constants.JRE_IS_MINIMUM_JAVA9 == false)
-    && AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+  public static final boolean UNMAP_SUPPORTED = AccessController.doPrivileged(new PrivilegedAction<Boolean>()
{
     @Override
     @SuppressForbidden(reason = "Needs access to private APIs in DirectBuffer and sun.misc.Cleaner
to enable hack")
     public Boolean run() {
+      // we currently don't support Java 9+, because internal APIs changed
+      // and the checks done here are not complete to detect this:
+      if (Constants.JRE_IS_MINIMUM_JAVA9) {
+        return false;
+      }
       try {
         Class<?> clazz = Class.forName("java.nio.DirectByteBuffer");
         Method method = clazz.getMethod("cleaner");


Mime
View raw message