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 35f3cd9bd9
commit 97c9783802
1 changed files with 6 additions and 4 deletions

View File

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