diff --git a/src/share/classes/java/lang/Double.java b/src/share/classes/java/lang/Double.java index fd6278a88f8b91b39c9448e118a17421331e981f..7d426180c5db9ece6e9412b5d0d16213573f3a75 100644 --- a/src/share/classes/java/lang/Double.java +++ b/src/share/classes/java/lang/Double.java @@ -276,7 +276,7 @@ public final class Double extends Number implements Comparable { * 7.19.6.1; however, the output of this method is more * tightly specified. */ - if (!FpUtils.isFinite(d) ) + if (!isFinite(d) ) // For infinity and NaN, use the decimal output. return Double.toString(d); else { @@ -548,7 +548,7 @@ public final class Double extends Number implements Comparable { * @return {@code true} if the value of the argument is NaN; * {@code false} otherwise. */ - static public boolean isNaN(double v) { + public static boolean isNaN(double v) { return (v != v); } @@ -560,10 +560,24 @@ public final class Double extends Number implements Comparable { * @return {@code true} if the value of the argument is positive * infinity or negative infinity; {@code false} otherwise. */ - static public boolean isInfinite(double v) { + public static boolean isInfinite(double v) { return (v == POSITIVE_INFINITY) || (v == NEGATIVE_INFINITY); } + /** + * Returns {@code true} if the argument is a finite floating-point + * value; returns {@code false} otherwise (for NaN and infinity + * arguments). + * + * @param d the {@code double} value to be tested + * @return {@code true} if the argument is a finite + * floating-point value, {@code false} otherwise. + * @since 1.8 + */ + public static boolean isFinite(double d) { + return Math.abs(d) <= DoubleConsts.MAX_VALUE; + } + /** * The value of the Double. * diff --git a/src/share/classes/java/lang/Float.java b/src/share/classes/java/lang/Float.java index 7fac24c79f9e3cb338d06e565c595e6f2dd2d47d..6aa381ccebdfd2750e38a8cd51bf92237b4b2908 100644 --- a/src/share/classes/java/lang/Float.java +++ b/src/share/classes/java/lang/Float.java @@ -459,7 +459,7 @@ public final class Float extends Number implements Comparable { * @return {@code true} if the argument is NaN; * {@code false} otherwise. */ - static public boolean isNaN(float v) { + public static boolean isNaN(float v) { return (v != v); } @@ -471,10 +471,25 @@ public final class Float extends Number implements Comparable { * @return {@code true} if the argument is positive infinity or * negative infinity; {@code false} otherwise. */ - static public boolean isInfinite(float v) { + public static boolean isInfinite(float v) { return (v == POSITIVE_INFINITY) || (v == NEGATIVE_INFINITY); } + + /** + * Returns {@code true} if the argument is a finite floating-point + * value; returns {@code false} otherwise (for NaN and infinity + * arguments). + * + * @param f the {@code float} value to be tested + * @return {@code true} if the argument is a finite + * floating-point value, {@code false} otherwise. + * @since 1.8 + */ + public static boolean isFinite(float f) { + return Math.abs(f) <= FloatConsts.MAX_VALUE; + } + /** * The value of the Float. * diff --git a/src/share/classes/java/lang/Math.java b/src/share/classes/java/lang/Math.java index ff9ffe2f09d1e7f4d334e7567d5d3eacd78170c7..059c20213ba35502f06903d6e92aac80cb0803c8 100644 --- a/src/share/classes/java/lang/Math.java +++ b/src/share/classes/java/lang/Math.java @@ -1649,6 +1649,79 @@ public final class Math { } } + /** + * Returns the floating-point value adjacent to {@code d} in + * the direction of negative infinity. This method is + * semantically equivalent to {@code nextAfter(d, + * Double.NEGATIVE_INFINITY)}; however, a + * {@code nextDown} implementation may run faster than its + * equivalent {@code nextAfter} call. + * + *

Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is negative infinity, the result is + * negative infinity. + * + *
  • If the argument is zero, the result is + * {@code -Double.MIN_VALUE} + * + *
+ * + * @param d starting floating-point value + * @return The adjacent floating-point value closer to negative + * infinity. + * @since 1.8 + */ + public static double nextDown(double d) { + if (Double.isNaN(d) || d == Double.NEGATIVE_INFINITY) + return d; + else { + if (d == 0.0) + return -Double.MIN_VALUE; + else + return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + + ((d > 0.0d)?-1L:+1L)); + } + } + + /** + * Returns the floating-point value adjacent to {@code f} in + * the direction of negative infinity. This method is + * semantically equivalent to {@code nextAfter(f, + * Float.NEGATIVE_INFINITY)}; however, a + * {@code nextDown} implementation may run faster than its + * equivalent {@code nextAfter} call. + * + *

Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is negative infinity, the result is + * negative infinity. + * + *
  • If the argument is zero, the result is + * {@code -Float.MIN_VALUE} + * + *
+ * + * @param f starting floating-point value + * @return The adjacent floating-point value closer to negative + * infinity. + * @since 1.8 + */ + public static float nextDown(float f) { + if (Float.isNaN(f) || f == Float.NEGATIVE_INFINITY) + return f; + else { + if (f == 0.0f) + return -Float.MIN_VALUE; + else + return Float.intBitsToFloat(Float.floatToRawIntBits(f) + + ((f > 0.0f)?-1:+1)); + } + } /** * Return {@code d} × diff --git a/src/share/classes/java/lang/StrictMath.java b/src/share/classes/java/lang/StrictMath.java index bb4cf219346bc25177f9044e1c302d8f338fac26..723f1ec4cd34c383bf986c1270128650b3b2ab37 100644 --- a/src/share/classes/java/lang/StrictMath.java +++ b/src/share/classes/java/lang/StrictMath.java @@ -1396,6 +1396,64 @@ public final class StrictMath { return Math.nextUp(f); } + /** + * Returns the floating-point value adjacent to {@code d} in + * the direction of negative infinity. This method is + * semantically equivalent to {@code nextAfter(d, + * Double.NEGATIVE_INFINITY)}; however, a + * {@code nextDown} implementation may run faster than its + * equivalent {@code nextAfter} call. + * + *

Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is negative infinity, the result is + * negative infinity. + * + *
  • If the argument is zero, the result is + * {@code -Double.MIN_VALUE} + * + *
+ * + * @param d starting floating-point value + * @return The adjacent floating-point value closer to negative + * infinity. + * @since 1.8 + */ + public static double nextDown(double d) { + return Math.nextDown(d); + } + + /** + * Returns the floating-point value adjacent to {@code f} in + * the direction of negative infinity. This method is + * semantically equivalent to {@code nextAfter(f, + * Float.NEGATIVE_INFINITY)}; however, a + * {@code nextDown} implementation may run faster than its + * equivalent {@code nextAfter} call. + * + *

Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is negative infinity, the result is + * negative infinity. + * + *
  • If the argument is zero, the result is + * {@code -Float.MIN_VALUE} + * + *
+ * + * @param f starting floating-point value + * @return The adjacent floating-point value closer to negative + * infinity. + * @since 1.8 + */ + public static float nextDown(float f) { + return Math.nextDown(f); + } + /** * Return {@code d} × * 2{@code scaleFactor} rounded as if performed diff --git a/src/share/classes/java/util/Formatter.java b/src/share/classes/java/util/Formatter.java index 05ca8cc6ef3f84b556463012b3715dddeffe2a31..038ec6eabf0dca469fd46857b7064d7aceaba8f6 100644 --- a/src/share/classes/java/util/Formatter.java +++ b/src/share/classes/java/util/Formatter.java @@ -50,7 +50,6 @@ import java.text.NumberFormat; import java.util.regex.Matcher; import java.util.regex.Pattern; -import sun.misc.FpUtils; import sun.misc.DoubleConsts; import sun.misc.FormattedFloatingDecimal; @@ -3417,7 +3416,7 @@ public final class Formatter implements Closeable, Flushable { // Method assumes that d > 0. private String hexDouble(double d, int prec) { // Let Double.toHexString handle simple cases - if(!FpUtils.isFinite(d) || d == 0.0 || prec == 0 || prec >= 13) + if(!Double.isFinite(d) || d == 0.0 || prec == 0 || prec >= 13) // remove "0x" return Double.toHexString(d).substring(2); else { diff --git a/src/share/classes/sun/misc/FpUtils.java b/src/share/classes/sun/misc/FpUtils.java index 9e03067cbefc8773662326188af3feeb75aa4dc4..a874c80f62809add2a2bc27de53c64f16922d3b7 100644 --- a/src/share/classes/sun/misc/FpUtils.java +++ b/src/share/classes/sun/misc/FpUtils.java @@ -202,9 +202,11 @@ public class FpUtils { * @param d the {@code double} value to be tested * @return {@code true} if the argument is a finite * floating-point value, {@code false} otherwise. + * @deprecated Use Double.isFinite. */ + @Deprecated public static boolean isFinite(double d) { - return Math.abs(d) <= DoubleConsts.MAX_VALUE; + return Double.isFinite(d); } /** @@ -215,9 +217,11 @@ public class FpUtils { * @param f the {@code float} value to be tested * @return {@code true} if the argument is a finite * floating-point value, {@code false} otherwise. + * @deprecated Use Float.isFinite. */ + @Deprecated public static boolean isFinite(float f) { - return Math.abs(f) <= FloatConsts.MAX_VALUE; + return Float.isFinite(f); } /** @@ -746,17 +750,11 @@ public class FpUtils { * @return The adjacent floating-point value closer to negative * infinity. * @author Joseph D. Darcy + * @deprecated Use Math.nextDown. */ + @Deprecated public static double nextDown(double d) { - if( isNaN(d) || d == Double.NEGATIVE_INFINITY) - return d; - else { - if (d == 0.0) - return -Double.MIN_VALUE; - else - return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + - ((d > 0.0d)?-1L:+1L)); - } + return Math.nextDown(d); } /** @@ -783,17 +781,11 @@ public class FpUtils { * @return The adjacent floating-point value closer to negative * infinity. * @author Joseph D. Darcy + * @deprecated Use Math.nextDown. */ + @Deprecated public static double nextDown(float f) { - if( isNaN(f) || f == Float.NEGATIVE_INFINITY) - return f; - else { - if (f == 0.0f) - return -Float.MIN_VALUE; - else - return Float.intBitsToFloat(Float.floatToRawIntBits(f) + - ((f > 0.0f)?-1:+1)); - } + return Math.nextDown(f); } /** diff --git a/test/java/lang/Double/ParseHexFloatingPoint.java b/test/java/lang/Double/ParseHexFloatingPoint.java index 99fc6769b2217a7126c87de5d68cf74d2e0f19ff..57c3d69adf06c8c595805b6bf8f06b1840bacfbd 100644 --- a/test/java/lang/Double/ParseHexFloatingPoint.java +++ b/test/java/lang/Double/ParseHexFloatingPoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -30,7 +30,6 @@ import java.util.regex.*; -import sun.misc.FpUtils; import sun.misc.DoubleConsts; public class ParseHexFloatingPoint { @@ -227,7 +226,7 @@ public class ParseHexFloatingPoint { new PairSD("0x1.000000000000001p-1075", Double.MIN_VALUE), // More subnormal rounding tests - new PairSD("0x0.fffffffffffff7fffffp-1022", FpUtils.nextDown(DoubleConsts.MIN_NORMAL)), + new PairSD("0x0.fffffffffffff7fffffp-1022", Math.nextDown(DoubleConsts.MIN_NORMAL)), new PairSD("0x0.fffffffffffff8p-1022", DoubleConsts.MIN_NORMAL), new PairSD("0x0.fffffffffffff800000001p-1022",DoubleConsts.MIN_NORMAL), new PairSD("0x0.fffffffffffff80000000000000001p-1022",DoubleConsts.MIN_NORMAL), @@ -242,10 +241,10 @@ public class ParseHexFloatingPoint { new PairSD("0x1.fffffffffffff8p1023", infinityD), new PairSD("0x1.fffffffffffff8000001p1023", infinityD), - new PairSD("0x1.ffffffffffffep1023", FpUtils.nextDown(Double.MAX_VALUE)), - new PairSD("0x1.ffffffffffffe0000p1023", FpUtils.nextDown(Double.MAX_VALUE)), - new PairSD("0x1.ffffffffffffe8p1023", FpUtils.nextDown(Double.MAX_VALUE)), - new PairSD("0x1.ffffffffffffe7p1023", FpUtils.nextDown(Double.MAX_VALUE)), + new PairSD("0x1.ffffffffffffep1023", Math.nextDown(Double.MAX_VALUE)), + new PairSD("0x1.ffffffffffffe0000p1023", Math.nextDown(Double.MAX_VALUE)), + new PairSD("0x1.ffffffffffffe8p1023", Math.nextDown(Double.MAX_VALUE)), + new PairSD("0x1.ffffffffffffe7p1023", Math.nextDown(Double.MAX_VALUE)), new PairSD("0x1.ffffffffffffeffffffp1023", Double.MAX_VALUE), new PairSD("0x1.ffffffffffffe8000001p1023", Double.MAX_VALUE), }; @@ -284,8 +283,8 @@ public class ParseHexFloatingPoint { }; double [] answers = { - FpUtils.nextDown(FpUtils.nextDown(2.0)), - FpUtils.nextDown(2.0), + Math.nextDown(Math.nextDown(2.0)), + Math.nextDown(2.0), 2.0 }; diff --git a/test/java/lang/Math/CeilAndFloorTests.java b/test/java/lang/Math/CeilAndFloorTests.java index 7d7e2fd60459fb10ea6139077858dcf56f8a8c87..b828b7ab6aaa440ee4376b072b1667262de00cf8 100644 --- a/test/java/lang/Math/CeilAndFloorTests.java +++ b/test/java/lang/Math/CeilAndFloorTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -27,7 +27,6 @@ * @summary Check for correct implementation of Math.ceil and Math.floor */ -import sun.misc.FpUtils; import sun.misc.DoubleConsts; public class CeilAndFloorTests { @@ -69,7 +68,7 @@ public class CeilAndFloorTests { for(int i = Double.MIN_EXPONENT; i <= Double.MAX_EXPONENT; i++) { double powerOfTwo = Math.scalb(1.0, i); - double neighborDown = FpUtils.nextDown(powerOfTwo); + double neighborDown = Math.nextDown(powerOfTwo); double neighborUp = Math.nextUp(powerOfTwo); if (i < 0) { @@ -114,7 +113,7 @@ public class CeilAndFloorTests { for(int i = -(0x10000); i <= 0x10000; i++) { double d = (double) i; - double neighborDown = FpUtils.nextDown(d); + double neighborDown = Math.nextDown(d); double neighborUp = Math.nextUp(d); failures += testCeilCase( d, d); @@ -140,8 +139,8 @@ public class CeilAndFloorTests { double [][] testCases = { { Double.MIN_VALUE, 1.0}, {-Double.MIN_VALUE, -0.0}, - { FpUtils.nextDown(DoubleConsts.MIN_NORMAL), 1.0}, - {-FpUtils.nextDown(DoubleConsts.MIN_NORMAL), -0.0}, + { Math.nextDown(DoubleConsts.MIN_NORMAL), 1.0}, + {-Math.nextDown(DoubleConsts.MIN_NORMAL), -0.0}, { DoubleConsts.MIN_NORMAL, 1.0}, {-DoubleConsts.MIN_NORMAL, -0.0}, @@ -157,8 +156,8 @@ public class CeilAndFloorTests { { 2.5, 3.0}, {-2.5, -2.0}, - { FpUtils.nextDown(1.0), 1.0}, - { FpUtils.nextDown(-1.0), -1.0}, + { Math.nextDown(1.0), 1.0}, + { Math.nextDown(-1.0), -1.0}, { Math.nextUp(1.0), 2.0}, { Math.nextUp(-1.0), -0.0}, @@ -166,17 +165,17 @@ public class CeilAndFloorTests { { 0x1.0p51, 0x1.0p51}, {-0x1.0p51, -0x1.0p51}, - { FpUtils.nextDown(0x1.0p51), 0x1.0p51}, + { Math.nextDown(0x1.0p51), 0x1.0p51}, {-Math.nextUp(0x1.0p51), -0x1.0p51}, { Math.nextUp(0x1.0p51), 0x1.0p51+1}, - {-FpUtils.nextDown(0x1.0p51), -0x1.0p51+1}, + {-Math.nextDown(0x1.0p51), -0x1.0p51+1}, - { FpUtils.nextDown(0x1.0p52), 0x1.0p52}, + { Math.nextDown(0x1.0p52), 0x1.0p52}, {-Math.nextUp(0x1.0p52), -0x1.0p52-1.0}, { Math.nextUp(0x1.0p52), 0x1.0p52+1.0}, - {-FpUtils.nextDown(0x1.0p52), -0x1.0p52+1.0}, + {-Math.nextDown(0x1.0p52), -0x1.0p52+1.0}, }; for(double[] testCase : testCases) { diff --git a/test/java/lang/Math/CubeRootTests.java b/test/java/lang/Math/CubeRootTests.java index 8b82183377c92b853d0fed20cd3961c7eb206f54..9b180d11b4365d6b6319e773d2870b8a1bdb7fcd 100644 --- a/test/java/lang/Math/CubeRootTests.java +++ b/test/java/lang/Math/CubeRootTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011 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 @@ -28,7 +28,6 @@ * @author Joseph D. Darcy */ -import sun.misc.FpUtils; import sun.misc.DoubleConsts; public class CubeRootTests { @@ -245,8 +244,8 @@ public class CubeRootTests { double pc = Math.scalb(1.0, 3*i); pcNeighbors[2] = pc; - pcNeighbors[1] = FpUtils.nextDown(pc); - pcNeighbors[0] = FpUtils.nextDown(pcNeighbors[1]); + pcNeighbors[1] = Math.nextDown(pc); + pcNeighbors[0] = Math.nextDown(pcNeighbors[1]); pcNeighbors[3] = Math.nextUp(pc); pcNeighbors[4] = Math.nextUp(pcNeighbors[3]); @@ -284,8 +283,8 @@ public class CubeRootTests { double pc = Math.scalb(1.0, 3*i); pcNeighbors[2] = pc; - pcNeighbors[1] = FpUtils.nextDown(pc); - pcNeighbors[0] = FpUtils.nextDown(pcNeighbors[1]); + pcNeighbors[1] = Math.nextDown(pc); + pcNeighbors[0] = Math.nextDown(pcNeighbors[1]); pcNeighbors[3] = Math.nextUp(pc); pcNeighbors[4] = Math.nextUp(pcNeighbors[3]); diff --git a/test/java/lang/Math/Expm1Tests.java b/test/java/lang/Math/Expm1Tests.java index f0f55d43d9ed0088473de07c3bb02554b6262422..b10934e4f1a0beacc80dca12783bb0df8c21e8ae 100644 --- a/test/java/lang/Math/Expm1Tests.java +++ b/test/java/lang/Math/Expm1Tests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011 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 @@ -29,7 +29,6 @@ */ import sun.misc.DoubleConsts; -import sun.misc.FpUtils; /* * The Taylor expansion of expxm1(x) = exp(x) -1 is @@ -143,8 +142,8 @@ public class Expm1Tests { double pc = StrictMath.log(2)*i; pcNeighbors[2] = pc; - pcNeighbors[1] = FpUtils.nextDown(pc); - pcNeighbors[0] = FpUtils.nextDown(pcNeighbors[1]); + pcNeighbors[1] = Math.nextDown(pc); + pcNeighbors[0] = Math.nextDown(pcNeighbors[1]); pcNeighbors[3] = Math.nextUp(pc); pcNeighbors[4] = Math.nextUp(pcNeighbors[3]); diff --git a/test/java/lang/Math/HyperbolicTests.java b/test/java/lang/Math/HyperbolicTests.java index d82da690ea00cd51ebc6bb39ea1543552f2b29db..0899df89d5afea09415c275c8cd58ecb9542dae7 100644 --- a/test/java/lang/Math/HyperbolicTests.java +++ b/test/java/lang/Math/HyperbolicTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011 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 @@ -29,7 +29,6 @@ */ import sun.misc.DoubleConsts; -import sun.misc.FpUtils; public class HyperbolicTests { private HyperbolicTests(){} @@ -280,7 +279,7 @@ public class HyperbolicTests { long trans22 = Double.doubleToLongBits(22.0); // (approximately) largest value such that exp shouldn't // overflow - long transExpOvfl = Double.doubleToLongBits(FpUtils.nextDown(709.7827128933841)); + long transExpOvfl = Double.doubleToLongBits(Math.nextDown(709.7827128933841)); for(long i = trans22; i < transExpOvfl; @@ -639,7 +638,7 @@ public class HyperbolicTests { long trans22 = Double.doubleToLongBits(22.0); // (approximately) largest value such that exp shouldn't // overflow - long transExpOvfl = Double.doubleToLongBits(FpUtils.nextDown(709.7827128933841)); + long transExpOvfl = Double.doubleToLongBits(Math.nextDown(709.7827128933841)); for(long i = trans22; i < transExpOvfl; diff --git a/test/java/lang/Math/HypotTests.java b/test/java/lang/Math/HypotTests.java index 465497e0a4b756294a616b641aef8053ecf25bf3..d48a6f938a040a32850a319e5f1e18a11eeca69c 100644 --- a/test/java/lang/Math/HypotTests.java +++ b/test/java/lang/Math/HypotTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -156,8 +156,8 @@ public class HypotTests { double pc = Math.scalb(1.0, i); pcNeighbors[2] = pc; - pcNeighbors[1] = FpUtils.nextDown(pc); - pcNeighbors[0] = FpUtils.nextDown(pcNeighbors[1]); + pcNeighbors[1] = Math.nextDown(pc); + pcNeighbors[0] = Math.nextDown(pcNeighbors[1]); pcNeighbors[3] = Math.nextUp(pc); pcNeighbors[4] = Math.nextUp(pcNeighbors[3]); diff --git a/test/java/lang/Math/IeeeRecommendedTests.java b/test/java/lang/Math/IeeeRecommendedTests.java index 68e8a5ce6c4e729a9cd3ba583326d6f5fd52038d..f776bbf5b1cc9d730cbcba0d15faefb758fc2a3c 100644 --- a/test/java/lang/Math/IeeeRecommendedTests.java +++ b/test/java/lang/Math/IeeeRecommendedTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -623,8 +623,11 @@ public class IeeeRecommendedTests { }; for(int i = 0; i < testCases.length; i++) { - failures+=Tests.test("FpUtils.nextDown(float)", - testCases[i][0], FpUtils.nextDown(testCases[i][0]), testCases[i][1]); + failures+=Tests.test("Math.nextDown(float)", + testCases[i][0], Math.nextDown(testCases[i][0]), testCases[i][1]); + + failures+=Tests.test("StrictMath.nextDown(float)", + testCases[i][0], StrictMath.nextDown(testCases[i][0]), testCases[i][1]); } return failures; @@ -659,8 +662,11 @@ public class IeeeRecommendedTests { }; for(int i = 0; i < testCases.length; i++) { - failures+=Tests.test("FpUtils.nextDown(double)", - testCases[i][0], FpUtils.nextDown(testCases[i][0]), testCases[i][1]); + failures+=Tests.test("Math.nextDown(double)", + testCases[i][0], Math.nextDown(testCases[i][0]), testCases[i][1]); + + failures+=Tests.test("StrictMath.nextDown(double)", + testCases[i][0], StrictMath.nextDown(testCases[i][0]), testCases[i][1]); } return failures; @@ -706,8 +712,8 @@ public class IeeeRecommendedTests { FpUtils.isNaN(testCases[i]), (i ==0)); // isFinite - failures+=Tests.test("FpUtils.isFinite(float)", testCases[i], - FpUtils.isFinite(testCases[i]), (i >= 3)); + failures+=Tests.test("Float.isFinite(float)", testCases[i], + Float.isFinite(testCases[i]), (i >= 3)); // isInfinite failures+=Tests.test("FpUtils.isInfinite(float)", testCases[i], @@ -756,8 +762,8 @@ public class IeeeRecommendedTests { FpUtils.isNaN(testCases[i]), (i ==0)); // isFinite - failures+=Tests.test("FpUtils.isFinite(double)", testCases[i], - FpUtils.isFinite(testCases[i]), (i >= 3)); + failures+=Tests.test("Double.isFinite(double)", testCases[i], + Double.isFinite(testCases[i]), (i >= 3)); // isInfinite failures+=Tests.test("FpUtils.isInfinite(double)", testCases[i], diff --git a/test/java/lang/Math/Log10Tests.java b/test/java/lang/Math/Log10Tests.java index c245a7477ff65c87fbb4629b6d64397d959d0331..a9f169a569a009c206b568fe7e6adcc2e2984766 100644 --- a/test/java/lang/Math/Log10Tests.java +++ b/test/java/lang/Math/Log10Tests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011 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 @@ -28,7 +28,6 @@ * @author Joseph D. Darcy */ -import sun.misc.FpUtils; import sun.misc.DoubleConsts; public class Log10Tests { @@ -98,13 +97,13 @@ public class Log10Tests { // within a few ulps of log(x)/log(10) for(int i = 0; i < 10000; i++) { double input = Double.longBitsToDouble(rand.nextLong()); - if(! FpUtils.isFinite(input)) + if(! Double.isFinite(input)) continue; // avoid testing NaN and infinite values else { input = Math.abs(input); double expected = StrictMath.log(input)/LN_10; - if( ! FpUtils.isFinite(expected)) + if( ! Double.isFinite(expected)) continue; // if log(input) overflowed, try again else { double result; @@ -154,15 +153,15 @@ public class Log10Tests { if (i == 0) { input[half] = 1.0; up = Math.nextUp(1.0); - down = FpUtils.nextDown(1.0); + down = Math.nextDown(1.0); } else { input[half + i] = up; input[half - i] = down; up = Math.nextUp(up); - down = FpUtils.nextDown(down); + down = Math.nextDown(down); } } - input[0] = FpUtils.nextDown(input[1]); + input[0] = Math.nextDown(input[1]); for(int i = 0; i < neighbors.length; i++) { neighbors[i] = Math.log10(input[i]); diff --git a/test/java/lang/Math/Log1pTests.java b/test/java/lang/Math/Log1pTests.java index bd5f0e0aeab4f6516390ecfff935d0f5383ef740..f15a92b5887f39d302d540a21b162c8f60541519 100644 --- a/test/java/lang/Math/Log1pTests.java +++ b/test/java/lang/Math/Log1pTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011 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 @@ -135,8 +135,8 @@ public class Log1pTests { double pc = StrictMath.pow(Math.E, i) - 1; pcNeighbors[2] = pc; - pcNeighbors[1] = FpUtils.nextDown(pc); - pcNeighbors[0] = FpUtils.nextDown(pcNeighbors[1]); + pcNeighbors[1] = Math.nextDown(pc); + pcNeighbors[0] = Math.nextDown(pcNeighbors[1]); pcNeighbors[3] = Math.nextUp(pc); pcNeighbors[4] = Math.nextUp(pcNeighbors[3]); @@ -202,5 +202,4 @@ public class Log1pTests { throw new RuntimeException(); } } - } diff --git a/test/java/lang/Math/Rint.java b/test/java/lang/Math/Rint.java index 09821c82b0bcfb75d42ad2264c432cf2270cdb23..c362c4f9016e91aa6ed26f728c07ffab10c1bc68 100644 --- a/test/java/lang/Math/Rint.java +++ b/test/java/lang/Math/Rint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 @@ -25,10 +25,8 @@ * @test * @bug 4101566 4831589 * @summary Check for correct implementation of Math.rint(double) - * */ -import sun.misc.FpUtils; import sun.misc.DoubleConsts; public class Rint { @@ -53,22 +51,22 @@ public class Rint { double [][] testCases = { {0.0, 0.0}, {Double.MIN_VALUE, 0.0}, - {FpUtils.nextDown(DoubleConsts.MIN_NORMAL), 0.0}, + {Math.nextDown(DoubleConsts.MIN_NORMAL), 0.0}, {DoubleConsts.MIN_NORMAL, 0.0}, {0.2, 0.0}, - {FpUtils.nextDown(0.5), 0.0}, - { 0.5, 0.0}, + {Math.nextDown(0.5), 0.0}, + { 0.5, 0.0}, { Math.nextUp(0.5), 1.0}, {0.7, 1.0}, - {FpUtils.nextDown(1.0), 1.0}, - { 1.0, 1.0}, + {Math.nextDown(1.0), 1.0}, + { 1.0, 1.0}, { Math.nextUp(1.0), 1.0}, - {FpUtils.nextDown(1.5), 1.0}, - { 1.5, 2.0}, + {Math.nextDown(1.5), 1.0}, + { 1.5, 2.0}, { Math.nextUp(1.5), 2.0}, {4.2, 4.0}, @@ -82,7 +80,7 @@ public class Rint { {150000.75, 150001.0}, {300000.5, 300000.0}, {Math.nextUp(300000.5), 300001.0}, - {FpUtils.nextDown(300000.75), 300001.0}, + {Math.nextDown(300000.75), 300001.0}, {300000.75, 300001.0}, {Math.nextUp(300000.75), 300001.0}, {300000.99, 300001.0}, @@ -91,7 +89,7 @@ public class Rint { {524287.75, 524288.0}, //(2^19 -1) + 0.75 {524288.75, 524289.0}, - {FpUtils.nextDown(twoToThe52), twoToThe52}, + {Math.nextDown(twoToThe52), twoToThe52}, {twoToThe52, twoToThe52}, {Math.nextUp(twoToThe52), Math.nextUp(twoToThe52)}, @@ -118,5 +116,4 @@ public class Rint { throw new RuntimeException(); } } - } diff --git a/test/java/util/Formatter/Basic-X.java.template b/test/java/util/Formatter/Basic-X.java.template index 20c63b2f1062d371462cfcd87e83ee67e76ee2da..55b24097f6e445ae7e411157673c1a0d2ecc0c53 100644 --- a/test/java/util/Formatter/Basic-X.java.template +++ b/test/java/util/Formatter/Basic-X.java.template @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -36,7 +36,6 @@ import java.math.BigInteger; import java.text.DateFormatSymbols; import java.util.*; #if[double] -import sun.misc.FpUtils; import sun.misc.DoubleConsts; #end[double] @@ -1301,9 +1300,9 @@ public class Basic$Type$ extends Basic { test("%.11a", "0x1.00000000000p-1022", DoubleConsts.MIN_NORMAL); test("%.1a", "0x1.0p-1022", DoubleConsts.MIN_NORMAL); test("%.11a", "0x1.00000000000p-1022", - FpUtils.nextDown(DoubleConsts.MIN_NORMAL)); + Math.nextDown(DoubleConsts.MIN_NORMAL)); test("%.1a", "0x1.0p-1022", - FpUtils.nextDown(DoubleConsts.MIN_NORMAL)); + Math.nextDown(DoubleConsts.MIN_NORMAL)); test("%.11a", "0x1.ffffffffffep-1023", Double.parseDouble("0x0.fffffffffffp-1022")); test("%.1a", "0x1.0p-1022", diff --git a/test/java/util/Formatter/BasicBigDecimal.java b/test/java/util/Formatter/BasicBigDecimal.java index 5a0510adadc73c003665fe838a8d8ff8c9e36059..afc446ae4b0ef2383a7a7153f00afa2373f7e163 100644 --- a/test/java/util/Formatter/BasicBigDecimal.java +++ b/test/java/util/Formatter/BasicBigDecimal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicBigInteger.java b/test/java/util/Formatter/BasicBigInteger.java index f3b763f5d7655d4086e6fa938ce28261c8556735..af3cac5e47b75bb1a3f2ce2bc38b5b508186ba79 100644 --- a/test/java/util/Formatter/BasicBigInteger.java +++ b/test/java/util/Formatter/BasicBigInteger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicBoolean.java b/test/java/util/Formatter/BasicBoolean.java index 76e8ee1a4c02ff542a99a8dc0eb495f910434045..192a2192460037c1c170952bb68ddba14687e956 100644 --- a/test/java/util/Formatter/BasicBoolean.java +++ b/test/java/util/Formatter/BasicBoolean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicBooleanObject.java b/test/java/util/Formatter/BasicBooleanObject.java index bc9faabf1705d009f0f474fb4f1b6e9f9afe0c30..830fe72978827944226f97a1ae25a2e5d9019414 100644 --- a/test/java/util/Formatter/BasicBooleanObject.java +++ b/test/java/util/Formatter/BasicBooleanObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicByte.java b/test/java/util/Formatter/BasicByte.java index 73606afbf11353df23ee9ded917d65dcb50f75ec..4887e948b1167f80e0e562da5863f020e92d0df8 100644 --- a/test/java/util/Formatter/BasicByte.java +++ b/test/java/util/Formatter/BasicByte.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicByteObject.java b/test/java/util/Formatter/BasicByteObject.java index 80b2f32a32d1a6f2be4015cd58e4a7c3c60d8afc..9a6dd23adbc5ebe44e4c7d4ebd442a947f0a4cb2 100644 --- a/test/java/util/Formatter/BasicByteObject.java +++ b/test/java/util/Formatter/BasicByteObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicChar.java b/test/java/util/Formatter/BasicChar.java index 88b6587fc7fd2ce44e395402696459bec6509019..8fe4bd52323c21ad806c6e51299962982f81e324 100644 --- a/test/java/util/Formatter/BasicChar.java +++ b/test/java/util/Formatter/BasicChar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicCharObject.java b/test/java/util/Formatter/BasicCharObject.java index d22fb7d2fa3a6fb7758de0e26006c029e7f435fb..744103e8bd2d8b0e253c0a6b764a0dada3b3d120 100644 --- a/test/java/util/Formatter/BasicCharObject.java +++ b/test/java/util/Formatter/BasicCharObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicDateTime.java b/test/java/util/Formatter/BasicDateTime.java index dadbf9aaf64838b2c39add639b9aff45f46d14ed..131d7234b65d4dc3ab67709ff649a02da38964ac 100644 --- a/test/java/util/Formatter/BasicDateTime.java +++ b/test/java/util/Formatter/BasicDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; import static java.util.SimpleTimeZone.*; diff --git a/test/java/util/Formatter/BasicDouble.java b/test/java/util/Formatter/BasicDouble.java index d61bf4240751f8ae51420ba5acfbe72c88771fe4..d33eb4d6c5f72651566146e2b0549c50c87d7f95 100644 --- a/test/java/util/Formatter/BasicDouble.java +++ b/test/java/util/Formatter/BasicDouble.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -36,7 +36,6 @@ import java.math.BigInteger; import java.text.DateFormatSymbols; import java.util.*; -import sun.misc.FpUtils; import sun.misc.DoubleConsts; @@ -1301,9 +1300,9 @@ public class BasicDouble extends Basic { test("%.11a", "0x1.00000000000p-1022", DoubleConsts.MIN_NORMAL); test("%.1a", "0x1.0p-1022", DoubleConsts.MIN_NORMAL); test("%.11a", "0x1.00000000000p-1022", - FpUtils.nextDown(DoubleConsts.MIN_NORMAL)); + Math.nextDown(DoubleConsts.MIN_NORMAL)); test("%.1a", "0x1.0p-1022", - FpUtils.nextDown(DoubleConsts.MIN_NORMAL)); + Math.nextDown(DoubleConsts.MIN_NORMAL)); test("%.11a", "0x1.ffffffffffep-1023", Double.parseDouble("0x0.fffffffffffp-1022")); test("%.1a", "0x1.0p-1022", diff --git a/test/java/util/Formatter/BasicDoubleObject.java b/test/java/util/Formatter/BasicDoubleObject.java index d0c0db12f534b4409d2e04aa647823b9d16512d4..63cec1afe6a4d3d4211f41cdfcd94988a9772d23 100644 --- a/test/java/util/Formatter/BasicDoubleObject.java +++ b/test/java/util/Formatter/BasicDoubleObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicFloat.java b/test/java/util/Formatter/BasicFloat.java index e70da6517874d015e080d33b7ac7c672809366f4..d4e3d7434caa39c9f26fbf7098da0cd5fa0158ec 100644 --- a/test/java/util/Formatter/BasicFloat.java +++ b/test/java/util/Formatter/BasicFloat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicFloatObject.java b/test/java/util/Formatter/BasicFloatObject.java index d68626aeb6bccf0130526e72847fd0514605471e..e0deba7050ef107e52225b663f586a4e25ac8d2a 100644 --- a/test/java/util/Formatter/BasicFloatObject.java +++ b/test/java/util/Formatter/BasicFloatObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicInt.java b/test/java/util/Formatter/BasicInt.java index ac1542f181ac90d43046c666eba018dc22c83410..cc71a40172f09d455e4693ba04ebcc7b1f201b9c 100644 --- a/test/java/util/Formatter/BasicInt.java +++ b/test/java/util/Formatter/BasicInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicIntObject.java b/test/java/util/Formatter/BasicIntObject.java index 092d890cdfb15c6b85faac45bb16f94f562d6d0b..08b6bd56a5cf8b35f94cdbddf0848c568ed70889 100644 --- a/test/java/util/Formatter/BasicIntObject.java +++ b/test/java/util/Formatter/BasicIntObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicLong.java b/test/java/util/Formatter/BasicLong.java index 1983432c06d29d78fa46c0d59ae1653c07da6ff8..b26d6b0a03d7e699576be66dee228f6c42b9339b 100644 --- a/test/java/util/Formatter/BasicLong.java +++ b/test/java/util/Formatter/BasicLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicLongObject.java b/test/java/util/Formatter/BasicLongObject.java index 9daaa1dcdce55aee3e3ddc5adfbf847576c451cd..847b66c8db493c4affa008c9efddcfb268d75a4c 100644 --- a/test/java/util/Formatter/BasicLongObject.java +++ b/test/java/util/Formatter/BasicLongObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicShort.java b/test/java/util/Formatter/BasicShort.java index 0095baceae79dbe8991011227b137bd4f27c31ff..f2b61b121cce614c243d02c8a37efd5fe5a5b634 100644 --- a/test/java/util/Formatter/BasicShort.java +++ b/test/java/util/Formatter/BasicShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*; diff --git a/test/java/util/Formatter/BasicShortObject.java b/test/java/util/Formatter/BasicShortObject.java index 8452b44adccc6a6e16013a339af05630aa6878e0..1ed1263c729cc6f791e3be37bbdd71e6f474e69f 100644 --- a/test/java/util/Formatter/BasicShortObject.java +++ b/test/java/util/Formatter/BasicShortObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 @@ -39,7 +39,6 @@ import java.util.*; - import static java.util.Calendar.*;