LUCENE-7135: only use OS_ARCH if we couldn't access sun.arch.data.model

This commit is contained in:
Mike McCandless 2016-11-02 06:48:29 -04:00
parent 69e654b373
commit 92f56ea9dd
1 changed files with 6 additions and 4 deletions

View File

@ -75,10 +75,12 @@ public final class Constants {
is64Bit = datamodel.contains("64");
}
} catch (SecurityException ex) {}
if (datamodel == null && OS_ARCH != null && OS_ARCH.contains("64")) {
is64Bit = true;
} else {
is64Bit = false;
if (datamodel == null) {
if (OS_ARCH != null && OS_ARCH.contains("64")) {
is64Bit = true;
} else {
is64Bit = false;
}
}
JRE_IS_64BIT = is64Bit;
}