You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/10/03 00:10:50 UTC

[lucene-solr] branch branch_8x updated: LUCENE-8991: disable java.util.HashMap assertions to avoid spurious vailures due to JDK-8205399

This is an automated email from the ASF dual-hosted git repository.

hossman pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 60b9ec0  LUCENE-8991: disable java.util.HashMap assertions to avoid spurious vailures due to JDK-8205399
60b9ec0 is described below

commit 60b9ec0866e6223afb269fa377203f731cca2973
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Wed Oct 2 15:58:26 2019 -0700

    LUCENE-8991: disable java.util.HashMap assertions to avoid spurious vailures due to JDK-8205399
    
    (cherry picked from commit 10da07a396777e3e7cfb091c5dec826b6df11284)
---
 lucene/common-build.xml | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 3ed0841..86cb8ad 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -135,7 +135,23 @@
   <property name="tests.asserts" value="true" />
   <property name="tests.policy" location="${common.dir}/tools/junit4/tests.policy"/>
 
-  <condition property="tests.asserts.args" value="-ea -esa" else="">
+  <condition property="tests.asserts.bug.jdk8205399" value="-da:java.util.HashMap" else="">
+    <!-- LUCENE-8991 / JDK-8205399: HashMap assertion bug in Java 10 and 11-->
+    <and>
+      <or>
+        <contains string="${java.vm.name}" substring="hotspot" casesensitive="false"/>
+        <contains string="${java.vm.name}" substring="openjdk" casesensitive="false"/>
+        <contains string="${java.vm.name}" substring="jrockit" casesensitive="false"/>
+      </or>
+      <or>
+        <equals arg1="${java.specification.version}" arg2="10"/>
+        <equals arg1="${java.specification.version}" arg2="11"/>
+      </or>
+      <isfalse value="${tests.asserts.hashmap}" />
+    </and>
+  </condition>
+  
+  <condition property="tests.asserts.args" value="-ea -esa ${tests.asserts.bug.jdk8205399}" else="">
     <istrue value="${tests.asserts}"/>
   </condition>