Skip to content

Commit

Permalink
LUCENE-7135: only use OS_ARCH if we couldn't access sun.arch.data.model
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemccand committed Nov 2, 2016
1 parent 650de1e commit a66a445
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lucene/core/src/java/org/apache/lucene/util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ private Constants() {} // can't construct
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;
}
Expand Down

0 comments on commit a66a445

Please sign in to comment.