mirror of https://github.com/apache/lucene.git
LUCENE-7135: work around security manager when checking for 32/64 bit JVM
This commit is contained in:
parent
dbc2bc7ce8
commit
813b685565
|
@ -110,6 +110,10 @@ Bug Fixes
|
|||
* LUCENE-7429: AnalyzerWrapper can now modify the normalization chain too and
|
||||
DelegatingAnalyzerWrapper does the right thing automatically. (Adrien Grand)
|
||||
|
||||
* Lucene's check for 32 or 64 bit JVM now works around security
|
||||
manager blocking access to some properties (Aaron Madlon-Kay via
|
||||
Mike McCandless)
|
||||
|
||||
Improvements
|
||||
|
||||
* LUCENE-7439: FuzzyQuery now matches all terms within the specified
|
||||
|
|
|
@ -68,16 +68,18 @@ public final class Constants {
|
|||
JVM_MINOR_VERSION = 0;
|
||||
}
|
||||
boolean is64Bit = false;
|
||||
final String x = System.getProperty("sun.arch.data.model");
|
||||
if (x != null) {
|
||||
is64Bit = x.contains("64");
|
||||
} else {
|
||||
if (OS_ARCH != null && OS_ARCH.contains("64")) {
|
||||
String datamodel = null;
|
||||
try {
|
||||
datamodel = System.getProperty("sun.arch.data.model");
|
||||
if (datamodel != null) {
|
||||
is64Bit = datamodel.contains("64");
|
||||
}
|
||||
} catch (SecurityException ex) {}
|
||||
if (datamodel == null && OS_ARCH != null && OS_ARCH.contains("64")) {
|
||||
is64Bit = true;
|
||||
} else {
|
||||
is64Bit = false;
|
||||
}
|
||||
}
|
||||
JRE_IS_64BIT = is64Bit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue