# HG changeset patch # User duke # Date 1499280882 -7200 # Node ID 7974c792d22f736d0f51d6189e64b5ccc30494fe # Parent bd51fb7587782b5ee03e29d7d79fd4e57a293bbe# Parent 44321d0cde3daecc1441052bb6fc5c6a17d6444c Merge diff -r bd51fb758778 -r 7974c792d22f .hgtags-top-repo --- a/.hgtags-top-repo Mon Oct 19 00:25:01 2015 -0700 +++ b/.hgtags-top-repo Wed Jul 05 20:54:42 2017 +0200 @@ -329,3 +329,4 @@ 1c8134475511ffe6726677e1418a89a7a45e92d6 jdk9-b84 1f345217c9bab05f192d00cf1665b3286c49ccdb jdk9-b85 2aa1daf98d3e2ee37f20f6858c53cc37020f6937 jdk9-b86 +fd4f4f7561074dc0dbc1772c8489c7b902b6b8a9 jdk9-b87 diff -r bd51fb758778 -r 7974c792d22f common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Mon Oct 19 00:25:01 2015 -0700 +++ b/common/autoconf/generated-configure.sh Wed Jul 05 20:54:42 2017 +0200 @@ -4587,7 +4587,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1444224363 +DATE_WHEN_GENERATED=1444643341 ############################################################################### # @@ -46678,10 +46678,24 @@ X_CFLAGS= X_LIBS= else - # Check if the user has specified sysroot, but not --x-includes or --x-libraries. - # Make a simple check for the libraries at the sysroot, and setup --x-includes and - # --x-libraries for the sysroot, if that seems to be correct. - if test "x$OPENJDK_TARGET_OS" = "xlinux"; then + + if test "x${with_x}" = xno; then + as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5 + fi + + if test "x${with_x}" != x && test "x${with_x}" != xyes; then + # The user has specified a X11 base directory. Use it for includes and + # libraries, unless explicitely overridden. + if test "x$x_includes" = xNONE; then + x_includes="${with_x}/include" + fi + if test "x$x_libraries" = xNONE; then + x_libraries="${with_x}/lib" + fi + else + # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries. + # Make a simple check for the libraries at the sysroot, and setup --x-includes and + # --x-libraries for the sysroot, if that seems to be correct. if test "x$SYSROOT" != "x"; then if test "x$x_includes" = xNONE; then if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then diff -r bd51fb758778 -r 7974c792d22f common/autoconf/lib-x11.m4 --- a/common/autoconf/lib-x11.m4 Mon Oct 19 00:25:01 2015 -0700 +++ b/common/autoconf/lib-x11.m4 Wed Jul 05 20:54:42 2017 +0200 @@ -35,10 +35,24 @@ X_CFLAGS= X_LIBS= else - # Check if the user has specified sysroot, but not --x-includes or --x-libraries. - # Make a simple check for the libraries at the sysroot, and setup --x-includes and - # --x-libraries for the sysroot, if that seems to be correct. - if test "x$OPENJDK_TARGET_OS" = "xlinux"; then + + if test "x${with_x}" = xno; then + AC_MSG_ERROR([It is not possible to disable the use of X11. Remove the --without-x option.]) + fi + + if test "x${with_x}" != x && test "x${with_x}" != xyes; then + # The user has specified a X11 base directory. Use it for includes and + # libraries, unless explicitely overridden. + if test "x$x_includes" = xNONE; then + x_includes="${with_x}/include" + fi + if test "x$x_libraries" = xNONE; then + x_libraries="${with_x}/lib" + fi + else + # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries. + # Make a simple check for the libraries at the sysroot, and setup --x-includes and + # --x-libraries for the sysroot, if that seems to be correct. if test "x$SYSROOT" != "x"; then if test "x$x_includes" = xNONE; then if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then diff -r bd51fb758778 -r 7974c792d22f corba/.hgtags --- a/corba/.hgtags Mon Oct 19 00:25:01 2015 -0700 +++ b/corba/.hgtags Wed Jul 05 20:54:42 2017 +0200 @@ -329,3 +329,4 @@ df70bb200356fec686681f0295c50cc3ed43c3b3 jdk9-b84 3ec06af1368924469f7ce60a00324bac55eaeecc jdk9-b85 0a3f0d25c201b40575a7c3920fce4d6f4d3ae310 jdk9-b86 +a5c40ac9b916ff44d512ee764fa919ed2097e149 jdk9-b87 diff -r bd51fb758778 -r 7974c792d22f hotspot/.hgtags --- a/hotspot/.hgtags Mon Oct 19 00:25:01 2015 -0700 +++ b/hotspot/.hgtags Wed Jul 05 20:54:42 2017 +0200 @@ -489,3 +489,4 @@ 184c4328444974edd6b3b490b9d0177ace7e331c jdk9-b84 03845376ea9dbf9690b6a9cfb4ed63f8cc0541c0 jdk9-b85 1ae4191359d811a51512f17dca80ffe79837a5ff jdk9-b86 +d7ffd16382fe7071181b967932b47cff6d1312e1 jdk9-b87 diff -r bd51fb758778 -r 7974c792d22f jdk/.hgtags --- a/jdk/.hgtags Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/.hgtags Wed Jul 05 20:54:42 2017 +0200 @@ -329,3 +329,4 @@ 757ef7f6d0042934edea3e0bf616fad2c1a22789 jdk9-b84 fe40b31c0e526d357cf5b62044fea006e43b53a5 jdk9-b85 e8a66c0b05d786a282a7ff1d7eb4989afa30c891 jdk9-b86 +110fc90bdfa0fe59606c047c2301ed75d2bad6cf jdk9-b87 diff -r bd51fb758778 -r 7974c792d22f jdk/make/mapfiles/libjava/mapfile-vers --- a/jdk/make/mapfiles/libjava/mapfile-vers Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/make/mapfiles/libjava/mapfile-vers Wed Jul 05 20:54:42 2017 +0200 @@ -152,7 +152,6 @@ Java_java_lang_StrictMath_log10; Java_java_lang_StrictMath_sin; Java_java_lang_StrictMath_sqrt; - Java_java_lang_StrictMath_cbrt; Java_java_lang_StrictMath_tan; Java_java_lang_StrictMath_cosh; Java_java_lang_StrictMath_sinh; diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/FdLibm.java --- a/jdk/src/java.base/share/classes/java/lang/FdLibm.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/FdLibm.java Wed Jul 05 20:54:42 2017 +0200 @@ -100,6 +100,64 @@ } /** + * cbrt(x) + * Return cube root of x + */ + public static class Cbrt { + // unsigned + private static final int B1 = 715094163; /* B1 = (682-0.03306235651)*2**20 */ + private static final int B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */ + + private static final double C = 0x1.15f15f15f15f1p-1; // 19/35 ~= 5.42857142857142815906e-01 + private static final double D = -0x1.691de2532c834p-1; // -864/1225 ~= 7.05306122448979611050e-01 + private static final double E = 0x1.6a0ea0ea0ea0fp0; // 99/70 ~= 1.41428571428571436819e+00 + private static final double F = 0x1.9b6db6db6db6ep0; // 45/28 ~= 1.60714285714285720630e+00 + private static final double G = 0x1.6db6db6db6db7p-2; // 5/14 ~= 3.57142857142857150787e-01 + + public static strictfp double compute(double x) { + double t = 0.0; + double sign; + + if (x == 0.0 || !Double.isFinite(x)) + return x; // Handles signed zeros properly + + sign = (x < 0.0) ? -1.0: 1.0; + + x = Math.abs(x); // x <- |x| + + // Rough cbrt to 5 bits + if (x < 0x1.0p-1022) { // subnormal number + t = 0x1.0p54; // set t= 2**54 + t *= x; + t = __HI(t, __HI(t)/3 + B2); + } else { + int hx = __HI(x); // high word of x + t = __HI(t, hx/3 + B1); + } + + // New cbrt to 23 bits, may be implemented in single precision + double r, s, w; + r = t * t/x; + s = C + r*t; + t *= G + F/(s + E + D/s); + + // Chopped to 20 bits and make it larger than cbrt(x) + t = __LO(t, 0); + t = __HI(t, __HI(t) + 0x00000001); + + // One step newton iteration to 53 bits with error less than 0.667 ulps + s = t * t; // t*t is exact + r = x / s; + w = t + t; + r = (r - t)/(w + r); // r-s is exact + t = t + t*r; + + // Restore the original sign bit + return sign * t; + } + } + + /** * hypot(x,y) * * Method : diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/StrictMath.java --- a/jdk/src/java.base/share/classes/java/lang/StrictMath.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/StrictMath.java Wed Jul 05 20:54:42 2017 +0200 @@ -307,7 +307,9 @@ * @return the cube root of {@code a}. * @since 1.5 */ - public static native double cbrt(double a); + public static double cbrt(double a) { + return FdLibm.Cbrt.compute(a); + } /** * Computes the remainder operation on two arguments as prescribed diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java --- a/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java Wed Jul 05 20:54:42 2017 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2015, 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 @@ -834,7 +834,7 @@ static MethodHandle makeCbmhCtor(Class extends BoundMethodHandle> cbmh, String types) { try { - return LOOKUP.findStatic(cbmh, "make", MethodType.fromMethodDescriptorString(makeSignature(types, false), null)); + return LOOKUP.findStatic(cbmh, "make", MethodType.fromDescriptor(makeSignature(types, false), null)); } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | TypeNotPresentException e) { throw newInternalError(e); } diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java --- a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java Wed Jul 05 20:54:42 2017 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2015, 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 @@ -141,7 +141,7 @@ synchronized (this) { if (type instanceof String) { String sig = (String) type; - MethodType res = MethodType.fromMethodDescriptorString(sig, getClassLoader()); + MethodType res = MethodType.fromDescriptor(sig, getClassLoader()); type = res; } else if (type instanceof Object[]) { Object[] typeInfo = (Object[]) type; @@ -206,7 +206,7 @@ synchronized (this) { if (type instanceof String) { String sig = (String) type; - MethodType mtype = MethodType.fromMethodDescriptorString("()"+sig, getClassLoader()); + MethodType mtype = MethodType.fromDescriptor("()"+sig, getClassLoader()); Class> res = mtype.returnType(); type = res; } diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java Wed Jul 05 20:54:42 2017 +0200 @@ -383,7 +383,7 @@ if (type instanceof MethodType) return (MethodType) type; else - return MethodType.fromMethodDescriptorString((String)type, callerClass.getClassLoader()); + return MethodType.fromDescriptor((String)type, callerClass.getClassLoader()); } // Tracing logic: static MemberName linkMethodTracing(Class> callerClass, int refKind, diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java Wed Jul 05 20:54:42 2017 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2015, 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 @@ -1058,6 +1058,23 @@ public static MethodType fromMethodDescriptorString(String descriptor, ClassLoader loader) throws IllegalArgumentException, TypeNotPresentException { + return fromDescriptor(descriptor, + (loader == null) ? ClassLoader.getSystemClassLoader() : loader); + } + + /** + * Same as {@link #fromMethodDescriptorString(String, ClassLoader)}, but + * {@code null} ClassLoader means the bootstrap loader is used here. + *
+ * IMPORTANT: This method is preferable for JDK internal use as it more + * correctly interprets {@code null} ClassLoader than + * {@link #fromMethodDescriptorString(String, ClassLoader)}. + * Use of this method also avoids early initialization issues when system + * ClassLoader is not initialized yet. + */ + static MethodType fromDescriptor(String descriptor, ClassLoader loader) + throws IllegalArgumentException, TypeNotPresentException + { if (!descriptor.startsWith("(") || // also generates NPE if needed descriptor.indexOf(')') < 0 || descriptor.indexOf('.') >= 0) diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java --- a/jdk/src/java.base/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java Wed Jul 05 20:54:42 2017 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, 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 @@ -131,7 +131,7 @@ } private static String boxingDescriptor(Wrapper w) { - return String.format("(%s)L%s;", w.basicTypeChar(), wrapperName(w)); + return "(" + w.basicTypeChar() + ")L" + wrapperName(w) + ";"; } private static String unboxingDescriptor(Wrapper w) { diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java --- a/jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java Wed Jul 05 20:54:42 2017 +0200 @@ -28,9 +28,9 @@ /** * This interface defines a factory for {@code URL} stream * protocol handlers. - *
- * It is used by the {@code URL} class to create a - * {@code URLStreamHandler} for a specific protocol. + * + *
A URL stream handler factory is used as specified in the + * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}. * * @author Arthur van Hoff * @see java.net.URL diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java --- a/jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java Wed Jul 05 20:54:42 2017 +0200 @@ -41,6 +41,9 @@ * fully-qualified concrete URL stream handler provider class names, one per * line. * + *
URL stream handler providers are located at runtime, as specified in the + * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}. + * * @since 1.9 */ public abstract class URLStreamHandlerProvider diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/util/AbstractQueue.java --- a/jdk/src/java.base/share/classes/java/util/AbstractQueue.java Mon Oct 19 00:25:01 2015 -0700 +++ b/jdk/src/java.base/share/classes/java/util/AbstractQueue.java Wed Jul 05 20:54:42 2017 +0200 @@ -38,16 +38,16 @@ /** * This class provides skeletal implementations of some {@link Queue} * operations. The implementations in this class are appropriate when - * the base implementation does not allow null + * the base implementation does not allow {@code null} * elements. Methods {@link #add add}, {@link #remove remove}, and * {@link #element element} are based on {@link #offer offer}, {@link * #poll poll}, and {@link #peek peek}, respectively, but throw - * exceptions instead of indicating failure via false or - * null returns. + * exceptions instead of indicating failure via {@code false} or + * {@code null} returns. * - *
A Queue implementation that extends this class must + *
A {@code Queue} implementation that extends this class must
* minimally define a method {@link Queue#offer} which does not permit
- * insertion of null elements, along with methods {@link
+ * insertion of {@code null} elements, along with methods {@link
* Queue#peek}, {@link Queue#poll}, {@link Collection#size}, and
* {@link Collection#iterator}. Typically, additional methods will be
* overridden as well. If these requirements cannot be met, consider
@@ -59,7 +59,7 @@
*
* @since 1.5
* @author Doug Lea
- * @param This implementation returns true if offer succeeds,
- * else throws an IllegalStateException.
+ * This implementation returns {@code true} if {@code offer} succeeds,
+ * else throws an {@code IllegalStateException}.
*
* @param e the element to add
- * @return true (as specified by {@link Collection#add})
+ * @return {@code true} (as specified by {@link Collection#add})
* @throws IllegalStateException if the element cannot be added at this
* time due to capacity restrictions
* @throws ClassCastException if the class of the specified element
@@ -103,7 +103,7 @@
* from {@link #poll poll} only in that it throws an exception if this
* queue is empty.
*
- * This implementation returns the result of poll
+ * This implementation returns the result of {@code poll}
* unless the queue is empty.
*
* @return the head of this queue
@@ -122,7 +122,7 @@
* differs from {@link #peek peek} only in that it throws an exception if
* this queue is empty.
*
- * This implementation returns the result of peek
+ * This implementation returns the result of {@code peek}
* unless the queue is empty.
*
* @return the head of this queue
@@ -141,7 +141,7 @@
* The queue will be empty after this call returns.
*
* This implementation repeatedly invokes {@link #poll poll} until it
- * returns null.
+ * returns {@code null}.
*/
public void clear() {
while (poll() != null)
@@ -151,7 +151,7 @@
/**
* Adds all of the elements in the specified collection to this
* queue. Attempts to addAll of a queue to itself result in
- * IllegalArgumentException. Further, the behavior of
+ * {@code IllegalArgumentException}. Further, the behavior of
* this operation is undefined if the specified collection is
* modified while the operation is in progress.
*
@@ -159,12 +159,12 @@
* and adds each element returned by the iterator to this
* queue, in turn. A runtime exception encountered while
* trying to add an element (including, in particular, a
- * null element) may result in only some of the elements
+ * {@code null} element) may result in only some of the elements
* having been successfully added when the associated exception is
* thrown.
*
* @param c collection containing elements to be added to this queue
- * @return true if this queue changed as a result of the call
+ * @return {@code true} if this queue changed as a result of the call
* @throws ClassCastException if the class of an element of the specified
* collection prevents it from being added to this queue
* @throws NullPointerException if the specified collection contains a
diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/util/ArrayDeque.java
--- a/jdk/src/java.base/share/classes/java/util/ArrayDeque.java Mon Oct 19 00:25:01 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/ArrayDeque.java Wed Jul 05 20:54:42 2017 +0200
@@ -47,16 +47,18 @@
* when used as a queue.
*
* Most {@code ArrayDeque} operations run in amortized constant time.
- * Exceptions include {@link #remove(Object) remove}, {@link
- * #removeFirstOccurrence removeFirstOccurrence}, {@link #removeLastOccurrence
- * removeLastOccurrence}, {@link #contains contains}, {@link #iterator
- * iterator.remove()}, and the bulk operations, all of which run in linear
- * time.
+ * Exceptions include
+ * {@link #remove(Object) remove},
+ * {@link #removeFirstOccurrence removeFirstOccurrence},
+ * {@link #removeLastOccurrence removeLastOccurrence},
+ * {@link #contains contains},
+ * {@link #iterator iterator.remove()},
+ * and the bulk operations, all of which run in linear time.
*
- * The iterators returned by this class's {@code iterator} method are
- * fail-fast: If the deque is modified at any time after the iterator
- * is created, in any way except through the iterator's own {@code remove}
- * method, the iterator will generally throw a {@link
+ * The iterators returned by this class's {@link #iterator() iterator}
+ * method are fail-fast: If the deque is modified at any time after
+ * the iterator is created, in any way except through the iterator's own
+ * {@code remove} method, the iterator will generally throw a {@link
* ConcurrentModificationException}. Thus, in the face of concurrent
* modification, the iterator fails quickly and cleanly, rather than risking
* arbitrary, non-deterministic behavior at an undetermined time in the
@@ -80,7 +82,7 @@
*
* @author Josh Bloch and Doug Lea
* @since 1.6
- * @param
+ * list's size must be greater than or equal to the source list's size.
+ * If it is greater, the remaining elements in the destination list are
+ * unaffected.
*
* This method runs in linear time.
*
diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/util/Deque.java
--- a/jdk/src/java.base/share/classes/java/util/Deque.java Mon Oct 19 00:25:01 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Deque.java Wed Jul 05 20:54:42 2017 +0200
@@ -188,7 +188,7 @@
* @author Doug Lea
* @author Josh Bloch
* @since 1.6
- * @param A {@code NavigableMap} may be accessed and traversed in either
- * ascending or descending key order. The {@code descendingMap}
+ * ascending or descending key order. The {@link #descendingMap}
* method returns a view of the map with the senses of all relational
* and directional methods inverted. The performance of ascending
* operations and views is likely to be faster than that of descending
- * ones. Methods {@code subMap}, {@code headMap},
- * and {@code tailMap} differ from the like-named {@code
- * SortedMap} methods in accepting additional arguments describing
- * whether lower and upper bounds are inclusive versus exclusive.
- * Submaps of any {@code NavigableMap} must implement the {@code
- * NavigableMap} interface.
+ * ones. Methods
+ * {@link #subMap(Object, boolean, Object, boolean) subMap(K, boolean, K, boolean)},
+ * {@link #headMap(Object, boolean) headMap(K, boolean)}, and
+ * {@link #tailMap(Object, boolean) tailMap(K, boolean)}
+ * differ from the like-named {@code SortedMap} methods in accepting
+ * additional arguments describing whether lower and upper bounds are
+ * inclusive versus exclusive. Submaps of any {@code NavigableMap}
+ * must implement the {@code NavigableMap} interface.
*
- * This interface additionally defines methods {@code firstEntry},
- * {@code pollFirstEntry}, {@code lastEntry}, and
- * {@code pollLastEntry} that return and/or remove the least and
+ * This interface additionally defines methods {@link #firstEntry},
+ * {@link #pollFirstEntry}, {@link #lastEntry}, and
+ * {@link #pollLastEntry} that return and/or remove the least and
* greatest mappings, if any exist, else returning {@code null}.
*
* Implementations of entry-returning methods are expected to
@@ -80,7 +82,7 @@
* implement {@code NavigableMap}, but extensions and implementations
* of this interface are encouraged to override these methods to return
* {@code NavigableMap}. Similarly,
- * {@link #keySet()} can be overriden to return {@code NavigableSet}.
+ * {@link #keySet()} can be overridden to return {@link NavigableSet}.
*
* This interface is a member of the
*
@@ -254,7 +256,7 @@
* operation), the results of the iteration are undefined.
*
* The returned map has an ordering equivalent to
- * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}(comparator()).
+ * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
* The expression {@code m.descendingMap().descendingMap()} returns a
* view of {@code m} essentially equivalent to {@code m}.
*
diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/util/NavigableSet.java
--- a/jdk/src/java.base/share/classes/java/util/NavigableSet.java Mon Oct 19 00:25:01 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/NavigableSet.java Wed Jul 05 20:54:42 2017 +0200
@@ -37,26 +37,30 @@
/**
* A {@link SortedSet} extended with navigation methods reporting
- * closest matches for given search targets. Methods {@code lower},
- * {@code floor}, {@code ceiling}, and {@code higher} return elements
+ * closest matches for given search targets. Methods {@link #lower},
+ * {@link #floor}, {@link #ceiling}, and {@link #higher} return elements
* respectively less than, less than or equal, greater than or equal,
* and greater than a given element, returning {@code null} if there
- * is no such element. A {@code NavigableSet} may be accessed and
- * traversed in either ascending or descending order. The {@code
- * descendingSet} method returns a view of the set with the senses of
- * all relational and directional methods inverted. The performance of
- * ascending operations and views is likely to be faster than that of
- * descending ones. This interface additionally defines methods
- * {@code pollFirst} and {@code pollLast} that return and remove the
- * lowest and highest element, if one exists, else returning {@code
- * null}. Methods {@code subSet}, {@code headSet},
- * and {@code tailSet} differ from the like-named {@code
- * SortedSet} methods in accepting additional arguments describing
- * whether lower and upper bounds are inclusive versus exclusive.
- * Subsets of any {@code NavigableSet} must implement the {@code
- * NavigableSet} interface.
+ * is no such element.
*
- * The return values of navigation methods may be ambiguous in
+ * A {@code NavigableSet} may be accessed and traversed in either
+ * ascending or descending order. The {@link #descendingSet} method
+ * returns a view of the set with the senses of all relational and
+ * directional methods inverted. The performance of ascending
+ * operations and views is likely to be faster than that of descending
+ * ones. This interface additionally defines methods {@link
+ * #pollFirst} and {@link #pollLast} that return and remove the lowest
+ * and highest element, if one exists, else returning {@code null}.
+ * Methods
+ * {@link #subSet(Object, boolean, Object, boolean) subSet(E, boolean, E, boolean)},
+ * {@link #headSet(Object, boolean) headSet(E, boolean)}, and
+ * {@link #tailSet(Object, boolean) tailSet(E, boolean)}
+ * differ from the like-named {@code SortedSet} methods in accepting
+ * additional arguments describing whether lower and upper bounds are
+ * inclusive versus exclusive. Subsets of any {@code NavigableSet}
+ * must implement the {@code NavigableSet} interface.
+ *
+ * The return values of navigation methods may be ambiguous in
* implementations that permit {@code null} elements. However, even
* in this case the result can be disambiguated by checking
* {@code contains(null)}. To avoid such issues, implementations of
@@ -172,7 +176,7 @@
* the iteration are undefined.
*
* The returned set has an ordering equivalent to
- * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}(comparator()).
+ * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
* The expression {@code s.descendingSet().descendingSet()} returns a
* view of {@code s} essentially equivalent to {@code s}.
*
diff -r bd51fb758778 -r 7974c792d22f jdk/src/java.base/share/classes/java/util/PriorityQueue.java
--- a/jdk/src/java.base/share/classes/java/util/PriorityQueue.java Mon Oct 19 00:25:01 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/PriorityQueue.java Wed Jul 05 20:54:42 2017 +0200
@@ -77,7 +77,7 @@
*
* @since 1.5
* @author Josh Bloch, Doug Lea
- * @param Extension example. Here is a sketch of a class
* that customizes {@link ThreadPoolExecutor} to use
* a {@code CustomTask} class instead of the default {@code FutureTask}:
- * CompletableFuture also implements {@link Future} with the following
* policies: Arguments used to pass a completion result (that is, for
+ * parameters of type {@code T}) for methods accepting them may be
+ * null, but passing a null value for any other parameter will result
+ * in a {@link NullPointerException} being thrown.
+ *
+ * Subclasses of this class should normally override the "virtual
+ * constructor" method {@link #newIncompleteFuture}, which establishes
+ * the concrete type returned by CompletionStage methods. For example,
+ * here is a class that substitutes a different default Executor and
+ * disables the {@code obtrude} methods:
+ *
+ * {@code String[] y = x.toArray(new String[0]);}
+ * {@code String[] y = x.toArray(new String[0]);}
*
* Note that {@code toArray(new Object[0])} is identical in function to
* {@code toArray()}.
@@ -820,13 +807,22 @@
*/
@SuppressWarnings("unchecked")
public {@code String[] y = x.toArray(new String[0]);}
+ * {@code String[] y = x.toArray(new String[0]);}
*
* Note that {@code toArray(new Object[0])} is identical in function to
* {@code toArray()}.
@@ -489,7 +489,7 @@
* Index (into queue array) of element to be returned by
* subsequent call to next.
*/
- private int cursor = 0;
+ private int cursor;
/**
* Index of element returned by most recent call to next,
@@ -509,13 +509,13 @@
* We expect that most iterations, even those involving removals,
* will not need to store elements in this field.
*/
- private ArrayDeque {@code
+ *
{@code
* public class CustomThreadPoolExecutor extends ThreadPoolExecutor {
*
* static class CustomTask
{@code String[] y = x.toArray(new String[0]);}
+ * {@code String[] y = x.toArray(new String[0]);}
*
* Note that {@code toArray(new Object[0])} is identical in function to
* {@code toArray()}.
@@ -614,53 +591,30 @@
*/
@SuppressWarnings("unchecked")
public {@code
+ *
{@code
* class Producer implements Runnable {
* private final BlockingQueue queue;
* Producer(BlockingQueue q) { queue = q; }
@@ -175,7 +175,7 @@
*
* @since 1.5
* @author Doug Lea
- * @param
@@ -94,7 +97,7 @@
* completion. Method {@link #cancel cancel} has the same effect as
* {@code completeExceptionally(new CancellationException())}. Method
* {@link #isCompletedExceptionally} can be used to determine if a
- * CompletableFuture completed in any exceptional fashion.
{@code
+ * class MyCompletableFuture
*
* @author Doug Lea
* @since 1.8
+ * @param