From 632161b299ac37a598083b1c2995e9becbddc33c Mon Sep 17 00:00:00 2001 From: samelamin Date: Thu, 30 Mar 2017 10:58:05 +0100 Subject: [PATCH] use equals as per feedback from pr --- .../unsafe/src/main/java/org/apache/spark/unsafe/Platform.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java b/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java index f1d6c8917b925..ba35cf250e482 100644 --- a/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java +++ b/common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java @@ -47,7 +47,7 @@ public final class Platform { static { boolean _unaligned; String arch = System.getProperty("os.arch", ""); - if (arch.matches("^(ppc64le | ppc64)$")) { + if (arch.equals("ppc64le") || arch.equals("ppc64")) { // Since java.nio.Bits.unaligned() doesn't return true on ppc (See JDK-8165231), but ppc64 and ppc64le support it _unaligned = true; } else {