8138672: Math. negativeZeroFloatBits and Math. negativeZeroDoubleBits should be final

Reviewed-by: psandoz, bpb
This commit is contained in:
Joe Darcy 2017-05-04 20:43:00 -07:00
parent e3fd29ca54
commit 71a6eb611b

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2017, 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
@ -1442,8 +1442,8 @@ public final class Math {
}
// Use raw bit-wise conversions on guaranteed non-NaN arguments.
private static long negativeZeroFloatBits = Float.floatToRawIntBits(-0.0f);
private static long negativeZeroDoubleBits = Double.doubleToRawLongBits(-0.0d);
private static final long negativeZeroFloatBits = Float.floatToRawIntBits(-0.0f);
private static final long negativeZeroDoubleBits = Double.doubleToRawLongBits(-0.0d);
/**
* Returns the greater of two {@code float} values. That is,