From f9d31d9596edfd615b7326a0b36d75e7d4dc8401 Mon Sep 17 00:00:00 2001 From: horii Date: Wed, 14 Sep 2016 22:11:54 -0400 Subject: [PATCH] 8165231: java.nio.Bits.unaligned() doesn't return true on ppc Reviewed-by: simonis, coffeys --- src/share/classes/java/nio/Bits.java | 5 +++-- src/share/classes/sun/security/provider/ByteArrayAccess.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/share/classes/java/nio/Bits.java b/src/share/classes/java/nio/Bits.java index c7f2b7842..7711b5a58 100644 --- a/src/share/classes/java/nio/Bits.java +++ b/src/share/classes/java/nio/Bits.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -614,7 +614,8 @@ class Bits { // package-private String arch = AccessController.doPrivileged( new sun.security.action.GetPropertyAction("os.arch")); unaligned = arch.equals("i386") || arch.equals("x86") - || arch.equals("amd64") || arch.equals("x86_64"); + || arch.equals("amd64") || arch.equals("x86_64") + || arch.equals("ppc64") || arch.equals("ppc64le"); unalignedKnown = true; return unaligned; } diff --git a/src/share/classes/sun/security/provider/ByteArrayAccess.java b/src/share/classes/sun/security/provider/ByteArrayAccess.java index e06832bf3..e57ba14dd 100644 --- a/src/share/classes/sun/security/provider/ByteArrayAccess.java +++ b/src/share/classes/sun/security/provider/ByteArrayAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,7 +94,7 @@ final class ByteArrayAccess { String arch = java.security.AccessController.doPrivileged (new sun.security.action.GetPropertyAction("os.arch", "")); return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64") - || arch.equals("x86_64"); + || arch.equals("x86_64") || arch.equals("ppc64") || arch.equals("ppc64le"); } /** -- GitLab