Skip to content

Apache Lucene open-source search software

LUCENE-5514: Remove outdated constants

Uwe Schindler38c37e70fc3e
diff --git a/lucene/core/src/java/org/apache/lucene/util/Constants.java b/lucene/core/src/java/org/apache/lucene/util/Constants.java
index 44f54461ce3..6eaa8334ed2 100644
--- a/lucene/core/src/java/org/apache/lucene/util/Constants.java
+++ b/lucene/core/src/java/org/apache/lucene/util/Constants.java
@@ -53,11 +53,6 @@ public final class Constants {
public static final String OS_VERSION = System.getProperty("os.version");
public static final String JAVA_VENDOR = System.getProperty("java.vendor");
- /** @deprecated With Lucene 5.0, we are always on Java 7 */
- @Deprecated
- public static final boolean JRE_IS_MINIMUM_JAVA7 =
- new Boolean(true).booleanValue(); // prevent inlining in foreign class files
-
public static final boolean JRE_IS_MINIMUM_JAVA8;
/** True iff running on a 64bit JVM */
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestIOUtils.java b/lucene/core/src/test/org/apache/lucene/util/TestIOUtils.java
index 16114b6ded9..b816026a219 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestIOUtils.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestIOUtils.java
@@ -59,12 +59,10 @@ public class TestIOUtils extends LuceneTestCase {
System.out.println("TestIOUtils.testSuppressedExceptions: Thrown Exception stack trace:");
System.out.println(trace);
}
- if (Constants.JRE_IS_MINIMUM_JAVA7) {
- assertTrue("Stack trace does not contain first suppressed Exception: " + trace,
- trace.contains("java.io.IOException: TEST-IO-EXCEPTION-1"));
- assertTrue("Stack trace does not contain second suppressed Exception: " + trace,
- trace.contains("java.io.IOException: TEST-IO-EXCEPTION-2"));
- }
+ assertTrue("Stack trace does not contain first suppressed Exception: " + trace,
+ trace.contains("java.io.IOException: TEST-IO-EXCEPTION-1"));
+ assertTrue("Stack trace does not contain second suppressed Exception: " + trace,
+ trace.contains("java.io.IOException: TEST-IO-EXCEPTION-2"));
} catch (IOException e2) {
fail("IOException should not be thrown here");
}
@@ -85,10 +83,8 @@ public class TestIOUtils extends LuceneTestCase {
System.out.println("TestIOUtils.testSuppressedExceptions: Thrown Exception stack trace:");
System.out.println(trace);
}
- if (Constants.JRE_IS_MINIMUM_JAVA7) {
- assertTrue("Stack trace does not contain suppressed Exception: " + trace,
- trace.contains("java.io.IOException: TEST-IO-EXCEPTION-2"));
- }
+ assertTrue("Stack trace does not contain suppressed Exception: " + trace,
+ trace.contains("java.io.IOException: TEST-IO-EXCEPTION-2"));
}
}