From 97c97838022efcac8ccbcffb5edf5735605fdf17 Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Wed, 2 Nov 2016 06:48:29 -0400 Subject: [PATCH] LUCENE-7135: only use OS_ARCH if we couldn't access sun.arch.data.model --- .../src/java/org/apache/lucene/util/Constants.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 e6a96096616..007ef85ba6b 100644 --- a/lucene/core/src/java/org/apache/lucene/util/Constants.java +++ b/lucene/core/src/java/org/apache/lucene/util/Constants.java @@ -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; }