This commit is contained in:
J. Duke 2017-08-24 16:36:32 +02:00
commit d28d504d32
261 changed files with 5257 additions and 1713 deletions

View File

@ -441,3 +441,6 @@ ec4159ebe7050fcc5dcee8a2d150cf948ecc97db jdk-9+178
252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179 252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179
a133a7d1007b1456bc62824382fd8ac93b45d329 jdk-10+17 a133a7d1007b1456bc62824382fd8ac93b45d329 jdk-10+17
536b81db8075486ca0fe3225d8e59313df5b936c jdk-10+18 536b81db8075486ca0fe3225d8e59313df5b936c jdk-10+18
b803e6cff41e72a1e6d8782e1ef7c25a6e3e5ee3 jdk-10+19
d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181

View File

@ -441,3 +441,6 @@ b82b62ed5debda2d98dda597506ef29cf947fbae jdk-10+16
24390da83c5ee9e23ceafbcaff4460a01e37bb3a jdk-9+179 24390da83c5ee9e23ceafbcaff4460a01e37bb3a jdk-9+179
50ff1fd66362f212a8db6de76089d9d0ffa4df0f jdk-10+17 50ff1fd66362f212a8db6de76089d9d0ffa4df0f jdk-10+17
a923b3f30e7bddb4f960059ddfc7978fc63e2e6e jdk-10+18 a923b3f30e7bddb4f960059ddfc7978fc63e2e6e jdk-10+18
28488561cfbcfa4d0d9c489e8afe0155f4231360 jdk-10+19
6ce6cb8ff41c71c49f23b15e0f0468aca5d52b17 jdk-9+180
ba71941ad9dba53b8fffb30602ef673eee88696c jdk-9+181

View File

@ -601,3 +601,6 @@ c1f3649a3a42f124b418a5a916dbad13d059b757 jdk-10+15
d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179 d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179
73e2cb8700bfa51304bd4b02f224620859a3f600 jdk-10+17 73e2cb8700bfa51304bd4b02f224620859a3f600 jdk-10+17
c9d3317623d48da3327232c81e3f8cfc0d29d888 jdk-10+18 c9d3317623d48da3327232c81e3f8cfc0d29d888 jdk-10+18
33b74e13c1457f36041addb8b850831f81ca6e9f jdk-10+19
d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180
4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -4389,6 +4389,15 @@ void G1CollectedHeap::enqueue_discovered_references(G1ParScanThreadStateSet* per
rp->verify_no_references_recorded(); rp->verify_no_references_recorded();
assert(!rp->discovery_enabled(), "should have been disabled"); assert(!rp->discovery_enabled(), "should have been disabled");
// If during an initial mark pause we install a pending list head which is not otherwise reachable
// ensure that it is marked in the bitmap for concurrent marking to discover.
if (collector_state()->during_initial_mark_pause()) {
oop pll_head = Universe::reference_pending_list();
if (pll_head != NULL) {
_cm->grayRoot(pll_head);
}
}
// FIXME // FIXME
// CM's reference processing also cleans up the string and symbol tables. // CM's reference processing also cleans up the string and symbol tables.
// Should we do that here also? We could, but it is a serial operation // Should we do that here also? We could, but it is a serial operation

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -497,7 +497,11 @@ void Universe::fixup_mirrors(TRAPS) {
#define assert_pll_ownership() assert_pll_locked(owned_by_self) #define assert_pll_ownership() assert_pll_locked(owned_by_self)
oop Universe::reference_pending_list() { oop Universe::reference_pending_list() {
assert_pll_ownership(); if (Thread::current()->is_VM_thread()) {
assert_pll_locked(is_locked);
} else {
assert_pll_ownership();
}
return _reference_pending_list; return _reference_pending_list;
} }

View File

@ -441,3 +441,6 @@ e069834e2c518a7bc2ffadc8c7e3cd7ec69fa8a0 jdk-10+15
06df1ce4b9b887d05ce6a13f4def3547e434dd1a jdk-9+179 06df1ce4b9b887d05ce6a13f4def3547e434dd1a jdk-9+179
d93f2fd542b7d7855c2cd49ae15ebcc3d441a83b jdk-10+17 d93f2fd542b7d7855c2cd49ae15ebcc3d441a83b jdk-10+17
c4b709bad6c5d29294124de5e74e1e2ac84fcf1f jdk-10+18 c4b709bad6c5d29294124de5e74e1e2ac84fcf1f jdk-10+18
b561eeca30decc6258b4aca8bb23beffbb6e2f7d jdk-10+19
4feab1acec6a9c3620a19ff379a65ab8618d0e2a jdk-9+180
bd66ea2fdde3d60a73b5272263a7b8b0ca926a33 jdk-9+181

View File

@ -54,83 +54,90 @@ package java.io;
* Unicode strings in a format that is a slight modification of UTF-8. * Unicode strings in a format that is a slight modification of UTF-8.
* (For information regarding the standard UTF-8 format, see section * (For information regarding the standard UTF-8 format, see section
* <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version * <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
* 4.0</i>). * 4.0</i>)
* Note that in the following table, the most significant bit appears in the
* far left-hand column.
* *
* <blockquote> * <ul>
* <table class="plain"> * <li>Characters in the range {@code '\u005Cu0001'} to
* <caption style="display:none">Bit values and bytes</caption> * {@code '\u005Cu007F'} are represented by a single byte.
* <li>The null character {@code '\u005Cu0000'} and characters
* in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
* represented by a pair of bytes.
* <li>Characters in the range {@code '\u005Cu0800'}
* to {@code '\u005CuFFFF'} are represented by three bytes.
* </ul>
*
* <table class="plain" style="margin-left:2em;">
* <caption>Encoding of UTF-8 values</caption>
* <thead>
* <tr>
* <th scope="col" rowspan="2">Value</th>
* <th scope="col" rowspan="2">Byte</th>
* <th scope="col" colspan="8" id="bit_a">Bit Values</th>
* </tr>
* <tr>
* <!-- Value -->
* <!-- Byte -->
* <th scope="col" style="width:3em"> 7 </th>
* <th scope="col" style="width:3em"> 6 </th>
* <th scope="col" style="width:3em"> 5 </th>
* <th scope="col" style="width:3em"> 4 </th>
* <th scope="col" style="width:3em"> 3 </th>
* <th scope="col" style="width:3em"> 2 </th>
* <th scope="col" style="width:3em"> 1 </th>
* <th scope="col" style="width:3em"> 0 </th>
* </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <th colspan="9"><span style="font-weight:normal"> * <th scope="row" style="text-align:left; font-weight:normal">
* All characters in the range {@code '\u005Cu0001'} to * {@code \u005Cu0001} to {@code \u005Cu007F} </th>
* {@code '\u005Cu007F'} are represented by a single byte:</span></th> * <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
* </tr>
* <tr>
* <td></td>
* <th colspan="8" id="bit_a">Bit Values</th>
* </tr>
* <tr>
* <th id="byte1_a" style="text-align:left">Byte 1</th>
* <td style="text-align:center">0 * <td style="text-align:center">0
* <td colspan="7" style="text-align:center">bits 6-0 * <td colspan="7" style="text-align:right; padding-right:6em">bits 6-0
* </tr> * </tr>
* <tr> * <tr>
* <th colspan="9"><span style="font-weight:normal"> * <th scope="row" rowspan="2" style="text-align:left; font-weight:normal">
* The null character {@code '\u005Cu0000'} and characters * {@code \u005Cu0000},<br>
* in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are * {@code \u005Cu0080} to {@code \u005Cu07FF} </th>
* represented by a pair of bytes:</span></th> * <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
* </tr>
* <tr>
* <td></td>
* <th colspan="8" id="bit_b">Bit Values</th>
* </tr>
* <tr>
* <th id="byte1_b" style="text-align:left">Byte 1</th>
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">0 * <td style="text-align:center">0
* <td colspan="5" style="text-align:center">bits 10-6 * <td colspan="5" style="text-align:right; padding-right:6em">bits 10-6
* </tr> * </tr>
* <tr> * <tr>
* <th id="byte2_a" style="text-align:left">Byte 2</th> * <!-- (value) -->
* <th scope="row" style="font-weight:normal; text-align:center"> 2 </th>
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">0 * <td style="text-align:center">0
* <td colspan="6" style="text-align:center">bits 5-0 * <td colspan="6" style="text-align:right; padding-right:6em">bits 5-0
* </tr> * </tr>
* <tr> * <tr>
* <th colspan="9"><span style="font-weight:normal"> * <th scope="row" rowspan="3" style="text-align:left; font-weight:normal">
* {@code char} values in the range {@code '\u005Cu0800'} * {@code \u005Cu0800} to {@code \u005CuFFFF} </th>
* to {@code '\u005CuFFFF'} are represented by three bytes:</span></th> * <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
* </tr>
* <tr>
* <td></td>
* <th colspan="8"id="bit_c">Bit Values</th>
* </tr>
* <tr>
* <th id="byte1_c" style="text-align:left">Byte 1</th>
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">0 * <td style="text-align:center">0
* <td colspan="4" style="text-align:center">bits 15-12 * <td colspan="4" style="text-align:right; padding-right:6em">bits 15-12
* </tr> * </tr>
* <tr> * <tr>
* <th id="byte2_b" style="text-align:left">Byte 2</th> * <!-- (value) -->
* <th scope="row" style="font-weight:normal; text-align:center"> 2 </th>
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">0 * <td style="text-align:center">0
* <td colspan="6" style="text-align:center">bits 11-6 * <td colspan="6" style="text-align:right; padding-right:6em">bits 11-6
* </tr> * </tr>
* <tr> * <tr>
* <th id="byte3" style="text-align:left">Byte 3</th> * <!-- (value) -->
* <th scope="row" style="font-weight:normal; text-align:center"> 3 </th>
* <td style="text-align:center">1 * <td style="text-align:center">1
* <td style="text-align:center">0 * <td style="text-align:center">0
* <td colspan="6" style="text-align:center">bits 5-0 * <td colspan="6" style="text-align:right; padding-right:6em">bits 5-0
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>
* </blockquote> *
* <p> * <p>
* The differences between this format and the * The differences between this format and the
* standard UTF-8 format are the following: * standard UTF-8 format are the following:

View File

@ -34,6 +34,7 @@ import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.function.Function; import java.util.function.Function;
import jdk.internal.misc.SharedSecrets;
/** /**
* Filter classes, array lengths, and graph metrics during deserialization. * Filter classes, array lengths, and graph metrics during deserialization.
@ -265,6 +266,9 @@ public interface ObjectInputFilter {
return null; return null;
}); });
configLog = (configuredFilter != null) ? System.getLogger("java.io.serialization") : null; configLog = (configuredFilter != null) ? System.getLogger("java.io.serialization") : null;
// Setup shared secrets for RegistryImpl to use.
SharedSecrets.setJavaObjectInputFilterAccess(Config::createFilter2);
} }
/** /**
@ -370,7 +374,20 @@ public interface ObjectInputFilter {
*/ */
public static ObjectInputFilter createFilter(String pattern) { public static ObjectInputFilter createFilter(String pattern) {
Objects.requireNonNull(pattern, "pattern"); Objects.requireNonNull(pattern, "pattern");
return Global.createFilter(pattern); return Global.createFilter(pattern, true);
}
/**
* Returns an ObjectInputFilter from a string of patterns that
* checks only the length for arrays, not the component type.
*
* @param pattern the pattern string to parse; not null
* @return a filter to check a class being deserialized;
* {@code null} if no patterns
*/
static ObjectInputFilter createFilter2(String pattern) {
Objects.requireNonNull(pattern, "pattern");
return Global.createFilter(pattern, false);
} }
/** /**
@ -404,20 +421,26 @@ public interface ObjectInputFilter {
* Maximum length of any array. * Maximum length of any array.
*/ */
private long maxArrayLength; private long maxArrayLength;
/**
* True to check the component type for arrays.
*/
private final boolean checkComponentType;
/** /**
* Returns an ObjectInputFilter from a string of patterns. * Returns an ObjectInputFilter from a string of patterns.
* *
* @param pattern the pattern string to parse * @param pattern the pattern string to parse
* @param checkComponentType true if the filter should check
* the component type of arrays
* @return a filter to check a class being deserialized; * @return a filter to check a class being deserialized;
* {@code null} if no patterns * {@code null} if no patterns
* @throws IllegalArgumentException if the parameter is malformed * @throws IllegalArgumentException if the parameter is malformed
* if the pattern is missing the name, the long value * if the pattern is missing the name, the long value
* is not a number or is negative. * is not a number or is negative.
*/ */
static ObjectInputFilter createFilter(String pattern) { static ObjectInputFilter createFilter(String pattern, boolean checkComponentType) {
try { try {
return new Global(pattern); return new Global(pattern, checkComponentType);
} catch (UnsupportedOperationException uoe) { } catch (UnsupportedOperationException uoe) {
// no non-empty patterns // no non-empty patterns
return null; return null;
@ -428,12 +451,15 @@ public interface ObjectInputFilter {
* Construct a new filter from the pattern String. * Construct a new filter from the pattern String.
* *
* @param pattern a pattern string of filters * @param pattern a pattern string of filters
* @param checkComponentType true if the filter should check
* the component type of arrays
* @throws IllegalArgumentException if the pattern is malformed * @throws IllegalArgumentException if the pattern is malformed
* @throws UnsupportedOperationException if there are no non-empty patterns * @throws UnsupportedOperationException if there are no non-empty patterns
*/ */
private Global(String pattern) { private Global(String pattern, boolean checkComponentType) {
boolean hasLimits = false; boolean hasLimits = false;
this.pattern = pattern; this.pattern = pattern;
this.checkComponentType = checkComponentType;
maxArrayLength = Long.MAX_VALUE; // Default values are unlimited maxArrayLength = Long.MAX_VALUE; // Default values are unlimited
maxDepth = Long.MAX_VALUE; maxDepth = Long.MAX_VALUE;
@ -595,6 +621,10 @@ public interface ObjectInputFilter {
// array length is too big // array length is too big
return Status.REJECTED; return Status.REJECTED;
} }
if (!checkComponentType) {
// As revised; do not check the component type for arrays
return Status.UNDECIDED;
}
do { do {
// Arrays are decided based on the component type // Arrays are decided based on the component type
clazz = clazz.getComponentType(); clazz = clazz.getComponentType();

View File

@ -9566,18 +9566,23 @@ class Character implements java.io.Serializable, Comparable<Character> {
* Determines if the specified character is ISO-LATIN-1 white space. * Determines if the specified character is ISO-LATIN-1 white space.
* This method returns {@code true} for the following five * This method returns {@code true} for the following five
* characters only: * characters only:
* <table class="borderless"> * <table class="striped">
* <caption style="display:none">truechars</caption> * <caption style="display:none">truechars</caption>
* <thead>
* <tr><th scope="col">Character
* <th scope="col">Code
* <th scope="col">Name
* </thead>
* <tbody> * <tbody>
* <tr><td>{@code '\t'}</td> <td>{@code U+0009}</td> * <tr><th scope="row">{@code '\t'}</th> <td>{@code U+0009}</td>
* <td>{@code HORIZONTAL TABULATION}</td></tr> * <td>{@code HORIZONTAL TABULATION}</td></tr>
* <tr><td>{@code '\n'}</td> <td>{@code U+000A}</td> * <tr><th scope="row">{@code '\n'}</th> <td>{@code U+000A}</td>
* <td>{@code NEW LINE}</td></tr> * <td>{@code NEW LINE}</td></tr>
* <tr><td>{@code '\f'}</td> <td>{@code U+000C}</td> * <tr><th scope="row">{@code '\f'}</th> <td>{@code U+000C}</td>
* <td>{@code FORM FEED}</td></tr> * <td>{@code FORM FEED}</td></tr>
* <tr><td>{@code '\r'}</td> <td>{@code U+000D}</td> * <tr><th scope="row">{@code '\r'}</th> <td>{@code U+000D}</td>
* <td>{@code CARRIAGE RETURN}</td></tr> * <td>{@code CARRIAGE RETURN}</td></tr>
* <tr><td>{@code ' '}</td> <td>{@code U+0020}</td> * <tr><th scope="row">{@code ' '}</th> <td>{@code U+0020}</td>
* <td>{@code SPACE}</td></tr> * <td>{@code SPACE}</td></tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -728,22 +728,22 @@ public final class Class<T> implements java.io.Serializable,
* one or more '{@code [}' characters representing the depth of the array * one or more '{@code [}' characters representing the depth of the array
* nesting. The encoding of element type names is as follows: * nesting. The encoding of element type names is as follows:
* *
* <blockquote><table class="borderless"> * <blockquote><table class="striped">
* <caption style="display:none">Element types and encodings</caption> * <caption style="display:none">Element types and encodings</caption>
* <thead> * <thead>
* <tr><th style="padding-right:3em;"> Element Type <th> Encoding * <tr><th scope="col"> Element Type <th scope="col"> Encoding
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td> boolean <td style="text-align:center"> Z * <tr><th scope="row"> boolean <td style="text-align:center"> Z
* <tr><td> byte <td style="text-align:center"> B * <tr><th scope="row"> byte <td style="text-align:center"> B
* <tr><td> char <td style="text-align:center"> C * <tr><th scope="row"> char <td style="text-align:center"> C
* <tr><td> class or interface * <tr><th scope="row"> class or interface
* <td style="text-align:center"> L<i>classname</i>; * <td style="text-align:center"> L<i>classname</i>;
* <tr><td> double <td style="text-align:center"> D * <tr><th scope="row"> double <td style="text-align:center"> D
* <tr><td> float <td style="text-align:center"> F * <tr><th scope="row"> float <td style="text-align:center"> F
* <tr><td> int <td style="text-align:center"> I * <tr><th scope="row"> int <td style="text-align:center"> I
* <tr><td> long <td style="text-align:center"> J * <tr><th scope="row"> long <td style="text-align:center"> J
* <tr><td> short <td style="text-align:center"> S * <tr><th scope="row"> short <td style="text-align:center"> S
* </tbody> * </tbody>
* </table></blockquote> * </table></blockquote>
* *

View File

@ -255,25 +255,25 @@ public final class Double extends Number implements Comparable<Double> {
* *
* </ul> * </ul>
* *
* <table class="plain"> * <table class="striped">
* <caption>Examples</caption> * <caption>Examples</caption>
* <thead> * <thead>
* <tr><th>Floating-point Value</th><th>Hexadecimal String</th> * <tr><th scope="col">Floating-point Value</th><th scope="col">Hexadecimal String</th>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:right">
* <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td> * <tr><th scope="row">{@code 1.0}</th> <td>{@code 0x1.0p0}</td>
* <tr><td>{@code -1.0}</td> <td>{@code -0x1.0p0}</td> * <tr><th scope="row">{@code -1.0}</th> <td>{@code -0x1.0p0}</td>
* <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td> * <tr><th scope="row">{@code 2.0}</th> <td>{@code 0x1.0p1}</td>
* <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td> * <tr><th scope="row">{@code 3.0}</th> <td>{@code 0x1.8p1}</td>
* <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td> * <tr><th scope="row">{@code 0.5}</th> <td>{@code 0x1.0p-1}</td>
* <tr><td>{@code 0.25}</td> <td>{@code 0x1.0p-2}</td> * <tr><th scope="row">{@code 0.25}</th> <td>{@code 0x1.0p-2}</td>
* <tr><td>{@code Double.MAX_VALUE}</td> * <tr><th scope="row">{@code Double.MAX_VALUE}</th>
* <td>{@code 0x1.fffffffffffffp1023}</td> * <td>{@code 0x1.fffffffffffffp1023}</td>
* <tr><td>{@code Minimum Normal Value}</td> * <tr><th scope="row">{@code Minimum Normal Value}</th>
* <td>{@code 0x1.0p-1022}</td> * <td>{@code 0x1.0p-1022}</td>
* <tr><td>{@code Maximum Subnormal Value}</td> * <tr><th scope="row">{@code Maximum Subnormal Value}</th>
* <td>{@code 0x0.fffffffffffffp-1022}</td> * <td>{@code 0x0.fffffffffffffp-1022}</td>
* <tr><td>{@code Double.MIN_VALUE}</td> * <tr><th scope="row">{@code Double.MIN_VALUE}</th>
* <td>{@code 0x0.0000000000001p-1022}</td> * <td>{@code 0x0.0000000000001p-1022}</td>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -256,25 +256,25 @@ public final class Float extends Number implements Comparable<Float> {
* *
* </ul> * </ul>
* *
* <table class="plain"> * <table class="striped">
* <caption>Examples</caption> * <caption>Examples</caption>
* <thead> * <thead>
* <tr><th>Floating-point Value</th><th>Hexadecimal String</th> * <tr><th scope="col">Floating-point Value</th><th scope="col">Hexadecimal String</th>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td> * <tr><th scope="row">{@code 1.0}</th> <td>{@code 0x1.0p0}</td>
* <tr><td>{@code -1.0}</td> <td>{@code -0x1.0p0}</td> * <tr><th scope="row">{@code -1.0}</th> <td>{@code -0x1.0p0}</td>
* <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td> * <tr><th scope="row">{@code 2.0}</th> <td>{@code 0x1.0p1}</td>
* <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td> * <tr><th scope="row">{@code 3.0}</th> <td>{@code 0x1.8p1}</td>
* <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td> * <tr><th scope="row">{@code 0.5}</th> <td>{@code 0x1.0p-1}</td>
* <tr><td>{@code 0.25}</td> <td>{@code 0x1.0p-2}</td> * <tr><th scope="row">{@code 0.25}</th> <td>{@code 0x1.0p-2}</td>
* <tr><td>{@code Float.MAX_VALUE}</td> * <tr><th scope="row">{@code Float.MAX_VALUE}</th>
* <td>{@code 0x1.fffffep127}</td> * <td>{@code 0x1.fffffep127}</td>
* <tr><td>{@code Minimum Normal Value}</td> * <tr><th scope="row">{@code Minimum Normal Value}</th>
* <td>{@code 0x1.0p-126}</td> * <td>{@code 0x1.0p-126}</td>
* <tr><td>{@code Maximum Subnormal Value}</td> * <tr><th scope="row">{@code Maximum Subnormal Value}</th>
* <td>{@code 0x0.fffffep-126}</td> * <td>{@code 0x0.fffffep-126}</td>
* <tr><td>{@code Float.MIN_VALUE}</td> * <tr><th scope="row">{@code Float.MIN_VALUE}</th>
* <td>{@code 0x0.000002p-126}</td> * <td>{@code 0x0.000002p-126}</td>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -2208,29 +2208,29 @@ public final class String
* <caption style="display:none">Split example showing regex, limit, and result</caption> * <caption style="display:none">Split example showing regex, limit, and result</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>Regex</th> * <th scope="col">Regex</th>
* <th>Limit</th> * <th scope="col">Limit</th>
* <th>Result</th> * <th scope="col">Result</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><td style="text-align:center">:</td> * <tr><th scope="row" rowspan="3" style="font-weight:normal">:</th>
* <td style="text-align:center">2</td> * <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">2</th>
* <td>{@code { "boo", "and:foo" }}</td></tr> * <td>{@code { "boo", "and:foo" }}</td></tr>
* <tr><td style="text-align:center">:</td> * <tr><!-- : -->
* <td style="text-align:center">5</td> * <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
* <td>{@code { "boo", "and", "foo" }}</td></tr> * <td>{@code { "boo", "and", "foo" }}</td></tr>
* <tr><td style="text-align:center">:</td> * <tr><!-- : -->
* <td style="text-align:center">-2</td> * <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
* <td>{@code { "boo", "and", "foo" }}</td></tr> * <td>{@code { "boo", "and", "foo" }}</td></tr>
* <tr><td style="text-align:center">o</td> * <tr><th scope="row" rowspan="3" style="font-weight:normal">o</th>
* <td style="text-align:center">5</td> * <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
* <td>{@code { "b", "", ":and:f", "", "" }}</td></tr> * <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
* <tr><td style="text-align:center">o</td> * <tr><!-- o -->
* <td style="text-align:center">-2</td> * <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
* <td>{@code { "b", "", ":and:f", "", "" }}</td></tr> * <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
* <tr><td style="text-align:center">o</td> * <tr><!-- o -->
* <td style="text-align:center">0</td> * <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">0</th>
* <td>{@code { "b", "", ":and:f" }}</td></tr> * <td>{@code { "b", "", ":and:f" }}</td></tr>
* </tbody> * </tbody>
* </table></blockquote> * </table></blockquote>
@ -2336,14 +2336,14 @@ public final class String
* <caption style="display:none">Split examples showing regex and result</caption> * <caption style="display:none">Split examples showing regex and result</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>Regex</th> * <th scope="col">Regex</th>
* <th>Result</th> * <th scope="col">Result</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><td style="text-align:center">:</td> * <tr><th scope="row" style="text-weight:normal">:</th>
* <td>{@code { "boo", "and", "foo" }}</td></tr> * <td>{@code { "boo", "and", "foo" }}</td></tr>
* <tr><td style="text-align:center">o</td> * <tr><th scope="row" style="text-weight:normal">o</th>
* <td>{@code { "b", "", ":and:f" }}</td></tr> * <td>{@code { "b", "", ":and:f" }}</td></tr>
* </tbody> * </tbody>
* </table></blockquote> * </table></blockquote>
@ -2460,36 +2460,37 @@ public final class String
* <caption style="display:none">Lowercase mapping examples showing language code of locale, upper case, lower case, and description</caption> * <caption style="display:none">Lowercase mapping examples showing language code of locale, upper case, lower case, and description</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>Language Code of Locale</th> * <th scope="col">Language Code of Locale</th>
* <th>Upper Case</th> * <th scope="col">Upper Case</th>
* <th>Lower Case</th> * <th scope="col">Lower Case</th>
* <th>Description</th> * <th scope="col">Description</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>tr (Turkish)</td> * <td>tr (Turkish)</td>
* <td>&#92;u0130</td> * <th scope="row" style="font-weight:normal; text-align:left">&#92;u0130</th>
* <td>&#92;u0069</td> * <td>&#92;u0069</td>
* <td>capital letter I with dot above -&gt; small letter i</td> * <td>capital letter I with dot above -&gt; small letter i</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>tr (Turkish)</td> * <td>tr (Turkish)</td>
* <td>&#92;u0049</td> * <th scope="row" style="font-weight:normal; text-align:left">&#92;u0049</th>
* <td>&#92;u0131</td> * <td>&#92;u0131</td>
* <td>capital letter I -&gt; small letter dotless i </td> * <td>capital letter I -&gt; small letter dotless i </td>
* </tr> * </tr>
* <tr> * <tr>
* <td>(all)</td> * <td>(all)</td>
* <td>French Fries</td> * <th scope="row" style="font-weight:normal; text-align:left">French Fries</th>
* <td>french fries</td> * <td>french fries</td>
* <td>lowercased all chars in String</td> * <td>lowercased all chars in String</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>(all)</td> * <td>(all)</td>
* <td><img src="doc-files/capiota.gif" alt="capiota"><img src="doc-files/capchi.gif" alt="capchi"> * <th scope="row" style="font-weight:normal; text-align:left">
* <img src="doc-files/capiota.gif" alt="capiota"><img src="doc-files/capchi.gif" alt="capchi">
* <img src="doc-files/captheta.gif" alt="captheta"><img src="doc-files/capupsil.gif" alt="capupsil"> * <img src="doc-files/captheta.gif" alt="captheta"><img src="doc-files/capupsil.gif" alt="capupsil">
* <img src="doc-files/capsigma.gif" alt="capsigma"></td> * <img src="doc-files/capsigma.gif" alt="capsigma"></th>
* <td><img src="doc-files/iota.gif" alt="iota"><img src="doc-files/chi.gif" alt="chi"> * <td><img src="doc-files/iota.gif" alt="iota"><img src="doc-files/chi.gif" alt="chi">
* <img src="doc-files/theta.gif" alt="theta"><img src="doc-files/upsilon.gif" alt="upsilon"> * <img src="doc-files/theta.gif" alt="theta"><img src="doc-files/upsilon.gif" alt="upsilon">
* <img src="doc-files/sigma1.gif" alt="sigma"></td> * <img src="doc-files/sigma1.gif" alt="sigma"></td>
@ -2546,34 +2547,34 @@ public final class String
* <caption style="display:none">Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.</caption> * <caption style="display:none">Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>Language Code of Locale</th> * <th scope="col">Language Code of Locale</th>
* <th>Lower Case</th> * <th scope="col">Lower Case</th>
* <th>Upper Case</th> * <th scope="col">Upper Case</th>
* <th>Description</th> * <th scope="col">Description</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>tr (Turkish)</td> * <td>tr (Turkish)</td>
* <td>&#92;u0069</td> * <th scope="row" style="font-weight:normal; text-align:left">&#92;u0069</th>
* <td>&#92;u0130</td> * <td>&#92;u0130</td>
* <td>small letter i -&gt; capital letter I with dot above</td> * <td>small letter i -&gt; capital letter I with dot above</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>tr (Turkish)</td> * <td>tr (Turkish)</td>
* <td>&#92;u0131</td> * <th scope="row" style="font-weight:normal; text-align:left">&#92;u0131</th>
* <td>&#92;u0049</td> * <td>&#92;u0049</td>
* <td>small letter dotless i -&gt; capital letter I</td> * <td>small letter dotless i -&gt; capital letter I</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>(all)</td> * <td>(all)</td>
* <td>&#92;u00df</td> * <th scope="row" style="font-weight:normal; text-align:left">&#92;u00df</th>
* <td>&#92;u0053 &#92;u0053</td> * <td>&#92;u0053 &#92;u0053</td>
* <td>small letter sharp s -&gt; two letters: SS</td> * <td>small letter sharp s -&gt; two letters: SS</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>(all)</td> * <td>(all)</td>
* <td>Fahrvergn&uuml;gen</td> * <th scope="row" style="font-weight:normal; text-align:left">Fahrvergn&uuml;gen</th>
* <td>FAHRVERGN&Uuml;GEN</td> * <td>FAHRVERGN&Uuml;GEN</td>
* <td></td> * <td></td>
* </tr> * </tr>

View File

@ -583,7 +583,7 @@ public final class System {
* system properties, a set of system properties is first created and * system properties, a set of system properties is first created and
* initialized. This set of system properties always includes values * initialized. This set of system properties always includes values
* for the following keys: * for the following keys:
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption style="display:none">Shows property keys and associated values</caption> * <caption style="display:none">Shows property keys and associated values</caption>
* <thead> * <thead>
* <tr><th scope="col">Key</th> * <tr><th scope="col">Key</th>
@ -1049,26 +1049,28 @@ public final class System {
* of corresponding severity. * of corresponding severity.
* <br>The mapping is as follows: * <br>The mapping is as follows:
* <br><br> * <br><br>
* <table border="1"> * <table class="striped">
* <caption>System.Logger Severity Level Mapping</caption> * <caption>System.Logger Severity Level Mapping</caption>
* <tr><td><b>System.Logger Levels</b></td> * <thead>
* <td>{@link Logger.Level#ALL ALL}</td> * <tr><th scope="col">System.Logger Levels</th>
* <td>{@link Logger.Level#TRACE TRACE}</td> * <th scope="col">java.util.logging Levels</th>
* <td>{@link Logger.Level#DEBUG DEBUG}</td> * </thead>
* <td>{@link Logger.Level#INFO INFO}</td> * <tbody>
* <td>{@link Logger.Level#WARNING WARNING}</td> * <tr><th scope="row">{@link Logger.Level#ALL ALL}</th>
* <td>{@link Logger.Level#ERROR ERROR}</td> * <td>{@link java.util.logging.Level#ALL ALL}</td>
* <td>{@link Logger.Level#OFF OFF}</td> * <tr><th scope="row">{@link Logger.Level#TRACE TRACE}</th>
* </tr> * <td>{@link java.util.logging.Level#FINER FINER}</td>
* <tr><td><b>java.util.logging Levels</b></td> * <tr><th scope="row">{@link Logger.Level#DEBUG DEBUG}</th>
* <td>{@link java.util.logging.Level#ALL ALL}</td> * <td>{@link java.util.logging.Level#FINE FINE}</td>
* <td>{@link java.util.logging.Level#FINER FINER}</td> * <tr><th scope="row">{@link Logger.Level#INFO INFO}</th>
* <td>{@link java.util.logging.Level#FINE FINE}</td> * <td>{@link java.util.logging.Level#INFO INFO}</td>
* <td>{@link java.util.logging.Level#INFO INFO}</td> * <tr><th scope="row">{@link Logger.Level#WARNING WARNING}</th>
* <td>{@link java.util.logging.Level#WARNING WARNING}</td> * <td>{@link java.util.logging.Level#WARNING WARNING}</td>
* <td>{@link java.util.logging.Level#SEVERE SEVERE}</td> * <tr><th scope="row">{@link Logger.Level#ERROR ERROR}</th>
* <td>{@link java.util.logging.Level#OFF OFF}</td> * <td>{@link java.util.logging.Level#SEVERE SEVERE}</td>
* </tr> * <tr><th scope="row">{@link Logger.Level#OFF OFF}</th>
* <td>{@link java.util.logging.Level#OFF OFF}</td>
* </tbody>
* </table> * </table>
* *
* @since 9 * @since 9

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1994, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -347,7 +347,7 @@ class Thread implements Runnable {
* the calling thread indicates to the runtime that it is busy-waiting. * the calling thread indicates to the runtime that it is busy-waiting.
* The runtime may take action to improve the performance of invoking * The runtime may take action to improve the performance of invoking
* spin-wait loop constructions. * spin-wait loop constructions.
* <p> *
* @apiNote * @apiNote
* As an example consider a method in a class that spins in a loop until * As an example consider a method in a class that spins in a loop until
* some flag is set outside of that method. A call to the {@code onSpinWait} * some flag is set outside of that method. A call to the {@code onSpinWait}
@ -373,7 +373,7 @@ class Thread implements Runnable {
* method was not called at all. However on some architectures the Java * method was not called at all. However on some architectures the Java
* Virtual Machine may issue the processor instructions to address such * Virtual Machine may issue the processor instructions to address such
* code patterns in a more beneficial way. * code patterns in a more beneficial way.
* <p> *
* @since 9 * @since 9
*/ */
@HotSpotIntrinsicCandidate @HotSpotIntrinsicCandidate

View File

@ -149,24 +149,24 @@ import java.util.Arrays;
* capture argument (corresponding to the receiver) must be non-null. * capture argument (corresponding to the receiver) must be non-null.
* *
* <p>A type Q is considered adaptable to S as follows: * <p>A type Q is considered adaptable to S as follows:
* <table class="borderless"> * <table class="striped">
* <caption style="display:none">adaptable types</caption> * <caption style="display:none">adaptable types</caption>
* <thead> * <thead>
* <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Invocation-time checks</th></tr> * <tr><th scope="col">Q</th><th scope="col">S</th><th scope="col">Link-time checks</th><th scope="col">Invocation-time checks</th></tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>Primitive</td><td>Primitive</td> * <th scope="row">Primitive</th><th scope="row">Primitive</th>
* <td>Q can be converted to S via a primitive widening conversion</td> * <td>Q can be converted to S via a primitive widening conversion</td>
* <td>None</td> * <td>None</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Primitive</td><td>Reference</td> * <th scope="row">Primitive</th><th scope="row">Reference</th>
* <td>S is a supertype of the Wrapper(Q)</td> * <td>S is a supertype of the Wrapper(Q)</td>
* <td>Cast from Wrapper(Q) to S</td> * <td>Cast from Wrapper(Q) to S</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Reference</td><td>Primitive</td> * <th scope="row">Reference</th><th scope="row">Primitive</th>
* <td>for parameter types: Q is a primitive wrapper and Primitive(Q) * <td>for parameter types: Q is a primitive wrapper and Primitive(Q)
* can be widened to S * can be widened to S
* <br>for return types: If Q is a primitive wrapper, check that * <br>for return types: If Q is a primitive wrapper, check that
@ -175,7 +175,7 @@ import java.util.Arrays;
* for example Number for numeric types</td> * for example Number for numeric types</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>Reference</td><td>Reference</td> * <th scope="row">Reference</th><th scope="row">Reference</th>
* <td>for parameter types: S is a supertype of Q * <td>for parameter types: S is a supertype of Q
* <br>for return types: none</td> * <br>for return types: none</td>
* <td>Cast from Q to S</td> * <td>Cast from Q to S</td>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -889,7 +889,7 @@ assertEquals("[A, B, C]", (String) caToString2.invokeExact('A', "BC".toCharArray
* <p> * <p>
* This method behaves very much like {@link #asSpreader(Class, int)}, but accepts an additional {@code spreadArgPos} * This method behaves very much like {@link #asSpreader(Class, int)}, but accepts an additional {@code spreadArgPos}
* argument to indicate at which position in the parameter list the spreading should take place. * argument to indicate at which position in the parameter list the spreading should take place.
* <p> *
* @apiNote Example: * @apiNote Example:
* <blockquote><pre>{@code * <blockquote><pre>{@code
MethodHandle compare = LOOKUP.findStatic(Objects.class, "compare", methodType(int.class, Object.class, Object.class, Comparator.class)); MethodHandle compare = LOOKUP.findStatic(Objects.class, "compare", methodType(int.class, Object.class, Object.class, Comparator.class));
@ -1094,7 +1094,7 @@ assertEquals("[123]", (String) longsToString.invokeExact((long)123));
* This method behaves very much like {@link #asCollector(Class, int)}, but differs in that its {@code * This method behaves very much like {@link #asCollector(Class, int)}, but differs in that its {@code
* collectArgPos} argument indicates at which position in the parameter list arguments should be collected. This * collectArgPos} argument indicates at which position in the parameter list arguments should be collected. This
* index is zero-based. * index is zero-based.
* <p> *
* @apiNote Examples: * @apiNote Examples:
* <blockquote><pre>{@code * <blockquote><pre>{@code
StringWriter swr = new StringWriter(); StringWriter swr = new StringWriter();

View File

@ -3353,7 +3353,7 @@ assert((int)twice.invokeExact(21) == 42);
* That is, it returns a zero primitive value, a {@code null}, or {@code void}. * That is, it returns a zero primitive value, a {@code null}, or {@code void}.
* <p>The returned method handle is equivalent to * <p>The returned method handle is equivalent to
* {@code dropArguments(zero(type.returnType()), 0, type.parameterList())}. * {@code dropArguments(zero(type.returnType()), 0, type.parameterList())}.
* <p> *
* @apiNote Given a predicate and target, a useful "if-then" construct can be produced as * @apiNote Given a predicate and target, a useful "if-then" construct can be produced as
* {@code guardWithTest(pred, target, empty(target.type())}. * {@code guardWithTest(pred, target, empty(target.type())}.
* @param type the type of the desired method handle * @param type the type of the desired method handle
@ -3676,7 +3676,7 @@ assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
* Given these assumptions, the result of an invocation of {@code dropArgumentsToMatch} will have the parameter type * Given these assumptions, the result of an invocation of {@code dropArgumentsToMatch} will have the parameter type
* list {@code S..., P..., M..., A...}, with the {@code P} and {@code A} types inserted as if by * list {@code S..., P..., M..., A...}, with the {@code P} and {@code A} types inserted as if by
* {@link #dropArguments(MethodHandle, int, Class[])}. * {@link #dropArguments(MethodHandle, int, Class[])}.
* <p> *
* @apiNote * @apiNote
* Two method handles whose argument lists are "effectively identical" (i.e., identical in a common prefix) may be * Two method handles whose argument lists are "effectively identical" (i.e., identical in a common prefix) may be
* mutually converted to a common type by two calls to {@code dropArgumentsToMatch}, as follows: * mutually converted to a common type by two calls to {@code dropArgumentsToMatch}, as follows:
@ -4169,7 +4169,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* position in the parameter list at which folding takes place. The argument controlling this, {@code pos}, is a * position in the parameter list at which folding takes place. The argument controlling this, {@code pos}, is a
* zero-based index. The aforementioned method {@link #foldArguments(MethodHandle, MethodHandle)} assumes position * zero-based index. The aforementioned method {@link #foldArguments(MethodHandle, MethodHandle)} assumes position
* 0. * 0.
* <p> *
* @apiNote Example: * @apiNote Example:
* <blockquote><pre>{@code * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*; import static java.lang.invoke.MethodHandles.*;
@ -4698,7 +4698,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* Note that the parameter type lists {@code (V...)} and {@code (A...)} have been expanded * Note that the parameter type lists {@code (V...)} and {@code (A...)} have been expanded
* to their full length, even though individual clause functions may neglect to take them all. * to their full length, even though individual clause functions may neglect to take them all.
* As noted above, missing parameters are filled in as if by {@link #dropArgumentsToMatch}. * As noted above, missing parameters are filled in as if by {@link #dropArgumentsToMatch}.
* <p> *
* @apiNote Example: * @apiNote Example:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* // iterative implementation of the factorial function as a loop handle * // iterative implementation of the factorial function as a loop handle
@ -4991,7 +4991,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* return v; * return v;
* } * }
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example: * @apiNote Example:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* // implement the zip function for lists as a loop handle * // implement the zip function for lists as a loop handle
@ -5010,7 +5010,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* assertEquals(zipped, (List<String>) loop.invoke(a.iterator(), b.iterator())); * assertEquals(zipped, (List<String>) loop.invoke(a.iterator(), b.iterator()));
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> *
* @apiNote The implementation of this method can be expressed as follows: * @apiNote The implementation of this method can be expressed as follows:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* MethodHandle whileLoop(MethodHandle init, MethodHandle pred, MethodHandle body) { * MethodHandle whileLoop(MethodHandle init, MethodHandle pred, MethodHandle body) {
@ -5104,7 +5104,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* return v; * return v;
* } * }
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example: * @apiNote Example:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* // int i = 0; while (i < limit) { ++i; } return i; => limit * // int i = 0; while (i < limit) { ++i; } return i; => limit
@ -5116,7 +5116,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* assertEquals(23, loop.invoke(23)); * assertEquals(23, loop.invoke(23));
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> *
* @apiNote The implementation of this method can be expressed as follows: * @apiNote The implementation of this method can be expressed as follows:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* MethodHandle doWhileLoop(MethodHandle init, MethodHandle body, MethodHandle pred) { * MethodHandle doWhileLoop(MethodHandle init, MethodHandle body, MethodHandle pred) {
@ -5248,7 +5248,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* return v; * return v;
* } * }
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example with a fully conformant body method: * @apiNote Example with a fully conformant body method:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* // String s = "Lambdaman!"; for (int i = 0; i < 13; ++i) { s = "na " + s; } return s; * // String s = "Lambdaman!"; for (int i = 0; i < 13; ++i) { s = "na " + s; } return s;
@ -5260,7 +5260,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* MethodHandle loop = MethodHandles.countedLoop(fit13, start, MH_step); * MethodHandle loop = MethodHandles.countedLoop(fit13, start, MH_step);
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("Lambdaman!")); * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("Lambdaman!"));
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example with the simplest possible body method type, * @apiNote Example with the simplest possible body method type,
* and passing the number of iterations to the loop invocation: * and passing the number of iterations to the loop invocation:
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -5273,7 +5273,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* MethodHandle loop = MethodHandles.countedLoop(count, start, MH_step); // (v, i) -> "na " + v * MethodHandle loop = MethodHandles.countedLoop(count, start, MH_step); // (v, i) -> "na " + v
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "Lambdaman!")); * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "Lambdaman!"));
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example that treats the number of iterations, string to append to, and string to append * @apiNote Example that treats the number of iterations, string to append to, and string to append
* as loop parameters: * as loop parameters:
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -5286,7 +5286,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* MethodHandle loop = MethodHandles.countedLoop(count, start, MH_step); // (v, i, _, pre, _) -> pre + " " + v * MethodHandle loop = MethodHandles.countedLoop(count, start, MH_step); // (v, i, _, pre, _) -> pre + " " + v
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "na", "Lambdaman!")); * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "na", "Lambdaman!"));
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example that illustrates the usage of {@link #dropArgumentsToMatch(MethodHandle, int, List, int)} * @apiNote Example that illustrates the usage of {@link #dropArgumentsToMatch(MethodHandle, int, List, int)}
* to enforce a loop type: * to enforce a loop type:
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -5301,7 +5301,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* MethodHandle loop = MethodHandles.countedLoop(count, start, body); // (v, i, pre, _, _) -> pre + " " + v * MethodHandle loop = MethodHandles.countedLoop(count, start, body); // (v, i, pre, _, _) -> pre + " " + v
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("na", 13, "Lambdaman!")); * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("na", 13, "Lambdaman!"));
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote The implementation of this method can be expressed as follows: * @apiNote The implementation of this method can be expressed as follows:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* MethodHandle countedLoop(MethodHandle iterations, MethodHandle init, MethodHandle body) { * MethodHandle countedLoop(MethodHandle iterations, MethodHandle init, MethodHandle body) {
@ -5406,7 +5406,6 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* } * }
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p>
* @apiNote The implementation of this method can be expressed as follows: * @apiNote The implementation of this method can be expressed as follows:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* MethodHandle countedLoop(MethodHandle start, MethodHandle end, MethodHandle init, MethodHandle body) { * MethodHandle countedLoop(MethodHandle start, MethodHandle end, MethodHandle init, MethodHandle body) {
@ -5607,7 +5606,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* return v; * return v;
* } * }
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote Example: * @apiNote Example:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* // get an iterator from a list * // get an iterator from a list
@ -5622,7 +5621,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* List<String> reversedList = Arrays.asList("e", "d", "c", "b", "a"); * List<String> reversedList = Arrays.asList("e", "d", "c", "b", "a");
* assertEquals(reversedList, (List<String>) loop.invoke(list)); * assertEquals(reversedList, (List<String>) loop.invoke(list));
* }</pre></blockquote> * }</pre></blockquote>
* <p> *
* @apiNote The implementation of this method can be expressed approximately as follows: * @apiNote The implementation of this method can be expressed approximately as follows:
* <blockquote><pre>{@code * <blockquote><pre>{@code
* MethodHandle iteratedLoop(MethodHandle iterator, MethodHandle init, MethodHandle body) { * MethodHandle iteratedLoop(MethodHandle iterator, MethodHandle init, MethodHandle body) {

View File

@ -165,28 +165,33 @@
* <p> * <p>
* Given these rules, here are examples of legal bootstrap method declarations, * Given these rules, here are examples of legal bootstrap method declarations,
* given various numbers {@code N} of extra arguments. * given various numbers {@code N} of extra arguments.
* The first rows (marked {@code *}) will work for any number of extra arguments. * The first row (marked {@code *}) will work for any number of extra arguments.
* <table class="plain"> * <table class="plain" style="vertical-align:top">
* <caption style="display:none">Static argument types</caption> * <caption style="display:none">Static argument types</caption>
* <tr><th>N</th><th>Sample bootstrap method</th></tr> * <thead>
* <tr><td>*</td> * <tr><th scope="col">N</th><th scope="col">Sample bootstrap method</th></tr>
* <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr> * </thead>
* <tr><td>*</td><td> * <tbody>
* <code>CallSite bootstrap(Object... args)</code></td></tr> * <tr><th scope="row" style="font-weight:normal; vertical-align:top">*</th><td>
* <tr><td>*</td><td> * <ul style="list-style:none; padding-left: 0; margin:0">
* <code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr> * <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
* <tr><td>0</td><td> * <li><code>CallSite bootstrap(Object... args)</code>
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr> * <li><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code>
* <tr><td>0</td><td> * </ul></td></tr>
* <code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr> * <tr><th scope="row" style="font-weight:normal; vertical-align:top">0</th><td>
* <tr><td>1</td><td> * <ul style="list-style:none; padding-left: 0; margin:0">
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code>
* <li><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code>
* </ul></td></tr>
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">1</th><td>
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr> * <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
* <tr><td>2</td><td> * <tr><th scope="row" style="font-weight:normal; vertical-align:top">2</th><td>
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr> * <ul style="list-style:none; padding-left: 0; margin:0">
* <tr><td>2</td><td> * <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr> * <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code>
* <tr><td>2</td> * <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code>
* <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr> * </ul></td></tr>
* </tbody>
* </table> * </table>
* The last example assumes that the extra arguments are of type * The last example assumes that the extra arguments are of type
* {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively. * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.

View File

@ -108,27 +108,39 @@ import sun.reflect.annotation.AnnotationType;
* <table class="plain"> * <table class="plain">
* <caption>Overview of kind of presence detected by different AnnotatedElement methods</caption> * <caption>Overview of kind of presence detected by different AnnotatedElement methods</caption>
* <thead> * <thead>
* <tr><th colspan=2></th><th colspan=4>Kind of Presence</th> * <tr><th colspan=2 scope="col">Method</th>
* <tr><th colspan=2>Method</th><th>Directly Present</th><th>Indirectly Present</th><th>Present</th><th>Associated</th> * <th colspan=4 scope="col">Kind of Presence</th>
* <tr><th scope="col">Return Type</th>
* <th scope="col">Signature</th>
* <th scope="col">Directly Present</th>
* <th scope="col">Indirectly Present</th>
* <th scope="col">Present</th>
* <th scope="col">Associated</th>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><td style="text-align:right">{@code T}</td><td>{@link #getAnnotation(Class) getAnnotation(Class&lt;T&gt;)} * <tr><td style="text-align:right">{@code T}</td>
* <td></td><td></td><td>X</td><td></td> * <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotation(Class) getAnnotation(Class&lt;T&gt;)}
* <td></td><td></td><td style="text-align:center">X</td><td></td>
* </tr> * </tr>
* <tr><td style="text-align:right">{@code Annotation[]}</td><td>{@link #getAnnotations getAnnotations()} * <tr><td style="text-align:right">{@code Annotation[]}</td>
* <td></td><td></td><td>X</td><td></td> * <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotations getAnnotations()}
* <td></td><td></td><td style="text-align:center">X</td><td></td>
* </tr> * </tr>
* <tr><td style="text-align:right">{@code T[]}</td><td>{@link #getAnnotationsByType(Class) getAnnotationsByType(Class&lt;T&gt;)} * <tr><td style="text-align:right">{@code T[]}</td>
* <td></td><td></td><td></td><td>X</td> * <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotationsByType(Class) getAnnotationsByType(Class&lt;T&gt;)}
* <td></td><td></td><td></td><td style="text-align:center">X</td>
* </tr> * </tr>
* <tr><td style="text-align:right">{@code T}</td><td>{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class&lt;T&gt;)} * <tr><td style="text-align:right">{@code T}</td>
* <td>X</td><td></td><td></td><td></td> * <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class&lt;T&gt;)}
* <td style="text-align:center">X</td><td></td><td></td><td></td>
* </tr> * </tr>
* <tr><td style="text-align:right">{@code Annotation[]}</td><td>{@link #getDeclaredAnnotations getDeclaredAnnotations()} * <tr><td style="text-align:right">{@code Annotation[]}</td>
* <td>X</td><td></td><td></td><td></td> * <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotations getDeclaredAnnotations()}
* <td style="text-align:center">X</td><td></td><td></td><td></td>
* </tr> * </tr>
* <tr><td style="text-align:right">{@code T[]}</td><td>{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class&lt;T&gt;)} * <tr><td style="text-align:right">{@code T[]}</td>
* <td>X</td><td>X</td><td></td><td></td> * <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class&lt;T&gt;)}
* <td style="text-align:center">X</td><td style="text-align:center">X</td><td></td><td></td>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -120,18 +120,18 @@ import java.util.Arrays;
* preferred scale for representing a result. The preferred * preferred scale for representing a result. The preferred
* scale for each operation is listed in the table below. * scale for each operation is listed in the table below.
* *
* <table class="plain"> * <table class="striped" style="text-align:left">
* <caption><b>Preferred Scales for Results of Arithmetic Operations * <caption>Preferred Scales for Results of Arithmetic Operations
* </b></caption> * </caption>
* <thead> * <thead>
* <tr><th>Operation</th><th>Preferred Scale of Result</th></tr> * <tr><th scope="col">Operation</th><th scope="col">Preferred Scale of Result</th></tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><td>Add</td><td>max(addend.scale(), augend.scale())</td> * <tr><th scope="row">Add</th><td>max(addend.scale(), augend.scale())</td>
* <tr><td>Subtract</td><td>max(minuend.scale(), subtrahend.scale())</td> * <tr><th scope="row">Subtract</th><td>max(minuend.scale(), subtrahend.scale())</td>
* <tr><td>Multiply</td><td>multiplier.scale() + multiplicand.scale()</td> * <tr><th scope="row">Multiply</th><td>multiplier.scale() + multiplicand.scale()</td>
* <tr><td>Divide</td><td>dividend.scale() - divisor.scale()</td> * <tr><th scope="row">Divide</th><td>dividend.scale() - divisor.scale()</td>
* <tr><td>Square root</td><td>radicand.scale()/2</td> * <tr><th scope="row">Square root</th><td>radicand.scale()/2</td>
* </tbody> * </tbody>
* </table> * </table>
* *

View File

@ -51,13 +51,13 @@ package java.math;
* proper {@code MathContext}. A summary table showing the results * proper {@code MathContext}. A summary table showing the results
* of these rounding operations for all rounding modes appears below. * of these rounding operations for all rounding modes appears below.
* *
*<table class="plain"> *<table class="striped">
* <caption><b>Summary of Rounding Operations Under Different Rounding Modes</b></caption> * <caption><b>Summary of Rounding Operations Under Different Rounding Modes</b></caption>
* <thead> * <thead>
* <tr><th></th><th colspan=8>Result of rounding input to one digit with the given * <tr><th scope="col" rowspan="2">Input Number</th><th scope="col"colspan=8>Result of rounding input to one digit with the given
* rounding mode</th> * rounding mode</th>
* <tr style="vertical-align:top"> * <tr style="vertical-align:top">
* <th>Input Number</th> <th>{@code UP}</th> * <th>{@code UP}</th>
* <th>{@code DOWN}</th> * <th>{@code DOWN}</th>
* <th>{@code CEILING}</th> * <th>{@code CEILING}</th>
* <th>{@code FLOOR}</th> * <th>{@code FLOOR}</th>
@ -66,18 +66,18 @@ package java.math;
* <th>{@code HALF_EVEN}</th> * <th>{@code HALF_EVEN}</th>
* <th>{@code UNNECESSARY}</th> * <th>{@code UNNECESSARY}</th>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:right">
* *
* <tr style="text-align:right"><td>5.5</td> <td>6</td> <td>5</td> <td>6</td> <td>5</td> <td>6</td> <td>5</td> <td>6</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">5.5</th> <td>6</td> <td>5</td> <td>6</td> <td>5</td> <td>6</td> <td>5</td> <td>6</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>2.5</td> <td>3</td> <td>2</td> <td>3</td> <td>2</td> <td>3</td> <td>2</td> <td>2</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">2.5</th> <td>3</td> <td>2</td> <td>3</td> <td>2</td> <td>3</td> <td>2</td> <td>2</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>1.6</td> <td>2</td> <td>1</td> <td>2</td> <td>1</td> <td>2</td> <td>2</td> <td>2</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">1.6</th> <td>2</td> <td>1</td> <td>2</td> <td>1</td> <td>2</td> <td>2</td> <td>2</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>1.1</td> <td>2</td> <td>1</td> <td>2</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">1.1</th> <td>2</td> <td>1</td> <td>2</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>1.0</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> * <tr><th scope="row">1.0</th> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td>
* <tr style="text-align:right"><td>-1.0</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> * <tr><th scope="row">-1.0</th> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>-1</td>
* <tr style="text-align:right"><td>-1.1</td> <td>-2</td> <td>-1</td> <td>-1</td> <td>-2</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">-1.1</th> <td>-2</td> <td>-1</td> <td>-1</td> <td>-2</td> <td>-1</td> <td>-1</td> <td>-1</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>-1.6</td> <td>-2</td> <td>-1</td> <td>-1</td> <td>-2</td> <td>-2</td> <td>-2</td> <td>-2</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">-1.6</th> <td>-2</td> <td>-1</td> <td>-1</td> <td>-2</td> <td>-2</td> <td>-2</td> <td>-2</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>-2.5</td> <td>-3</td> <td>-2</td> <td>-2</td> <td>-3</td> <td>-3</td> <td>-2</td> <td>-2</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">-2.5</th> <td>-3</td> <td>-2</td> <td>-2</td> <td>-3</td> <td>-3</td> <td>-2</td> <td>-2</td> <td>throw {@code ArithmeticException}</td>
* <tr style="text-align:right"><td>-5.5</td> <td>-6</td> <td>-5</td> <td>-5</td> <td>-6</td> <td>-6</td> <td>-5</td> <td>-6</td> <td>throw {@code ArithmeticException}</td> * <tr><th scope="row">-5.5</th> <td>-6</td> <td>-5</td> <td>-5</td> <td>-6</td> <td>-6</td> <td>-5</td> <td>-6</td> <td>throw {@code ArithmeticException}</td>
* </tbody> * </tbody>
* </table> * </table>
* *
@ -104,23 +104,23 @@ public enum RoundingMode {
* value. * value.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode UP Examples</b></caption> * <caption>Rounding mode UP Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code UP} rounding * <th scope="col">Input rounded to one digit<br> with {@code UP} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>6</td> *<tr><th scope="row">5.5</th> <td>6</td>
*<tr style="text-align:right"><td>2.5</td> <td>3</td> *<tr><th scope="row">2.5</th> <td>3</td>
*<tr style="text-align:right"><td>1.6</td> <td>2</td> *<tr><th scope="row">1.6</th> <td>2</td>
*<tr style="text-align:right"><td>1.1</td> <td>2</td> *<tr><th scope="row">1.1</th> <td>2</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-2</td> *<tr><th scope="row">-1.1</th> <td>-2</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td> *<tr><th scope="row">-1.6</th> <td>-2</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-3</td> *<tr><th scope="row">-2.5</th> <td>-3</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td> *<tr><th scope="row">-5.5</th> <td>-6</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -132,23 +132,23 @@ public enum RoundingMode {
* rounding mode never increases the magnitude of the calculated value. * rounding mode never increases the magnitude of the calculated value.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode DOWN Examples</b></caption> * <caption>Rounding mode DOWN Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code DOWN} rounding * <th scope="col">Input rounded to one digit<br> with {@code DOWN} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>5</td> *<tr><th scope="row">5.5</th> <td>5</td>
*<tr style="text-align:right"><td>2.5</td> <td>2</td> *<tr><th scope="row">2.5</th> <td>2</td>
*<tr style="text-align:right"><td>1.6</td> <td>1</td> *<tr><th scope="row">1.6</th> <td>1</td>
*<tr style="text-align:right"><td>1.1</td> <td>1</td> *<tr><th scope="row">1.1</th> <td>1</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td> *<tr><th scope="row">-1.1</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-1</td> *<tr><th scope="row">-1.6</th> <td>-1</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td> *<tr><th scope="row">-2.5</th> <td>-2</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-5</td> *<tr><th scope="row">-5.5</th> <td>-5</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -161,23 +161,23 @@ public enum RoundingMode {
* that this rounding mode never decreases the calculated value. * that this rounding mode never decreases the calculated value.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode CEILING Examples</b></caption> * <caption>Rounding mode CEILING Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th>Input Number</th>
* <th>Input rounded to one digit<br> with {@code CEILING} rounding * <th>Input rounded to one digit<br> with {@code CEILING} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>6</td> *<tr><th scope="row">5.5</th> <td>6</td>
*<tr style="text-align:right"><td>2.5</td> <td>3</td> *<tr><th scope="row">2.5</th> <td>3</td>
*<tr style="text-align:right"><td>1.6</td> <td>2</td> *<tr><th scope="row">1.6</th> <td>2</td>
*<tr style="text-align:right"><td>1.1</td> <td>2</td> *<tr><th scope="row">1.1</th> <td>2</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td> *<tr><th scope="row">-1.1</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-1</td> *<tr><th scope="row">-1.6</th> <td>-1</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td> *<tr><th scope="row">-2.5</th> <td>-2</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-5</td> *<tr><th scope="row">-5.5</th> <td>-5</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -190,23 +190,23 @@ public enum RoundingMode {
* this rounding mode never increases the calculated value. * this rounding mode never increases the calculated value.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode FLOOR Examples</b></caption> * <caption>Rounding mode FLOOR Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code FLOOR} rounding * <th scope="col">Input rounded to one digit<br> with {@code FLOOR} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>5</td> *<tr><th scope="row">5.5</th> <td>5</td>
*<tr style="text-align:right"><td>2.5</td> <td>2</td> *<tr><th scope="row">2.5</th> <td>2</td>
*<tr style="text-align:right"><td>1.6</td> <td>1</td> *<tr><th scope="row">1.6</th> <td>1</td>
*<tr style="text-align:right"><td>1.1</td> <td>1</td> *<tr><th scope="row">1.1</th> <td>1</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-2</td> *<tr><th scope="row">-1.1</th> <td>-2</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td> *<tr><th scope="row">-1.6</th> <td>-2</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-3</td> *<tr><th scope="row">-2.5</th> <td>-3</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td> *<tr><th scope="row">-5.5</th> <td>-6</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -221,23 +221,23 @@ public enum RoundingMode {
* mode commonly taught at school. * mode commonly taught at school.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode HALF_UP Examples</b></caption> * <caption>Rounding mode HALF_UP Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code HALF_UP} rounding * <th scope="col">Input rounded to one digit<br> with {@code HALF_UP} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>6</td> *<tr><th scope="row">5.5</th> <td>6</td>
*<tr style="text-align:right"><td>2.5</td> <td>3</td> *<tr><th scope="row">2.5</th> <td>3</td>
*<tr style="text-align:right"><td>1.6</td> <td>2</td> *<tr><th scope="row">1.6</th> <td>2</td>
*<tr style="text-align:right"><td>1.1</td> <td>1</td> *<tr><th scope="row">1.1</th> <td>1</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td> *<tr><th scope="row">-1.1</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td> *<tr><th scope="row">-1.6</th> <td>-2</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-3</td> *<tr><th scope="row">-2.5</th> <td>-3</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td> *<tr><th scope="row">-5.5</th> <td>-6</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -251,23 +251,23 @@ public enum RoundingMode {
* {@code RoundingMode.DOWN}. * {@code RoundingMode.DOWN}.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode HALF_DOWN Examples</b></caption> * <caption>Rounding mode HALF_DOWN Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code HALF_DOWN} rounding * <th scope="col">Input rounded to one digit<br> with {@code HALF_DOWN} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>5</td> *<tr><th scope="row">5.5</th> <td>5</td>
*<tr style="text-align:right"><td>2.5</td> <td>2</td> *<tr><th scope="row">2.5</th> <td>2</td>
*<tr style="text-align:right"><td>1.6</td> <td>2</td> *<tr><th scope="row">1.6</th> <td>2</td>
*<tr style="text-align:right"><td>1.1</td> <td>1</td> *<tr><th scope="row">1.1</th> <td>1</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td> *<tr><th scope="row">-1.1</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td> *<tr><th scope="row">-1.6</th> <td>-2</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td> *<tr><th scope="row">-2.5</th> <td>-2</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-5</td> *<tr><th scope="row">-5.5</th> <td>-5</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -288,23 +288,23 @@ public enum RoundingMode {
* arithmetic in Java. * arithmetic in Java.
* *
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode HALF_EVEN Examples</b></caption> * <caption>Rounding mode HALF_EVEN Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code HALF_EVEN} rounding * <th scope="col">Input rounded to one digit<br> with {@code HALF_EVEN} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>6</td> *<tr><th scope="row">5.5</th> <td>6</td>
*<tr style="text-align:right"><td>2.5</td> <td>2</td> *<tr><th scope="row">2.5</th> <td>2</td>
*<tr style="text-align:right"><td>1.6</td> <td>2</td> *<tr><th scope="row">1.6</th> <td>2</td>
*<tr style="text-align:right"><td>1.1</td> <td>1</td> *<tr><th scope="row">1.1</th> <td>1</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td> *<tr><th scope="row">-1.1</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td> *<tr><th scope="row">-1.6</th> <td>-2</td>
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td> *<tr><th scope="row">-2.5</th> <td>-2</td>
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td> *<tr><th scope="row">-5.5</th> <td>-6</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */
@ -316,23 +316,23 @@ public enum RoundingMode {
* specified on an operation that yields an inexact result, an * specified on an operation that yields an inexact result, an
* {@code ArithmeticException} is thrown. * {@code ArithmeticException} is thrown.
*<p>Example: *<p>Example:
*<table class="plain"> *<table class="striped">
* <caption><b>Rounding mode UNNECESSARY Examples</b></caption> * <caption>Rounding mode UNNECESSARY Examples</caption>
*<thead> *<thead>
*<tr style="vertical-align:top"><th>Input Number</th> *<tr style="vertical-align:top"><th scope="col">Input Number</th>
* <th>Input rounded to one digit<br> with {@code UNNECESSARY} rounding * <th scope="col">Input rounded to one digit<br> with {@code UNNECESSARY} rounding
*</thead> *</thead>
*<tbody> *<tbody style="text-align:right">
*<tr style="text-align:right"><td>5.5</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">5.5</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>2.5</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">2.5</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>1.6</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">1.6</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>1.1</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">1.1</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>1.0</td> <td>1</td> *<tr><th scope="row">1.0</th> <td>1</td>
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td> *<tr><th scope="row">-1.0</th> <td>-1</td>
*<tr style="text-align:right"><td>-1.1</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">-1.1</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>-1.6</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">-1.6</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>-2.5</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">-2.5</th> <td>throw {@code ArithmeticException}</td>
*<tr style="text-align:right"><td>-5.5</td> <td>throw {@code ArithmeticException}</td> *<tr><th scope="row">-5.5</th> <td>throw {@code ArithmeticException}</td>
*</tbody> *</tbody>
*</table> *</table>
*/ */

View File

@ -72,10 +72,13 @@ import sun.net.util.IPAddressUtil;
* *
* <h3> Address types </h3> * <h3> Address types </h3>
* *
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Description of unicast and multicast address types</caption> * <caption style="display:none">Description of unicast and multicast address types</caption>
* <thead>
* <tr><th scope="col">Address Type</th><th scope="col">Description</th></tr>
* </thead>
* <tbody> * <tbody>
* <tr><th style="vertical-align:top"><i>unicast</i></th> * <tr><th scope="row" style="vertical-align:top">unicast</th>
* <td>An identifier for a single interface. A packet sent to * <td>An identifier for a single interface. A packet sent to
* a unicast address is delivered to the interface identified by * a unicast address is delivered to the interface identified by
* that address. * that address.
@ -94,12 +97,12 @@ import sun.net.util.IPAddressUtil;
* IP address loops around and becomes IP input on the local * IP address loops around and becomes IP input on the local
* host. This address is often used when testing a * host. This address is often used when testing a
* client.</td></tr> * client.</td></tr>
* <tr><th style="vertical-align:top"><i>multicast</i></th> * <tr><th scope="row" style="vertical-align:top">multicast</th>
* <td>An identifier for a set of interfaces (typically belonging * <td>An identifier for a set of interfaces (typically belonging
* to different nodes). A packet sent to a multicast address is * to different nodes). A packet sent to a multicast address is
* delivered to all interfaces identified by that address.</td></tr> * delivered to all interfaces identified by that address.</td></tr>
* </tbody> * </tbody>
* </table></blockquote> * </table>
* *
* <h4> IP address scope </h4> * <h4> IP address scope </h4>
* *
@ -163,8 +166,7 @@ import sun.net.util.IPAddressUtil;
* <p> Two Java security properties control the TTL values used for * <p> Two Java security properties control the TTL values used for
* positive and negative host name resolution caching: * positive and negative host name resolution caching:
* *
* <blockquote> * <dl style="margin-left:2em">
* <dl>
* <dt><b>networkaddress.cache.ttl</b></dt> * <dt><b>networkaddress.cache.ttl</b></dt>
* <dd>Indicates the caching policy for successful name lookups from * <dd>Indicates the caching policy for successful name lookups from
* the name service. The value is specified as an integer to indicate * the name service. The value is specified as an integer to indicate
@ -183,7 +185,6 @@ import sun.net.util.IPAddressUtil;
* A value of -1 indicates "cache forever". * A value of -1 indicates "cache forever".
* </dd> * </dd>
* </dl> * </dl>
* </blockquote>
* *
* @author Chris Warth * @author Chris Warth
* @see java.net.InetAddress#getByAddress(byte[]) * @see java.net.InetAddress#getByAddress(byte[])

View File

@ -132,23 +132,23 @@ import java.lang.NullPointerException; // for javadoc
* *
* <p> All told, then, a URI instance has the following nine components: * <p> All told, then, a URI instance has the following nine components:
* *
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment</caption> * <caption style="display:none">Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment</caption>
* <thead> * <thead>
* <tr><th><i>Component</i></th><th><i>Type</i></th></tr> * <tr><th scope="col">Component</th><th scope="col">Type</th></tr>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td>scheme</td><td>{@code String}</td></tr> * <tr><th scope="row">scheme</th><td>{@code String}</td></tr>
* <tr><td>scheme-specific-part&nbsp;&nbsp;&nbsp;&nbsp;</td><td>{@code String}</td></tr> * <tr><th scope="row">scheme-specific-part</th><td>{@code String}</td></tr>
* <tr><td>authority</td><td>{@code String}</td></tr> * <tr><th scope="row">authority</th><td>{@code String}</td></tr>
* <tr><td>user-info</td><td>{@code String}</td></tr> * <tr><th scope="row">user-info</th><td>{@code String}</td></tr>
* <tr><td>host</td><td>{@code String}</td></tr> * <tr><th scope="row">host</th><td>{@code String}</td></tr>
* <tr><td>port</td><td>{@code int}</td></tr> * <tr><th scope="row">port</th><td>{@code int}</td></tr>
* <tr><td>path</td><td>{@code String}</td></tr> * <tr><th scope="row">path</th><td>{@code String}</td></tr>
* <tr><td>query</td><td>{@code String}</td></tr> * <tr><th scope="row">query</th><td>{@code String}</td></tr>
* <tr><td>fragment</td><td>{@code String}</td></tr> * <tr><th scope="row">fragment</th><td>{@code String}</td></tr>
* </tbody> * </tbody>
* </table></blockquote> * </table>
* *
* In a given instance any particular component is either <i>undefined</i> or * In a given instance any particular component is either <i>undefined</i> or
* <i>defined</i> with a distinct value. Undefined string components are * <i>defined</i> with a distinct value. Undefined string components are
@ -253,32 +253,35 @@ import java.lang.NullPointerException; // for javadoc
* which are taken from that specification, are used below to describe these * which are taken from that specification, are used below to describe these
* constraints: * constraints:
* *
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption> * <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption>
* <tbody> * <thead>
* <tr><th style="vertical-align:top"><i>alpha</i></th> * <tr><th scope="col">Category</th><th scope="col">Description</th></tr>
* </thead>
* <tbody style="text-align:left">
* <tr><th scope="row" style="vertical-align:top">alpha</th>
* <td>The US-ASCII alphabetic characters, * <td>The US-ASCII alphabetic characters,
* {@code 'A'}&nbsp;through&nbsp;{@code 'Z'} * {@code 'A'}&nbsp;through&nbsp;{@code 'Z'}
* and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr> * and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr>
* <tr><th style="vertical-align:top"><i>digit</i></th> * <tr><th scope="row" style="vertical-align:top">digit</th>
* <td>The US-ASCII decimal digit characters, * <td>The US-ASCII decimal digit characters,
* {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr> * {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr>
* <tr><th style="vertical-align:top"><i>alphanum</i></th> * <tr><th scope="row" style="vertical-align:top">alphanum</th>
* <td>All <i>alpha</i> and <i>digit</i> characters</td></tr> * <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
* <tr><th style="vertical-align:top"><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th> * <tr><th scope="row" style="vertical-align:top">unreserved</th>
* <td>All <i>alphanum</i> characters together with those in the string * <td>All <i>alphanum</i> characters together with those in the string
* {@code "_-!.~'()*"}</td></tr> * {@code "_-!.~'()*"}</td></tr>
* <tr><th style="vertical-align:top"><i>punct</i></th> * <tr><th scope="row" style="vertical-align:top">punct</th>
* <td>The characters in the string {@code ",;:$&+="}</td></tr> * <td>The characters in the string {@code ",;:$&+="}</td></tr>
* <tr><th style="vertical-align:top"><i>reserved</i></th> * <tr><th scope="row" style="vertical-align:top">reserved</th>
* <td>All <i>punct</i> characters together with those in the string * <td>All <i>punct</i> characters together with those in the string
* {@code "?/[]@"}</td></tr> * {@code "?/[]@"}</td></tr>
* <tr><th style="vertical-align:top"><i>escaped</i></th> * <tr><th scope="row" style="vertical-align:top">escaped</th>
* <td>Escaped octets, that is, triplets consisting of the percent * <td>Escaped octets, that is, triplets consisting of the percent
* character ({@code '%'}) followed by two hexadecimal digits * character ({@code '%'}) followed by two hexadecimal digits
* ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and * ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
* {@code 'a'}-{@code 'f'})</td></tr> * {@code 'a'}-{@code 'f'})</td></tr>
* <tr><th style="vertical-align:top"><i>other</i></th> * <tr><th scope="row" style="vertical-align:top">other</th>
* <td>The Unicode characters that are not in the US-ASCII character set, * <td>The Unicode characters that are not in the US-ASCII character set,
* are not control characters (according to the {@link * are not control characters (according to the {@link
* java.lang.Character#isISOControl(char) Character.isISOControl} * java.lang.Character#isISOControl(char) Character.isISOControl}
@ -287,7 +290,7 @@ import java.lang.NullPointerException; // for javadoc
* method)&nbsp;&nbsp;<i>(<b>Deviation from RFC 2396</b>, which is * method)&nbsp;&nbsp;<i>(<b>Deviation from RFC 2396</b>, which is
* limited to US-ASCII)</i></td></tr> * limited to US-ASCII)</i></td></tr>
* </tbody> * </tbody>
* </table></blockquote> * </table>
* *
* <p><a id="legal-chars"></a> The set of all legal URI characters consists of * <p><a id="legal-chars"></a> The set of all legal URI characters consists of
* the <i>unreserved</i>, <i>reserved</i>, <i>escaped</i>, and <i>other</i> * the <i>unreserved</i>, <i>reserved</i>, <i>escaped</i>, and <i>other</i>

View File

@ -51,31 +51,16 @@ import sun.security.action.GetPropertyAction;
* The abstract class {@code URLConnection} is the superclass * The abstract class {@code URLConnection} is the superclass
* of all classes that represent a communications link between the * of all classes that represent a communications link between the
* application and a URL. Instances of this class can be used both to * application and a URL. Instances of this class can be used both to
* read from and to write to the resource referenced by the URL. In * read from and to write to the resource referenced by the URL.
* general, creating a connection to a URL is a multistep process:
*
* <div style="text-align:center"><table class="plain" style="margin:0 auto">
* <caption style="display:none">Describes the process of creating a connection to a URL: openConnection() and connect() over time.</caption>
* <thead>
* <tr><th>{@code openConnection()}</th>
* <th>{@code connect()}</th></tr>
* </thead>
* <tbody>
* <tr><td>Manipulate parameters that affect the connection to the remote
* resource.</td>
* <td>Interact with the resource; query header fields and
* contents.</td></tr>
* </tbody>
* </table>
* ----------------------------&gt;
* <br>time</div>
* *
* <p>
* In general, creating a connection to a URL is a multistep process:
* <ol> * <ol>
* <li>The connection object is created by invoking the * <li>The connection object is created by invoking the
* {@code openConnection} method on a URL. * {@link URL#openConnection() openConnection} method on a URL.
* <li>The setup parameters and general request properties are manipulated. * <li>The setup parameters and general request properties are manipulated.
* <li>The actual connection to the remote object is made, using the * <li>The actual connection to the remote object is made, using the
* {@code connect} method. * {@link #connect() connect} method.
* <li>The remote object becomes available. The header fields and the contents * <li>The remote object becomes available. The header fields and the contents
* of the remote object can be accessed. * of the remote object can be accessed.
* </ol> * </ol>

View File

@ -72,22 +72,22 @@ import java.security.Permission;
* separated by '/' characters. <i>path</i> may also be empty. The path is specified * separated by '/' characters. <i>path</i> may also be empty. The path is specified
* in a similar way to the path in {@link java.io.FilePermission}. There are * in a similar way to the path in {@link java.io.FilePermission}. There are
* three different ways as the following examples show: * three different ways as the following examples show:
* <table class="plain"> * <table class="striped">
* <caption>URL Examples</caption> * <caption>URL Examples</caption>
* <thead> * <thead>
* <tr><th>Example url</th><th>Description</th></tr> * <tr><th scope="col">Example url</th><th scope="col">Description</th></tr>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td> * <tr><th scope="row" style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</th>
* <td>A url which identifies a specific (single) resource</td> * <td>A url which identifies a specific (single) resource</td>
* </tr> * </tr>
* <tr><td>http://www.oracle.com/a/b/*</td> * <tr><th scope="row">http://www.oracle.com/a/b/*</th>
* <td>The '*' character refers to all resources in the same "directory" - in * <td>The '*' character refers to all resources in the same "directory" - in
* other words all resources with the same number of path components, and * other words all resources with the same number of path components, and
* which only differ in the final path component, represented by the '*'. * which only differ in the final path component, represented by the '*'.
* </td> * </td>
* </tr> * </tr>
* <tr><td>http://www.oracle.com/a/b/-</td> * <tr><th scope="row">http://www.oracle.com/a/b/-</th>
* <td>The '-' character refers to all resources recursively below the * <td>The '-' character refers to all resources recursively below the
* preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this * preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
* example). * example).
@ -114,11 +114,12 @@ import java.security.Permission;
* methods and permitted request headers of the permission (respectively). The two lists * methods and permitted request headers of the permission (respectively). The two lists
* are separated by a colon ':' character and elements of each list are comma separated. * are separated by a colon ':' character and elements of each list are comma separated.
* Some examples are: * Some examples are:
* <pre> * <ul>
* "POST,GET,DELETE" * <li>"POST,GET,DELETE"
* "GET:X-Foo-Request,X-Bar-Request" * <li>"GET:X-Foo-Request,X-Bar-Request"
* "POST,GET:Header1,Header2" * <li>"POST,GET:Header1,Header2"
* </pre> * </ul>
* <p>
* The first example specifies the methods: POST, GET and DELETE, but no request headers. * The first example specifies the methods: POST, GET and DELETE, but no request headers.
* The second example specifies one request method and two headers. The third * The second example specifies one request method and two headers. The third
* example specifies two request methods, and two headers. * example specifies two request methods, and two headers.
@ -253,16 +254,16 @@ public final class URLPermission extends Permission {
* <table class="plain"> * <table class="plain">
* <caption>Examples of Path Matching</caption> * <caption>Examples of Path Matching</caption>
* <thead> * <thead>
* <tr><th>this's path</th><th>p's path</th><th>match</th></tr> * <tr><th scope="col">this's path</th><th scope="col">p's path</th><th>match</th></tr>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr> * <tr><th scope="row">/a/b</th><th scope="row">/a/b</th><td>yes</td></tr>
* <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr> * <tr><th scope="row" rowspan="3">/a/b/*</th><th scope="row">/a/b/c</th><td>yes</td></tr>
* <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr> * <tr> <th scope="row">/a/b/c/d</th><td>no</td></tr>
* <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr> * <tr> <th scope="row">/a/b/c/-</th><td>no</td></tr>
* <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr> * <tr><th scope="row" rowspan="3">/a/b/-</th><th scope="row">/a/b/c/d</th><td>yes</td></tr>
* <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr> * <tr> <th scope="row">/a/b/c/d/e</th><td>yes</td></tr>
* <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr> * <tr> <th scope="row">/a/b/c/*</th><td>yes</td></tr>
* </tbody> * </tbody>
* </table> * </table>
*/ */

View File

@ -23,7 +23,7 @@
or visit www.oracle.com if you need additional information or have any or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<HTML> <HTML lang="EN">
<HEAD> <HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1"> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Networking Properties</TITLE> <TITLE>Networking Properties</TITLE>
@ -35,7 +35,7 @@ alter the mechanisms and behavior of the various classes of the
java.net package. Some are checked only once at startup of the VM, java.net package. Some are checked only once at startup of the VM,
and therefore are best set using the -D option of the java command, and therefore are best set using the -D option of the java command,
while others have a more dynamic nature and can also be changed using while others have a more dynamic nature and can also be changed using
the <a href="../../lang/System.html#setProperty(java.lang.String,%20java.lang.String)">System.setProperty()</a> API. the <a href="../../lang/System.html#setProperty-java.lang.String-java.lang.String-">System.setProperty()</a> API.
The purpose of this document is to list The purpose of this document is to list
and detail all of these properties.</P> and detail all of these properties.</P>
<P>If there is no special note, a property value is checked every time it is used.</P> <P>If there is no special note, a property value is checked every time it is used.</P>

View File

@ -30,46 +30,50 @@
* *
* <a id="channels"></a> * <a id="channels"></a>
* *
* <blockquote><table class="borderless"> * <table class="striped" style="text-align:left; margin-left:2em">
* <caption style="display:none">Lists channels and their descriptions</caption> * <caption style="display:none">Lists channels and their descriptions</caption>
* <tr><th style="text-align:left">Channels</th> * <thead>
* <th style="text-align:left">Description</th></tr> * <tr><th scope="col">Channels</th>
* <tr><td style="vertical-align:top"><i>{@link java.nio.channels.Channel}</i></td> * <th scope="col">Description</th></tr>
* </thead>
* <tbody>
* <tr><th scope="row"><i>{@link java.nio.channels.Channel}</i></th>
* <td>A nexus for I/O operations</td></tr> * <td>A nexus for I/O operations</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.channels.ReadableByteChannel}</i></span></th>
* <td>Can read into a buffer</td></tr> * <td>Can read into a buffer</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td> * <span style="padding-left:2em"><i>{@link java.nio.channels.ScatteringByteChannel}</i></span></th>
* <td>Can read into a sequence of&nbsp;buffers</td></tr> * <td>Can read into a sequence of buffers</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.channels.WritableByteChannel}</i></span></th>
* <td>Can write from a buffer</td></tr> * <td>Can write from a buffer</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td> * <span style="padding-left:2em"><i>{@link java.nio.channels.GatheringByteChannel}</i></span></th>
* <td>Can write from a sequence of&nbsp;buffers</td></tr> * <td>Can write from a sequence of buffers</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.channels.ByteChannel}</i></span></th>
* <td>Can read/write to/from a&nbsp;buffer</td></tr> * <td>Can read/write to/from a buffer</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td> * <span style="padding-left:2em"><i>{@link java.nio.channels.SeekableByteChannel}</i></span></th>
* <td>A {@code ByteChannel} connected to an entity that contains a variable-length * <td>A {@code ByteChannel} connected to an entity that contains a variable-length
* sequence of bytes</td></tr> * sequence of bytes</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.channels.AsynchronousChannel}</i></span></th>
* <td>Supports asynchronous I/O operations.</td></tr> * <td>Supports asynchronous I/O operations.</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td> * <span style="padding-left:2em"><i>{@link java.nio.channels.AsynchronousByteChannel}</i></span></th>
* <td>Can read and write bytes asynchronously</td></tr> * <td>Can read and write bytes asynchronously</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.channels.NetworkChannel}</i></span></th>
* <td>A channel to a network socket</td></tr> * <td>A channel to a network socket</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td> * <span style="padding-left:2em"><i>{@link java.nio.channels.MulticastChannel}</i></span></th>
* <td>Can join Internet Protocol (IP) multicast groups</td></tr> * <td>Can join Internet Protocol (IP) multicast groups</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.channels.Channels}</td> * <tr><th scope="row">{@link java.nio.channels.Channels}</th>
* <td>Utility methods for channel/stream interoperation</td></tr> * <td>Utility methods for channel/stream interoperation</td></tr>
* </table></blockquote> * </tbody>
* </table>
* *
* <p> A <i>channel</i> represents an open connection to an entity such as a * <p> A <i>channel</i> represents an open connection to an entity such as a
* hardware device, a file, a network socket, or a program component that is * hardware device, a file, a network socket, or a program component that is
@ -122,21 +126,25 @@
* be constructed that uses a given charset to encode characters into bytes and * be constructed that uses a given charset to encode characters into bytes and
* write them to a given writable byte channel. * write them to a given writable byte channel.
* *
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em; text-align:left">
* <caption style="display:none"> * <caption style="display:none">
* Lists file channels and their descriptions</caption> * Lists file channels and their descriptions</caption>
* <tr><th style="text-align:left">File channels</th> * <thead>
* <th style="text-align:left">Description</th></tr> * <tr><th scope="col">File channels</th>
* <tr><td style="vertical-align:top"> * <th scope="col">Description</th></tr>
* {@link java.nio.channels.FileChannel}</td> * </thead>
* <tbody>
* <tr><th scope="row">
* {@link java.nio.channels.FileChannel}</th>
* <td>Reads, writes, maps, and manipulates files</td></tr> * <td>Reads, writes, maps, and manipulates files</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* {@link java.nio.channels.FileLock}</td> * {@link java.nio.channels.FileLock}</th>
* <td>A lock on a (region of a) file</td></tr> * <td>A lock on a (region of a) file</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* {@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td> * {@link java.nio.MappedByteBuffer}</th>
* <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr> * <td>A direct byte buffer mapped to a region of a file</td></tr>
* </table></blockquote> * </tbody>
* </table>
* *
* <p> The {@link java.nio.channels.FileChannel} class supports the usual * <p> The {@link java.nio.channels.FileChannel} class supports the usual
* operations of reading bytes from, and writing bytes to, a channel connected to * operations of reading bytes from, and writing bytes to, a channel connected to
@ -156,36 +164,40 @@
* class. * class.
* *
* <a id="multiplex"></a> * <a id="multiplex"></a>
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em; text-align:left">
* <caption style="display:none"> * <caption style="display:none">
* Lists multiplexed, non-blocking channels and their descriptions</caption> * Lists multiplexed, non-blocking channels and their descriptions</caption>
* <tr><th style="text-align:left">Multiplexed, non-blocking I/O</th> * <thead>
* <th style="text-align:left">Description</th></tr> * <tr><th scope="col">Multiplexed, non-blocking I/O</th>
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectableChannel}</td> * <th scope="col">Description</th></tr>
* </thead>
* <tbody>
* <tr><th scope="row">{@link java.nio.channels.SelectableChannel}</th>
* <td>A channel that can be multiplexed</td></tr> * <td>A channel that can be multiplexed</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td> * <span style="padding-left:2em">{@link java.nio.channels.DatagramChannel}</span></th>
* <td>A channel to a datagram-oriented socket</td></tr> * <td>A channel to a datagram-oriented socket</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td> * <span style="padding-left:2em">{@link java.nio.channels.Pipe.SinkChannel}</span></th>
* <td>The write end of a pipe</td></tr> * <td>The write end of a pipe</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td> * <span style="padding-left:2em">{@link java.nio.channels.Pipe.SourceChannel}</span></th>
* <td>The read end of a pipe</td></tr> * <td>The read end of a pipe</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td> * <span style="padding-left:2em">{@link java.nio.channels.ServerSocketChannel}</span></th>
* <td>A channel to a stream-oriented listening socket</td></tr> * <td>A channel to a stream-oriented listening socket</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td> * <span style="padding-left:2em">{@link java.nio.channels.SocketChannel}</span></th>
* <td>A channel for a stream-oriented connecting socket</td></tr> * <td>A channel for a stream-oriented connecting socket</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.channels.Selector}</td> * <tr><th scope="row">{@link java.nio.channels.Selector}</th>
* <td>A multiplexor of selectable channels</td></tr> * <td>A multiplexor of selectable channels</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectionKey}</td> * <tr><th scope="row">{@link java.nio.channels.SelectionKey}</th>
* <td>A token representing the registration <br> of a channel * <td>A token representing the registration of a channel
* with&nbsp;a&nbsp;selector</td></tr> * with a selector</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.channels.Pipe}</td> * <tr><th scope="row">{@link java.nio.channels.Pipe}</th>
* <td>Two channels that form a unidirectional&nbsp;pipe</td></tr> * <td>Two channels that form a unidirectional pipe</td></tr>
* </table></blockquote> * </tbody>
* </table>
* *
* <p> Multiplexed, non-blocking I/O, which is much more scalable than * <p> Multiplexed, non-blocking I/O, which is much more scalable than
* thread-oriented, blocking I/O, is provided by <i>selectors</i>, <i>selectable * thread-oriented, blocking I/O, is provided by <i>selectors</i>, <i>selectable
@ -251,27 +263,31 @@
* *
* <a id="async"></a> * <a id="async"></a>
* *
* <blockquote><table class="borderless"> * <table class="striped" style="padding-left:2em; text-align:left">
* <caption style="display:none"> * <caption style="display:none">
* Lists asynchronous channels and their descriptions</caption> * Lists asynchronous channels and their descriptions</caption>
* <tr><th style="text-align:left"> * <thead>
* Asynchronous I/O</th><th style="text-align:left">Description</th></tr> * <tr><th scope="col">Asynchronous I/O</th>
* <tr><td style="vertical-align:top"> * <th scope="col">Description</th></tr>
* {@link java.nio.channels.AsynchronousFileChannel}</td> * </thead>
* <tbody>
* <tr><th scope="row">
* {@link java.nio.channels.AsynchronousFileChannel}</th>
* <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr> * <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* {@link java.nio.channels.AsynchronousSocketChannel}</td> * {@link java.nio.channels.AsynchronousSocketChannel}</th>
* <td>An asynchronous channel to a stream-oriented connecting socket</td></tr> * <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* {@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td> * {@link java.nio.channels.AsynchronousServerSocketChannel}</th>
* <td>An asynchronous channel to a stream-oriented listening socket</td></tr> * <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* {@link java.nio.channels.CompletionHandler}</td> * {@link java.nio.channels.CompletionHandler}</th>
* <td>A handler for consuming the result of an asynchronous operation</td></tr> * <td>A handler for consuming the result of an asynchronous operation</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* {@link java.nio.channels.AsynchronousChannelGroup}</td> * {@link java.nio.channels.AsynchronousChannelGroup}</th>
* <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr> * <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
* </table></blockquote> * </tbody>
* </table>
* *
* <p> {@link java.nio.channels.AsynchronousChannel Asynchronous channels} are a * <p> {@link java.nio.channels.AsynchronousChannel Asynchronous channels} are a
* special type of channel capable of asynchronous I/O operations. Asynchronous * special type of channel capable of asynchronous I/O operations. Asynchronous

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,22 +27,25 @@
* Defines charsets, decoders, and encoders, for translating between * Defines charsets, decoders, and encoders, for translating between
* bytes and Unicode characters. * bytes and Unicode characters.
* *
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em; text-align:left">
* <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption> * <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
* <tr><th style="text-align:left">Class name</th> * <thead>
* <th style="text-align:left"><th>DescriptiPath * <tr><th scope="col">Class name</th>
* <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td> * <th scope="col">Description
* <td>A named mapping between characters<br>and bytes</td></tr> * </thead>
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td> * <tbody>
* <tr><th scope="row">{@link java.nio.charset.Charset}</th>
* <td>A named mapping between characters and bytes</td></tr>
* <tr><th scope="row">{@link java.nio.charset.CharsetDecoder}</th>
* <td>Decodes bytes into characters</td></tr> * <td>Decodes bytes into characters</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td> * <tr><th scope="row">{@link java.nio.charset.CharsetEncoder}</th>
* <td>Encodes characters into bytes</td></tr> * <td>Encodes characters into bytes</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td> * <tr><th scope="row">{@link java.nio.charset.CoderResult}</th>
* <td>Describes coder results</td></tr> * <td>Describes coder results</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td> * <tr><th scope="row">{@link java.nio.charset.CodingErrorAction}</th>
* <td>Describes actions to take when<br>coding errors are detected</td></tr> * <td>Describes actions to take when coding errors are detected</td></tr>
* * </tbody>
* </table></blockquote> * </table>
* *
* <p> A <i>charset</i> is named mapping between sequences of * <p> A <i>charset</i> is named mapping between sequences of
* sixteen-bit Unicode characters and sequences of bytes, in the sense * sixteen-bit Unicode characters and sequences of bytes, in the sense

View File

@ -314,45 +314,49 @@ public abstract class FileSystem
* representation of the path is matched using a limited pattern language * representation of the path is matched using a limited pattern language
* that resembles regular expressions but with a simpler syntax. For example: * that resembles regular expressions but with a simpler syntax. For example:
* *
* <blockquote> * <table class="striped" style="text-align:left; margin-left:2em">
* <table class="borderless">
* <caption style="display:none">Pattern Language</caption> * <caption style="display:none">Pattern Language</caption>
* <thead>
* <tr>
* <th scope="col">Example
* <th scope="col">Description
* </tr>
* </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>{@code *.java}</td> * <th scope="row">{@code *.java}</th>
* <td>Matches a path that represents a file name ending in {@code .java}</td> * <td>Matches a path that represents a file name ending in {@code .java}</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>{@code *.*}</td> * <th scope="row">{@code *.*}</th>
* <td>Matches file names containing a dot</td> * <td>Matches file names containing a dot</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>{@code *.{java,class}}</td> * <th scope="row">{@code *.{java,class}}</th>
* <td>Matches file names ending with {@code .java} or {@code .class}</td> * <td>Matches file names ending with {@code .java} or {@code .class}</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>{@code foo.?}</td> * <th scope="row">{@code foo.?}</th>
* <td>Matches file names starting with {@code foo.} and a single * <td>Matches file names starting with {@code foo.} and a single
* character extension</td> * character extension</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><code>&#47;home&#47;*&#47;*</code> * <th scope="row"><code>&#47;home&#47;*&#47;*</code>
* <td>Matches <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td> * <td>Matches <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><code>&#47;home&#47;**</code> * <th scope="row"><code>&#47;home&#47;**</code>
* <td>Matches <code>&#47;home&#47;gus</code> and * <td>Matches <code>&#47;home&#47;gus</code> and
* <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td> * <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><code>C:&#92;&#92;*</code> * <th scope="row"><code>C:&#92;&#92;*</code>
* <td>Matches <code>C:&#92;foo</code> and <code>C:&#92;bar</code> on the Windows * <td>Matches <code>C:&#92;foo</code> and <code>C:&#92;bar</code> on the Windows
* platform (note that the backslash is escaped; as a string literal in the * platform (note that the backslash is escaped; as a string literal in the
* Java Language the pattern would be <code>"C:&#92;&#92;&#92;&#92;*"</code>) </td> * Java Language the pattern would be <code>"C:&#92;&#92;&#92;&#92;*"</code>) </td>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>
* </blockquote>
* *
* <p> The following rules are used to interpret glob patterns: * <p> The following rules are used to interpret glob patterns:
* *

View File

@ -1923,30 +1923,33 @@ public final class Files {
* <p> The following examples demonstrate possible values for the {@code * <p> The following examples demonstrate possible values for the {@code
* attributes} parameter: * attributes} parameter:
* *
* <blockquote> * <table class="striped" style="text-align: left; margin-left:2em">
* <table class="borderless">
* <caption style="display:none">Possible values</caption> * <caption style="display:none">Possible values</caption>
* <thead>
* <tr>
* <th scope="col">Example
* <th scope="col">Description
* </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td> {@code "*"} </td> * <th scope="row"> {@code "*"} </th>
* <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td> * <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
* </tr> * </tr>
* <tr> * <tr>
* <td> {@code "size,lastModifiedTime,lastAccessTime"} </td> * <th scope="row"> {@code "size,lastModifiedTime,lastAccessTime"} </th>
* <td> Reads the file size, last modified time, and last access time * <td> Reads the file size, last modified time, and last access time
* attributes. </td> * attributes. </td>
* </tr> * </tr>
* <tr> * <tr>
* <td> {@code "posix:*"} </td> * <th scope="row"> {@code "posix:*"} </th>
* <td> Read all {@link PosixFileAttributes POSIX-file-attributes}. </td> * <td> Read all {@link PosixFileAttributes POSIX-file-attributes}. </td>
* </tr> * </tr>
* <tr> * <tr>
* <td> {@code "posix:permissions,owner,size"} </td> * <th scope="row"> {@code "posix:permissions,owner,size"} </th>
* <td> Reads the POSIX file permissions, owner, and file size. </td> * <td> Reads the POSIX file permissions, owner, and file size. </td>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>
* </blockquote>
* *
* <p> The {@code options} array may be used to indicate how symbolic links * <p> The {@code options} array may be used to indicate how symbolic links
* are handled for the case that the file is a symbolic link. By default, * are handled for the case that the file is a symbolic link. By default,

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,43 +26,47 @@
/** /**
* Interfaces and classes providing access to file and file system attributes. * Interfaces and classes providing access to file and file system attributes.
* *
* <blockquote><table class="borderless"> * <table class="striped" style="padding-left:2em; text-align:left">
* <caption style="display:none">Attribute views</caption> * <caption style="display:none">Attribute views</caption>
* <tr><th style="text-align:left">Attribute views</th> * <thead>
* <th style="text-align:left">Description</th></tr> * <tr><th scope="col">Attribute views</th>
* <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td> * <th scope="col">Description</th></tr>
* </thead>
* <tbody>
* <tr><th scope="row"><i>{@link java.nio.file.attribute.AttributeView}</i></th>
* <td>Can read or update non-opaque values associated with objects in a file system</td></tr> * <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileAttributeView}</i></span></th>
* <td>Can read or update file attributes</td></tr> * <td>Can read or update file attributes</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp; * <span style="padding-left:2em">
* <i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td> * <i>{@link java.nio.file.attribute.BasicFileAttributeView}</i></span></th>
* <td>Can read or update a basic set of file attributes</td></tr> * <td>Can read or update a basic set of file attributes</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <span style="padding-left:3em">
* <i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td> * <i>{@link java.nio.file.attribute.PosixFileAttributeView}</i></span></th>
* <td>Can read or update POSIX defined file attributes</td></tr> * <td>Can read or update POSIX defined file attributes</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <span style="padding-left:3em">
* <i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td> * <i>{@link java.nio.file.attribute.DosFileAttributeView}</i></span></th>
* <td>Can read or update FAT file attributes</td></tr> * <td>Can read or update FAT file attributes</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp; * <span style="padding-left:2em">
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td> * <i>{@link java.nio.file.attribute.FileOwnerAttributeView}</i></span></th>
* <td>Can read or update the owner of a file</td></tr> * <td>Can read or update the owner of a file</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <span style="padding-left:3em">
* <i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td> * <i>{@link java.nio.file.attribute.AclFileAttributeView}</i></span></th>
* <td>Can read or update Access Control Lists</td></tr> * <td>Can read or update Access Control Lists</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;&nbsp;&nbsp; * <span style="padding-left:2em">
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td> * <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}</i></span></th>
* <td>Can read or update user-defined file attributes</td></tr> * <td>Can read or update user-defined file attributes</td></tr>
* <tr><td style="vertical-align:top"> * <tr><th scope="row">
* &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td> * <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></span></th>
* <td>Can read or update file system attributes</td></tr> * <td>Can read or update file system attributes</td></tr>
* </table></blockquote> * </tbody>
* </table>
* *
* <p> An attribute view provides a read-only or updatable view of the non-opaque * <p> An attribute view provides a read-only or updatable view of the non-opaque
* values, or <em>metadata</em>, associated with objects in a file system. * values, or <em>metadata</em>, associated with objects in a file system.

View File

@ -48,7 +48,7 @@
* <li><p> <i>Selectors</i> and <i>selection keys</i>, which * <li><p> <i>Selectors</i> and <i>selection keys</i>, which
* together with <br> <i>selectable channels</i> define a <a * together with <br> <i>selectable channels</i> define a <a
* href="channels/package-summary.html#multiplex">multiplexed, * href="channels/package-summary.html#multiplex">multiplexed,
* non-blocking <br> I/O</a>&nbsp;facility. </p></li> * non-blocking <br> I/O</a> facility. </p></li>
* *
* </ul> * </ul>
* *
@ -62,33 +62,44 @@
* *
* <a id="buffers"> </a> * <a id="buffers"> </a>
* *
* <blockquote><table class="borderless"> * <table class="striped" style="margin-left:2em; text-align:left">
* <caption style="display:none">Description of the various buffers</caption> * <caption style="display:none">Description of the various buffers</caption>
* <tr><th style="text-align:left">Buffers</th> * <thead>
* <th style="text-align:left">Description</th></tr> * <tr><th scope="col">Buffers</th>
* <tr><td style="vertical-align:top">{@link java.nio.Buffer}</td> * <th scope="col">Description</th></tr>
* </thead>
* <tbody>
* <tr><th scope="row">{@link java.nio.Buffer}</th>
* <td>Position, limit, and capacity; * <td>Position, limit, and capacity;
* <br>clear, flip, rewind, and mark/reset</td></tr> * clear, flip, rewind, and mark/reset</td></tr>
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td> * <tr><th scope="row">
* <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr> * <span style="padding-left:1em">{@link java.nio.ByteBuffer}</span></th>
* <tr><td style="vertical-align:top"> * <td>Get/put, compact, views; allocate, wrap</td></tr>
* &nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td> * <tr><th scope="row">
* <span style="padding-left:2em">{@link java.nio.MappedByteBuffer}</span></th>
* <td>A byte buffer mapped to a file</td></tr> * <td>A byte buffer mapped to a file</td></tr>
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.CharBuffer}</td> * <tr><th scope="row">
* <td>Get/put, compact; allocate,&nbsp;wrap</td></tr> * <span style="padding-left:1em">{@link java.nio.CharBuffer}</span></th>
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td> * <td>Get/put, compact; allocate, wrap</td></tr>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <tr><th scope="row">
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td> * <span style="padding-left:1em">{@link java.nio.DoubleBuffer}</span></th>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>Get/put, compact; allocate, wrap</td></tr>
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.IntBuffer}</td> * <tr><th scope="row">
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <span style="padding-left:1em">{@link java.nio.FloatBuffer}</span></th>
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.LongBuffer}</td> * <td>Get/put, compact; allocate, wrap</td></tr>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <tr><th scope="row">
* <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td> * <span style="padding-left:1em">{@link java.nio.IntBuffer}</span></th>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>Get/put, compact; allocate, wrap</td></tr>
* <tr><td style="vertical-align:top">{@link java.nio.ByteOrder}</td> * <tr><th scope="row">
* <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr> * <span style="padding-left:1em">{@link java.nio.LongBuffer}</span></th>
* </table></blockquote> * <td>Get/put, compact; allocate, wrap</td></tr>
* <tr><th scope="row">
* <span style="padding-left:1em">{@link java.nio.ShortBuffer}</span></th>
* <td>Get/put, compact; allocate, wrap</td></tr>
* <tr><th scope="row">{@link java.nio.ByteOrder}</th>
* <td>Typesafe enumeration for byte orders</td></tr>
* </tbody>
* </table>
* *
* <p> A <i>buffer</i> is a container for a fixed amount of data of a * <p> A <i>buffer</i> is a container for a fixed amount of data of a
* specific primitive type. In addition to its content a buffer has a * specific primitive type. In addition to its content a buffer has a

View File

@ -263,18 +263,18 @@ public class DrbgParameters {
* Capability effective = ((DrbgParametes.Initiate) s.getParameters()) * Capability effective = ((DrbgParametes.Initiate) s.getParameters())
* .getCapability();</pre> * .getCapability();</pre>
* </blockquote> * </blockquote>
* <table class="plain"> * <table class="striped">
* <caption style="display:none">requested and effective capabilities</caption> * <caption style="display:none">requested and effective capabilities</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>Requested Value</th> * <th scope="col">Requested Value</th>
* <th>Possible Effective Values</th> * <th scope="col">Possible Effective Values</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td>NONE</td><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr> * <tr><th scope="row">NONE</th><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
* <tr><td>RESEED_ONLY</td><td>RESEED_ONLY, PR_AND_RESEED</td></tr> * <tr><th scope="row">RESEED_ONLY</th><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
* <tr><td>PR_AND_RESEED</td><td>PR_AND_RESEED</td></tr> * <tr><th scope="row">PR_AND_RESEED</th><td>PR_AND_RESEED</td></tr>
* </tbody> * </tbody>
* </table> * </table>
* <p> * <p>

View File

@ -61,19 +61,19 @@ import java.util.function.Function;
* security framework. Services of this type cannot be added, removed, * security framework. Services of this type cannot be added, removed,
* or modified by applications. * or modified by applications.
* The following attributes are automatically placed in each Provider object: * The following attributes are automatically placed in each Provider object:
* <table class="plain"> * <table class="striped">
* <caption><b>Attributes Automatically Placed in a Provider Object</b></caption> * <caption><b>Attributes Automatically Placed in a Provider Object</b></caption>
* <thead> * <thead>
* <tr><th>Name</th><th>Value</th> * <tr><th scope="col">Name</th><th scope="col">Value</th>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td>{@code Provider.id name}</td> * <tr><th scope="row">{@code Provider.id name}</th>
* <td>{@code String.valueOf(provider.getName())}</td> * <td>{@code String.valueOf(provider.getName())}</td>
* <tr><td>{@code Provider.id version}</td> * <tr><th scope="row">{@code Provider.id version}</th>
* <td>{@code String.valueOf(provider.getVersionStr())}</td> * <td>{@code String.valueOf(provider.getVersionStr())}</td>
* <tr><td>{@code Provider.id info}</td> * <tr><th scope="row">{@code Provider.id info}</th>
* <td>{@code String.valueOf(provider.getInfo())}</td> * <td>{@code String.valueOf(provider.getInfo())}</td>
* <tr><td>{@code Provider.id className}</td> * <tr><th scope="row">{@code Provider.id className}</th>
* <td>{@code provider.getClass().getName()}</td> * <td>{@code provider.getClass().getName()}</td>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -153,33 +153,33 @@ public interface X509Extension {
* by periods. * by periods.
* *
* <p>For example:<br> * <p>For example:<br>
* <table class="plain"> * <table class="striped">
* <caption style="display:none">Examples of OIDs and extension names</caption> * <caption style="display:none">Examples of OIDs and extension names</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>OID <em>(Object Identifier)</em></th> * <th scope="col">OID <em>(Object Identifier)</em></th>
* <th>Extension Name</th></tr> * <th scope="col">Extension Name</th></tr>
* </thead> * </thead>
* <tbody> * <tbody style="text-align:left">
* <tr><td>2.5.29.14</td> * <tr><th scope="row">2.5.29.14</th>
* <td>SubjectKeyIdentifier</td></tr> * <td>SubjectKeyIdentifier</td></tr>
* <tr><td>2.5.29.15</td> * <tr><th scope="row">2.5.29.15</th>
* <td>KeyUsage</td></tr> * <td>KeyUsage</td></tr>
* <tr><td>2.5.29.16</td> * <tr><th scope="row">2.5.29.16</th>
* <td>PrivateKeyUsage</td></tr> * <td>PrivateKeyUsage</td></tr>
* <tr><td>2.5.29.17</td> * <tr><th scope="row">2.5.29.17</th>
* <td>SubjectAlternativeName</td></tr> * <td>SubjectAlternativeName</td></tr>
* <tr><td>2.5.29.18</td> * <tr><th scope="row">2.5.29.18</th>
* <td>IssuerAlternativeName</td></tr> * <td>IssuerAlternativeName</td></tr>
* <tr><td>2.5.29.19</td> * <tr><th scope="row">2.5.29.19</th>
* <td>BasicConstraints</td></tr> * <td>BasicConstraints</td></tr>
* <tr><td>2.5.29.30</td> * <tr><th scope="row">2.5.29.30</th>
* <td>NameConstraints</td></tr> * <td>NameConstraints</td></tr>
* <tr><td>2.5.29.33</td> * <tr><th scope="row">2.5.29.33</th>
* <td>PolicyMappings</td></tr> * <td>PolicyMappings</td></tr>
* <tr><td>2.5.29.35</td> * <tr><th scope="row">2.5.29.35</th>
* <td>AuthorityKeyIdentifier</td></tr> * <td>AuthorityKeyIdentifier</td></tr>
* <tr><td>2.5.29.36</td> * <tr><th scope="row">2.5.29.36</th>
* <td>PolicyConstraints</td></tr> * <td>PolicyConstraints</td></tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -150,73 +150,73 @@ import java.util.Locale;
* <caption style="display:none">Shows how FormatType and FormatStyle values map to Format instances</caption> * <caption style="display:none">Shows how FormatType and FormatStyle values map to Format instances</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th id="ft" class="TableHeadingColor">FormatType * <th scope="col" class="TableHeadingColor">FormatType
* <th id="fs" class="TableHeadingColor">FormatStyle * <th scope="col" class="TableHeadingColor">FormatStyle
* <th id="sc" class="TableHeadingColor">Subformat Created * <th scope="col" class="TableHeadingColor">Subformat Created
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td headers="ft"><i>(none)</i> * <th scope="row" style="text-weight: normal"><i>(none)</i>
* <td headers="fs"><i>(none)</i> * <th scope="row" style="text-weight: normal"><i>(none)</i>
* <td headers="sc"><code>null</code> * <td>{@code null}
* <tr> * <tr>
* <td headers="ft" rowspan=5><code>number</code> * <th scope="row" style="text-weight: normal" rowspan=5>{@code number}
* <td headers="fs"><i>(none)</i> * <th scope="row" style="text-weight: normal"><i>(none)</i>
* <td headers="sc">{@link NumberFormat#getInstance(Locale) NumberFormat.getInstance}{@code (getLocale())} * <td>{@link NumberFormat#getInstance(Locale) NumberFormat.getInstance}{@code (getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>integer</code> * <th scope="row" style="text-weight: normal">{@code integer}
* <td headers="sc">{@link NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance}{@code (getLocale())} * <td>{@link NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance}{@code (getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>currency</code> * <th scope="row" style="text-weight: normal">{@code currency}
* <td headers="sc">{@link NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance}{@code (getLocale())} * <td>{@link NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance}{@code (getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>percent</code> * <th scope="row" style="text-weight: normal">{@code percent}
* <td headers="sc">{@link NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance}{@code (getLocale())} * <td>{@link NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance}{@code (getLocale())}
* <tr> * <tr>
* <td headers="fs"><i>SubformatPattern</i> * <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
* <td headers="sc">{@code new} {@link DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat}{@code (subformatPattern,} {@link DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance}{@code (getLocale()))} * <td>{@code new} {@link DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat}{@code (subformatPattern,} {@link DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance}{@code (getLocale()))}
* <tr> * <tr>
* <td headers="ft" rowspan=6><code>date</code> * <th scope="row" style="text-weight: normal" rowspan=6>{@code date}
* <td headers="fs"><i>(none)</i> * <th scope="row" style="text-weight: normal"><i>(none)</i>
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())} * <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>short</code> * <th scope="row" style="text-weight: normal">{@code short}
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())} * <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>medium</code> * <th scope="row" style="text-weight: normal">{@code medium}
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())} * <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>long</code> * <th scope="row" style="text-weight: normal">{@code long}
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())} * <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>full</code> * <th scope="row" style="text-weight: normal">{@code full}
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())} * <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><i>SubformatPattern</i> * <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
* <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())} * <td>{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
* <tr> * <tr>
* <td headers="ft" rowspan=6><code>time</code> * <th scope="row" style="text-weight: normal" rowspan=6>{@code time}
* <td headers="fs"><i>(none)</i> * <th scope="row" style="text-weight: normal"><i>(none)</i>
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())} * <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>short</code> * <th scope="row" style="text-weight: normal">{@code short}
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())} * <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>medium</code> * <th scope="row" style="text-weight: normal">{@code medium}
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())} * <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>long</code> * <th scope="row" style="text-weight: normal">{@code long}
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())} * <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><code>full</code> * <th scope="row" style="text-weight: normal">{@code full}
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())} * <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
* <tr> * <tr>
* <td headers="fs"><i>SubformatPattern</i> * <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
* <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())} * <td>{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
* <tr> * <tr>
* <td headers="ft"><code>choice</code> * <th scope="row" style="text-weight: normal">{@code choice}
* <td headers="fs"><i>SubformatPattern</i> * <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
* <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)} * <td>{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
* </tbody> * </tbody>
* </table> * </table>
* *
@ -776,44 +776,40 @@ public class MessageFormat extends Format {
* <caption style="display:none">Examples of subformat,argument,and formatted text</caption> * <caption style="display:none">Examples of subformat,argument,and formatted text</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th>Subformat * <th scope="col">Subformat
* <th>Argument * <th scope="col">Argument
* <th>Formatted Text * <th scope="col">Formatted Text
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td><i>any</i> * <th scope="row" style="text-weight-normal" rowspan=2><i>any</i>
* <td><i>unavailable</i> * <th scope="row" style="text-weight-normal"><i>unavailable</i>
* <td><code>"{" + argumentIndex + "}"</code> * <td><code>"{" + argumentIndex + "}"</code>
* <tr> * <tr>
* <td><i>any</i> * <th scope="row" style="text-weight-normal"><code>null</code>
* <td><code>null</code>
* <td><code>"null"</code> * <td><code>"null"</code>
* <tr> * <tr>
* <td><code>instanceof ChoiceFormat</code> * <th scope="row" style="text-weight-normal"><code>instanceof ChoiceFormat</code>
* <td><i>any</i> * <th scope="row" style="text-weight-normal"><i>any</i>
* <td><code>subformat.format(argument).indexOf('{') &gt;= 0 ?<br> * <td><code>subformat.format(argument).indexOf('{') &gt;= 0 ?<br>
* (new MessageFormat(subformat.format(argument), getLocale())).format(argument) : * (new MessageFormat(subformat.format(argument), getLocale())).format(argument) :
* subformat.format(argument)</code> * subformat.format(argument)</code>
* <tr> * <tr>
* <td><code>!= null</code> * <th scope="row" style="text-weight-normal"><code>!= null</code>
* <td><i>any</i> * <th scope="row" style="text-weight-normal"><i>any</i>
* <td><code>subformat.format(argument)</code> * <td><code>subformat.format(argument)</code>
* <tr> * <tr>
* <td><code>null</code> * <th scope="row" style="text-weight-normal" rowspan=4><code>null</code>
* <td><code>instanceof Number</code> * <th scope="row" style="text-weight-normal"><code>instanceof Number</code>
* <td><code>NumberFormat.getInstance(getLocale()).format(argument)</code> * <td><code>NumberFormat.getInstance(getLocale()).format(argument)</code>
* <tr> * <tr>
* <td><code>null</code> * <th scope="row" style="text-weight-normal"><code>instanceof Date</code>
* <td><code>instanceof Date</code>
* <td><code>DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)</code> * <td><code>DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)</code>
* <tr> * <tr>
* <td><code>null</code> * <th scope="row" style="text-weight-normal"><code>instanceof String</code>
* <td><code>instanceof String</code>
* <td><code>argument</code> * <td><code>argument</code>
* <tr> * <tr>
* <td><code>null</code> * <th scope="row" style="text-weight-normal"><i>any</i>
* <td><i>any</i>
* <td><code>argument.toString()</code> * <td><code>argument.toString()</code>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -103,19 +103,19 @@ import sun.util.logging.PlatformLogger;
* *
* <p> * <p>
* CLDR and LDML identify variants: * CLDR and LDML identify variants:
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption style="display:none">Variants of Hijrah Calendars</caption> * <caption style="display:none">Variants of Hijrah Calendars</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th style="text-align:left" >Chronology ID</th> * <th scope="col">Chronology ID</th>
* <th style="text-align:left" >Calendar Type</th> * <th scope="col">Calendar Type</th>
* <th style="text-align:left" >Locale extension, see {@link java.util.Locale}</th> * <th scope="col">Locale extension, see {@link java.util.Locale}</th>
* <th style="text-align:left" >Description</th> * <th scope="col">Description</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>Hijrah-umalqura</td> * <th scope="row">Hijrah-umalqura</th>
* <td>islamic-umalqura</td> * <td>islamic-umalqura</td>
* <td>ca-islamic-umalqura</td> * <td>ca-islamic-umalqura</td>
* <td>Islamic - Umm Al-Qura calendar of Saudi Arabia</td> * <td>Islamic - Umm Al-Qura calendar of Saudi Arabia</td>
@ -148,38 +148,38 @@ import sun.util.logging.PlatformLogger;
* <p> * <p>
* The Hijrah property resource is a set of properties that describe the calendar. * The Hijrah property resource is a set of properties that describe the calendar.
* The syntax is defined by {@code java.util.Properties#load(Reader)}. * The syntax is defined by {@code java.util.Properties#load(Reader)}.
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption style="display:none">Configuration of Hijrah Calendar</caption> * <caption style="display:none">Configuration of Hijrah Calendar</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th style="text-align:left" > Property Name</th> * <th scope="col">Property Name</th>
* <th style="text-align:left" > Property value</th> * <th scope="col">Property value</th>
* <th style="text-align:left" > Description </th> * <th scope="col">Description</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>id</td> * <th scope="row">id</th>
* <td>Chronology Id, for example, "Hijrah-umalqura"</td> * <td>Chronology Id, for example, "Hijrah-umalqura"</td>
* <td>The Id of the calendar in common usage</td> * <td>The Id of the calendar in common usage</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>type</td> * <th scope="row">type</th>
* <td>Calendar type, for example, "islamic-umalqura"</td> * <td>Calendar type, for example, "islamic-umalqura"</td>
* <td>LDML defines the calendar types</td> * <td>LDML defines the calendar types</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>version</td> * <th scope="row">version</th>
* <td>Version, for example: "1.8.0_1"</td> * <td>Version, for example: "1.8.0_1"</td>
* <td>The version of the Hijrah variant data</td> * <td>The version of the Hijrah variant data</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>iso-start</td> * <th scope="row">iso-start</th>
* <td>ISO start date, formatted as {@code yyyy-MM-dd}, for example: "1900-04-30"</td> * <td>ISO start date, formatted as {@code yyyy-MM-dd}, for example: "1900-04-30"</td>
* <td>The ISO date of the first day of the minimum Hijrah year.</td> * <td>The ISO date of the first day of the minimum Hijrah year.</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>yyyy - a numeric 4 digit year, for example "1434"</td> * <th scope="row">yyyy - a numeric 4 digit year, for example "1434"</th>
* <td>The value is a sequence of 12 month lengths, * <td>The value is a sequence of 12 month lengths,
* for example: "29 30 29 30 29 30 30 30 29 30 29 29"</td> * for example: "29 30 29 30 29 30 30 30 29 30 29 29"</td>
* <td>The lengths of the 12 months of the year separated by whitespace. * <td>The lengths of the 12 months of the year separated by whitespace.

View File

@ -70,27 +70,27 @@ import java.time.DateTimeException;
* A definition has therefore been created with two eras - 'Current era' (CE) for * A definition has therefore been created with two eras - 'Current era' (CE) for
* years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that. * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that.
* *
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption style="display:none">ISO years and eras</caption> * <caption style="display:none">ISO years and eras</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th style="text-align:left">year-of-era</th> * <th scope="col">year-of-era</th>
* <th style="text-align:left">era</th> * <th scope="col">era</th>
* <th style="text-align:left">proleptic-year</th> * <th scope="col">proleptic-year</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>2</td><td>CE</td><td>2</td> * <td>2</td><td>CE</td><th scope="row">2</th>
* </tr> * </tr>
* <tr> * <tr>
* <td>1</td><td>CE</td><td>1</td> * <td>1</td><td>CE</td><th scope="row">1</th>
* </tr> * </tr>
* <tr> * <tr>
* <td>1</td><td>BCE</td><td>0</td> * <td>1</td><td>BCE</td><th scope="row">0</th>
* </tr> * </tr>
* <tr> * <tr>
* <td>2</td><td>BCE</td><td>-1</td> * <td>2</td><td>BCE</td><th scope="row">-1</th>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -71,28 +71,28 @@ import java.time.DateTimeException;
* All previous years, zero or earlier in the proleptic count or one and greater * All previous years, zero or earlier in the proleptic count or one and greater
* in the year-of-era count, are part of the 'Before Republic of China' era. * in the year-of-era count, are part of the 'Before Republic of China' era.
* *
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption style="display:none">Minguo years and eras</caption> * <caption style="display:none">Minguo years and eras</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th style="text-align:left">year-of-era</th> * <th>year-of-era</th>
* <th style="text-align:left">era</th> * <th>era</th>
* <th style="text-align:left">proleptic-year</th> * <th>proleptic-year</th>
* <th style="text-align:left">ISO proleptic-year</th> * <th>ISO proleptic-year</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>2</td><td>ROC</td><td>2</td><td>1913</td> * <td>2</td><td>ROC</td><th scope="row">2</th><td>1913</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>1</td><td>ROC</td><td>1</td><td>1912</td> * <td>1</td><td>ROC</td><th scope="row">1</th><td>1912</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>1</td><td>BEFORE_ROC</td><td>0</td><td>1911</td> * <td>1</td><td>BEFORE_ROC</td><th scope="row">0</th><td>1911</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>2</td><td>BEFORE_ROC</td><td>-1</td><td>1910</td> * <td>2</td><td>BEFORE_ROC</td><th scope="row">-1</th><td>1910</td>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -71,28 +71,28 @@ import java.time.DateTimeException;
* All previous years, zero or earlier in the proleptic count or one and greater * All previous years, zero or earlier in the proleptic count or one and greater
* in the year-of-era count, are part of the 'Before Buddhist' era. * in the year-of-era count, are part of the 'Before Buddhist' era.
* *
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption style="display:none">Buddhist years and eras</caption> * <caption style="display:none">Buddhist years and eras</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th style="text-align:left">year-of-era</th> * <th scope="col">year-of-era</th>
* <th style="text-align:left">era</th> * <th scope="col">era</th>
* <th style="text-align:left">proleptic-year</th> * <th scope="col">proleptic-year</th>
* <th style="text-align:left">ISO proleptic-year</th> * <th scope="col">ISO proleptic-year</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr> * <tr>
* <td>2</td><td>BE</td><td>2</td><td>-542</td> * <td>2</td><td>BE</td><th scope="row">2</th><td>-542</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>1</td><td>BE</td><td>1</td><td>-543</td> * <td>1</td><td>BE</td><th scope="row">1</th><td>-543</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>1</td><td>BEFORE_BE</td><td>0</td><td>-544</td> * <td>1</td><td>BEFORE_BE</td><th scope="row">0</th><td>-544</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>2</td><td>BEFORE_BE</td><td>-1</td><td>-545</td> * <td>2</td><td>BEFORE_BE</td><th scope="row">-1</th><td>-545</td>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -150,13 +150,13 @@ import java.util.Set;
* implementation of {@code java.text.Format}. * implementation of {@code java.text.Format}.
* *
* <h3 id="predefined">Predefined Formatters</h3> * <h3 id="predefined">Predefined Formatters</h3>
* <table class="striped"> * <table class="striped" style="text-align:left">
* <caption>Predefined Formatters</caption> * <caption>Predefined Formatters</caption>
* <thead> * <thead>
* <tr> * <tr>
* <th scope="col" style="text-align:left">Formatter</th> * <th scope="col">Formatter</th>
* <th scope="col" style="text-align:left">Description</th> * <th scope="col">Description</th>
* <th scope="col" style="text-align:left">Example</th> * <th scope="col">Example</th>
* </tr> * </tr>
* </thead> * </thead>
* <tbody> * <tbody>
@ -276,56 +276,60 @@ import java.util.Set;
* <p> * <p>
* All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The
* following pattern letters are defined: * following pattern letters are defined:
* <pre> * <table class="striped">
* Symbol Meaning Presentation Examples * <caption>Pattern Letters and Symbols</caption>
* ------ ------- ------------ ------- * <thead>
* G era text AD; Anno Domini; A * <tr><th scope="col">Symbol</th> <th scope="col">Meaning</th> <th scope="col">Presentation</th> <th scope="col">Examples</th>
* u year year 2004; 04 * </thead>
* y year-of-era year 2004; 04 * <tbody>
* D day-of-year number 189 * <tr><th scope="row">G</th> <td>era</td> <td>text</td> <td>AD; Anno Domini; A</td>
* M/L month-of-year number/text 7; 07; Jul; July; J * <tr><th scope="row">u</th> <td>year</td> <td>year</td> <td>2004; 04</td>
* d day-of-month number 10 * <tr><th scope="row">y</th> <td>year-of-era</td> <td>year</td> <td>2004; 04</td>
* g modified-julian-day number 2451334 * <tr><th scope="row">D</th> <td>day-of-year</td> <td>number</td> <td>189</td>
* <tr><th scope="row">M/L</th> <td>month-of-year</td> <td>number/text</td> <td>7; 07; Jul; July; J</td>
* <tr><th scope="row">d</th> <td>day-of-month</td> <td>number</td> <td>10</td>
* <tr><th scope="row">g</th> <td>modified-julian-day</td> <td>number</td> <td>2451334</td>
* *
* Q/q quarter-of-year number/text 3; 03; Q3; 3rd quarter * <tr><th scope="row">Q/q</th> <td>quarter-of-year</td> <td>number/text</td> <td>3; 03; Q3; 3rd quarter</td>
* Y week-based-year year 1996; 96 * <tr><th scope="row">Y</th> <td>week-based-year</td> <td>year</td> <td>1996; 96</td>
* w week-of-week-based-year number 27 * <tr><th scope="row">w</th> <td>week-of-week-based-year</td> <td>number</td> <td>27</td>
* W week-of-month number 4 * <tr><th scope="row">W</th> <td>week-of-month</td> <td>number</td> <td>4</td>
* E day-of-week text Tue; Tuesday; T * <tr><th scope="row">E</th> <td>day-of-week</td> <td>text</td> <td>Tue; Tuesday; T</td>
* e/c localized day-of-week number/text 2; 02; Tue; Tuesday; T * <tr><th scope="row">e/c</th> <td>localized day-of-week</td> <td>number/text</td> <td>2; 02; Tue; Tuesday; T</td>
* F day-of-week-in-month number 3 * <tr><th scope="row">F</th> <td>day-of-week-in-month</td> <td>number</td> <td>3</td>
* *
* a am-pm-of-day text PM * <tr><th scope="row">a</th> <td>am-pm-of-day</td> <td>text</td> <td>PM</td>
* h clock-hour-of-am-pm (1-12) number 12 * <tr><th scope="row">h</th> <td>clock-hour-of-am-pm (1-12)</td> <td>number</td> <td>12</td>
* K hour-of-am-pm (0-11) number 0 * <tr><th scope="row">K</th> <td>hour-of-am-pm (0-11)</td> <td>number</td> <td>0</td>
* k clock-hour-of-day (1-24) number 24 * <tr><th scope="row">k</th> <td>clock-hour-of-day (1-24)</td> <td>number</td> <td>24</td>
* *
* H hour-of-day (0-23) number 0 * <tr><th scope="row">H</th> <td>hour-of-day (0-23)</td> <td>number</td> <td>0</td>
* m minute-of-hour number 30 * <tr><th scope="row">m</th> <td>minute-of-hour</td> <td>number</td> <td>30</td>
* s second-of-minute number 55 * <tr><th scope="row">s</th> <td>second-of-minute</td> <td>number</td> <td>55</td>
* S fraction-of-second fraction 978 * <tr><th scope="row">S</th> <td>fraction-of-second</td> <td>fraction</td> <td>978</td>
* A milli-of-day number 1234 * <tr><th scope="row">A</th> <td>milli-of-day</td> <td>number</td> <td>1234</td>
* n nano-of-second number 987654321 * <tr><th scope="row">n</th> <td>nano-of-second</td> <td>number</td> <td>987654321</td>
* N nano-of-day number 1234000000 * <tr><th scope="row">N</th> <td>nano-of-day</td> <td>number</td> <td>1234000000</td>
* *
* V time-zone ID zone-id America/Los_Angeles; Z; -08:30 * <tr><th scope="row">V</th> <td>time-zone ID</td> <td>zone-id</td> <td>America/Los_Angeles; Z; -08:30</td>
* v generic time-zone name zone-name Pacific Time; PT * <tr><th scope="row">v</th> <td>generic time-zone name</td> <td>zone-name</td> <td>Pacific Time; PT</td>
* z time-zone name zone-name Pacific Standard Time; PST * <tr><th scope="row">z</th> <td>time-zone name</td> <td>zone-name</td> <td>Pacific Standard Time; PST</td>
* O localized zone-offset offset-O GMT+8; GMT+08:00; UTC-08:00 * <tr><th scope="row">O</th> <td>localized zone-offset</td> <td>offset-O</td> <td>GMT+8; GMT+08:00; UTC-08:00</td>
* X zone-offset 'Z' for zero offset-X Z; -08; -0830; -08:30; -083015; -08:30:15 * <tr><th scope="row">X</th> <td>zone-offset 'Z' for zero</td> <td>offset-X</td> <td>Z; -08; -0830; -08:30; -083015; -08:30:15</td>
* x zone-offset offset-x +0000; -08; -0830; -08:30; -083015; -08:30:15 * <tr><th scope="row">x</th> <td>zone-offset</td> <td>offset-x</td> <td>+0000; -08; -0830; -08:30; -083015; -08:30:15</td>
* Z zone-offset offset-Z +0000; -0800; -08:00 * <tr><th scope="row">Z</th> <td>zone-offset</td> <td>offset-Z</td> <td>+0000; -0800; -08:00</td>
* *
* p pad next pad modifier 1 * <tr><th scope="row">p</th> <td>pad next</td> <td>pad modifier</td> <td>1</td>
* *
* ' escape for text delimiter * <tr><th scope="row">'</th> <td>escape for text</td> <td>delimiter</td> <td></td>
* '' single quote literal ' * <tr><th scope="row">''</th> <td>single quote</td> <td>literal</td> <td>'</td>
* [ optional section start * <tr><th scope="row">[</th> <td>optional section start</td> <td></td> <td></td>
* ] optional section end * <tr><th scope="row">]</th> <td>optional section end</td> <td></td> <td></td>
* # reserved for future use * <tr><th scope="row">#</th> <td>reserved for future use</td> <td></td> <td></td>
* { reserved for future use * <tr><th scope="row">{</th> <td>reserved for future use</td> <td></td> <td></td>
* } reserved for future use * <tr><th scope="row">}</th> <td>reserved for future use</td> <td></td> <td></td>
* </pre> * </tbody>
* </table>
* <p> * <p>
* The count of pattern letters determines the format. * The count of pattern letters determines the format.
* <p> * <p>

View File

@ -136,18 +136,18 @@ import sun.util.locale.provider.LocaleResources;
* <p> * <p>
* For example: * For example:
* *
* <table class=striped style="text-align: left; width: 50%;"> * <table class=striped style="text-align: left">
* <caption>Examples of Week based Years</caption> * <caption>Examples of Week based Years</caption>
* <thead> * <thead>
* <tr><th>Date</th><th>Day-of-week</th><th>Field values</th></tr> * <tr><th scope="col">Date</th><th scope="col">Day-of-week</th><th scope="col">Field values</th></tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><th>2008-12-28</th><td>Sunday</td><td>Week 52 of week-based-year 2008</td></tr> * <tr><th scope="row">2008-12-28</th><td>Sunday</td><td>Week 52 of week-based-year 2008</td></tr>
* <tr><th>2008-12-29</th><td>Monday</td><td>Week 1 of week-based-year 2009</td></tr> * <tr><th scope="row">2008-12-29</th><td>Monday</td><td>Week 1 of week-based-year 2009</td></tr>
* <tr><th>2008-12-31</th><td>Wednesday</td><td>Week 1 of week-based-year 2009</td></tr> * <tr><th scope="row">2008-12-31</th><td>Wednesday</td><td>Week 1 of week-based-year 2009</td></tr>
* <tr><th>2009-01-01</th><td>Thursday</td><td>Week 1 of week-based-year 2009</td></tr> * <tr><th scope="row">2009-01-01</th><td>Thursday</td><td>Week 1 of week-based-year 2009</td></tr>
* <tr><th>2009-01-04</th><td>Sunday</td><td>Week 1 of week-based-year 2009</td></tr> * <tr><th scope="row">2009-01-04</th><td>Sunday</td><td>Week 1 of week-based-year 2009</td></tr>
* <tr><th>2009-01-05</th><td>Monday</td><td>Week 2 of week-based-year 2009</td></tr> * <tr><th scope="row">2009-01-05</th><td>Monday</td><td>Week 2 of week-based-year 2009</td></tr>
* </tbody> * </tbody>
* </table> * </table>
* *

View File

@ -130,17 +130,17 @@ import sun.util.locale.provider.LocaleResources;
* <table class=striped style="text-align: left"> * <table class=striped style="text-align: left">
* <caption>Examples of WeekFields</caption> * <caption>Examples of WeekFields</caption>
* <thead> * <thead>
* <tr><th>Date</th><td>Day-of-week</td> * <tr><th scope="col">Date</th><th scope="col">Day-of-week</th>
* <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr> * <th scope="col">First day: Monday<br>Minimal days: 4</th><th scope="col">First day: Monday<br>Minimal days: 5</th></tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><th>2008-12-31</th><td>Wednesday</td> * <tr><th scope="row">2008-12-31</th><td>Wednesday</td>
* <td>Week 5 of December 2008</td><td>Week 5 of December 2008</td></tr> * <td>Week 5 of December 2008</td><td>Week 5 of December 2008</td></tr>
* <tr><th>2009-01-01</th><td>Thursday</td> * <tr><th scope="row">2009-01-01</th><td>Thursday</td>
* <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr> * <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr>
* <tr><th>2009-01-04</th><td>Sunday</td> * <tr><th scope="row">2009-01-04</th><td>Sunday</td>
* <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr> * <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr>
* <tr><th>2009-01-05</th><td>Monday</td> * <tr><th scope="row">2009-01-05</th><td>Monday</td>
* <td>Week 2 of January 2009</td><td>Week 1 of January 2009</td></tr> * <td>Week 2 of January 2009</td><td>Week 1 of January 2009</td></tr>
* </tbody> * </tbody>
* </table> * </table>
@ -164,17 +164,17 @@ import sun.util.locale.provider.LocaleResources;
* <table class=striped style="text-align: left;"> * <table class=striped style="text-align: left;">
* <caption>Examples of WeekFields for week-based-year</caption> * <caption>Examples of WeekFields for week-based-year</caption>
* <thead> * <thead>
* <tr><th>Date</th><td>Day-of-week</td> * <tr><th scope="col">Date</th><th scope="col">Day-of-week</th>
* <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr> * <th scope="col">First day: Monday<br>Minimal days: 4</th><th scope="col">First day: Monday<br>Minimal days: 5</th></tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><th>2008-12-31</th><td>Wednesday</td> * <tr><th scope="row">2008-12-31</th><td>Wednesday</td>
* <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr> * <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
* <tr><th>2009-01-01</th><td>Thursday</td> * <tr><th scope="row">2009-01-01</th><td>Thursday</td>
* <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr> * <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
* <tr><th>2009-01-04</th><td>Sunday</td> * <tr><th scope="row">2009-01-04</th><td>Sunday</td>
* <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr> * <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
* <tr><th>2009-01-05</th><td>Monday</td> * <tr><th scope="row">2009-01-05</th><td>Monday</td>
* <td>Week 2 of 2009</td><td>Week 1 of 2009</td></tr> * <td>Week 2 of 2009</td><td>Week 1 of 2009</td></tr>
* </tbody> * </tbody>
* </table> * </table>

View File

@ -35,8 +35,7 @@
package java.util.concurrent; package java.util.concurrent;
import java.lang.invoke.MethodHandles; import java.lang.reflect.Field;
import java.lang.invoke.VarHandle;
import java.util.AbstractSet; import java.util.AbstractSet;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@ -506,19 +505,21 @@ public class ConcurrentSkipListSet<E>
: ((ConcurrentSkipListMap.SubMap<E,?>)m).new SubMapKeyIterator(); : ((ConcurrentSkipListMap.SubMap<E,?>)m).new SubMapKeyIterator();
} }
// Support for resetting map in clone /** Initializes map field; for use in clone. */
private void setMap(ConcurrentNavigableMap<E,Object> map) { private void setMap(ConcurrentNavigableMap<E,Object> map) {
MAP.setVolatile(this, map); Field mapField = java.security.AccessController.doPrivileged(
} (java.security.PrivilegedAction<Field>) () -> {
try {
// VarHandle mechanics Field f = ConcurrentSkipListSet.class
private static final VarHandle MAP; .getDeclaredField("m");
static { f.setAccessible(true);
return f;
} catch (ReflectiveOperationException e) {
throw new Error(e);
}});
try { try {
MethodHandles.Lookup l = MethodHandles.lookup(); mapField.set(this, map);
MAP = l.findVarHandle(ConcurrentSkipListSet.class, "m", } catch (IllegalAccessException e) {
ConcurrentNavigableMap.class);
} catch (ReflectiveOperationException e) {
throw new Error(e); throw new Error(e);
} }
} }

View File

@ -85,9 +85,9 @@ package java.util.concurrent;
* this.executor = executor; * this.executor = executor;
* } * }
* public synchronized void request(long n) { * public synchronized void request(long n) {
* if (n != 0 && !completed) { * if (!completed) {
* completed = true; * completed = true;
* if (n < 0) { * if (n <= 0) {
* IllegalArgumentException ex = new IllegalArgumentException(); * IllegalArgumentException ex = new IllegalArgumentException();
* executor.execute(() -> subscriber.onError(ex)); * executor.execute(() -> subscriber.onError(ex));
* } else { * } else {

View File

@ -576,7 +576,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
private static final RuntimePermission shutdownPerm = private static final RuntimePermission shutdownPerm =
new RuntimePermission("modifyThread"); new RuntimePermission("modifyThread");
/* The context to be used when executing the finalizer, or null. */ /** The context to be used when executing the finalizer, or null. */
private final AccessControlContext acc; private final AccessControlContext acc;
/** /**
@ -1314,9 +1314,9 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
if (workQueue == null || threadFactory == null || handler == null) if (workQueue == null || threadFactory == null || handler == null)
throw new NullPointerException(); throw new NullPointerException();
this.acc = System.getSecurityManager() == null ? this.acc = (System.getSecurityManager() == null)
null : ? null
AccessController.getContext(); : AccessController.getContext();
this.corePoolSize = corePoolSize; this.corePoolSize = corePoolSize;
this.maximumPoolSize = maximumPoolSize; this.maximumPoolSize = maximumPoolSize;
this.workQueue = workQueue; this.workQueue = workQueue;

View File

@ -81,13 +81,24 @@ class ZipUtils {
* Converts DOS time to Java time (number of milliseconds since epoch). * Converts DOS time to Java time (number of milliseconds since epoch).
*/ */
public static long dosToJavaTime(long dtime) { public static long dosToJavaTime(long dtime) {
LocalDateTime ldt = LocalDateTime.of( int year;
(int) (((dtime >> 25) & 0x7f) + 1980), int month;
(int) ((dtime >> 21) & 0x0f), int day;
(int) ((dtime >> 16) & 0x1f), int hour = (int) ((dtime >> 11) & 0x1f);
(int) ((dtime >> 11) & 0x1f), int minute = (int) ((dtime >> 5) & 0x3f);
(int) ((dtime >> 5) & 0x3f), int second = (int) ((dtime << 1) & 0x3e);
(int) ((dtime << 1) & 0x3e)); if ((dtime >> 16) == 0) {
// Interpret the 0 DOS date as 1979-11-30 for compatibility with
// other implementations.
year = 1979;
month = 11;
day = 30;
} else {
year = (int) (((dtime >> 25) & 0x7f) + 1980);
month = (int) ((dtime >> 21) & 0x0f);
day = (int) ((dtime >> 16) & 0x1f);
}
LocalDateTime ldt = LocalDateTime.of(year, month, day, hour, minute, second);
return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond( return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond(
ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS); ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
} }

View File

@ -1292,7 +1292,7 @@ public abstract class SSLEngine {
* href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the * href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
* Application-Layer Protocol Negotiation (ALPN), can negotiate * Application-Layer Protocol Negotiation (ALPN), can negotiate
* application-level values between peers. * application-level values between peers.
* <p> *
* @implSpec * @implSpec
* The implementation in this class throws * The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action. * {@code UnsupportedOperationException} and performs no other action.
@ -1317,7 +1317,7 @@ public abstract class SSLEngine {
* Like {@link #getHandshakeSession()}, * Like {@link #getHandshakeSession()},
* a connection may be in the middle of a handshake. The * a connection may be in the middle of a handshake. The
* application protocol may or may not yet be available. * application protocol may or may not yet be available.
* <p> *
* @implSpec * @implSpec
* The implementation in this class throws * The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action. * {@code UnsupportedOperationException} and performs no other action.

View File

@ -646,7 +646,7 @@ public class SSLParameters {
* requested by the peer, the underlying protocol will determine what * requested by the peer, the underlying protocol will determine what
* action to take. (For example, ALPN will send a * action to take. (For example, ALPN will send a
* {@code "no_application_protocol"} alert and terminate the connection.) * {@code "no_application_protocol"} alert and terminate the connection.)
* <p> *
* @implSpec * @implSpec
* This method will make a copy of the {@code protocols} array. * This method will make a copy of the {@code protocols} array.
* *

View File

@ -702,7 +702,7 @@ public abstract class SSLSocket extends Socket
* href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the * href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
* Application-Layer Protocol Negotiation (ALPN), can negotiate * Application-Layer Protocol Negotiation (ALPN), can negotiate
* application-level values between peers. * application-level values between peers.
* <p> *
* @implSpec * @implSpec
* The implementation in this class throws * The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action. * {@code UnsupportedOperationException} and performs no other action.
@ -727,7 +727,7 @@ public abstract class SSLSocket extends Socket
* Like {@link #getHandshakeSession()}, * Like {@link #getHandshakeSession()},
* a connection may be in the middle of a handshake. The * a connection may be in the middle of a handshake. The
* application protocol may or may not yet be available. * application protocol may or may not yet be available.
* <p> *
* @implSpec * @implSpec
* The implementation in this class throws * The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action. * {@code UnsupportedOperationException} and performs no other action.

View File

@ -0,0 +1,38 @@
/*
* Copyright (c) 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.internal.misc;
import java.io.ObjectInputFilter;
/**
* Access to the alternative ObjectInputFilter.Config.createFilter2 for RMI.
*/
public interface JavaObjectInputFilterAccess {
/**
* Creates a filter from the pattern.
*/
ObjectInputFilter createFilter2(String pattern);
}

View File

@ -25,6 +25,7 @@
package jdk.internal.misc; package jdk.internal.misc;
import java.io.ObjectInputFilter;
import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleDescriptor;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.jar.JarFile; import java.util.jar.JarFile;
@ -70,6 +71,7 @@ public class SharedSecrets {
private static JavaAWTFontAccess javaAWTFontAccess; private static JavaAWTFontAccess javaAWTFontAccess;
private static JavaBeansAccess javaBeansAccess; private static JavaBeansAccess javaBeansAccess;
private static JavaObjectInputStreamAccess javaObjectInputStreamAccess; private static JavaObjectInputStreamAccess javaObjectInputStreamAccess;
private static JavaObjectInputFilterAccess javaObjectInputFilterAccess;
private static JavaIORandomAccessFileAccess javaIORandomAccessFileAccess; private static JavaIORandomAccessFileAccess javaIORandomAccessFileAccess;
public static JavaUtilJarAccess javaUtilJarAccess() { public static JavaUtilJarAccess javaUtilJarAccess() {
@ -315,6 +317,17 @@ public class SharedSecrets {
javaObjectInputStreamAccess = access; javaObjectInputStreamAccess = access;
} }
public static JavaObjectInputFilterAccess getJavaObjectInputFilterAccess() {
if (javaObjectInputFilterAccess == null) {
unsafe.ensureClassInitialized(ObjectInputFilter.Config.class);
}
return javaObjectInputFilterAccess;
}
public static void setJavaObjectInputFilterAccess(JavaObjectInputFilterAccess access) {
javaObjectInputFilterAccess = access;
}
public static void setJavaIORandomAccessFileAccess(JavaIORandomAccessFileAccess jirafa) { public static void setJavaIORandomAccessFileAccess(JavaIORandomAccessFileAccess jirafa) {
javaIORandomAccessFileAccess = jirafa; javaIORandomAccessFileAccess = jirafa;
} }

View File

@ -3071,8 +3071,14 @@ public final class Main {
private String withWeak(PublicKey key) { private String withWeak(PublicKey key) {
if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
return String.format(rb.getString("key.bit"), int kLen = KeyUtil.getKeySize(key);
KeyUtil.getKeySize(key), key.getAlgorithm()); if (kLen >= 0) {
return String.format(rb.getString("key.bit"),
kLen, key.getAlgorithm());
} else {
return String.format(
rb.getString("unknown.size.1"), key.getAlgorithm());
}
} else { } else {
return String.format(rb.getString("key.bit.weak"), return String.format(rb.getString("key.bit.weak"),
KeyUtil.getKeySize(key), key.getAlgorithm()); KeyUtil.getKeySize(key), key.getAlgorithm());

View File

@ -462,6 +462,7 @@ public class Resources extends java.util.ListResourceBundle {
{"with.weak", "%s (weak)"}, {"with.weak", "%s (weak)"},
{"key.bit", "%d-bit %s key"}, {"key.bit", "%d-bit %s key"},
{"key.bit.weak", "%d-bit %s key (weak)"}, {"key.bit.weak", "%d-bit %s key (weak)"},
{"unknown.size.1", "unknown size %s key"},
{".PATTERN.printX509Cert.with.weak", {".PATTERN.printX509Cert.with.weak",
"Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"}, "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"},
{"PKCS.10.with.weak", {"PKCS.10.with.weak",

View File

@ -951,12 +951,36 @@ jdk.xml.dsig.secureValidationPolicy=\
# #
# The filter pattern uses the same format as jdk.serialFilter. # The filter pattern uses the same format as jdk.serialFilter.
# This filter can override the builtin filter if additional types need to be # This filter can override the builtin filter if additional types need to be
# allowed or rejected from the RMI Registry. # allowed or rejected from the RMI Registry or to decrease limits but not
# to increase limits.
# If the limits (maxdepth, maxrefs, or maxbytes) are exceeded, the object is rejected.
#
# Each non-array type is allowed or rejected if it matches one of the patterns,
# evaluated from left to right, and is otherwise allowed. Arrays of any
# component type, including subarrays and arrays of primitives, are allowed.
#
# Array construction of any component type, including subarrays and arrays of
# primitives, are allowed unless the length is greater than the maxarray limit.
# The filter is applied to each array element.
# #
# Note: This property is currently used by the JDK Reference implementation. # Note: This property is currently used by the JDK Reference implementation.
# It is not guaranteed to be examined and used by other implementations. # It is not guaranteed to be examined and used by other implementations.
# #
#sun.rmi.registry.registryFilter=pattern;pattern # The built-in filter allows subclasses of allowed classes and
# can approximately be represented as the pattern:
#
#sun.rmi.registry.registryFilter=\
# maxarray=1000000;\
# maxdepth=20;\
# java.lang.String;\
# java.lang.Number;\
# java.lang.reflect.Proxy;\
# java.rmi.Remote;\
# sun.rmi.server.UnicastRef;\
# sun.rmi.server.RMIClientSocketFactory;\
# sun.rmi.server.RMIServerSocketFactory;\
# java.rmi.activation.ActivationID;\
# java.rmi.server.UID
# #
# RMI Distributed Garbage Collector (DGC) Serial Filter # RMI Distributed Garbage Collector (DGC) Serial Filter
# #

View File

@ -1887,13 +1887,17 @@ public class LogManager {
* The registered {@linkplain #addConfigurationListener configuration * The registered {@linkplain #addConfigurationListener configuration
* listeners} will be invoked after the configuration is successfully updated. * listeners} will be invoked after the configuration is successfully updated.
* <br><br> * <br><br>
* <table><caption style="display:none">Updating configuration properties</caption> * <table class="striped">
* <caption style="display:none">Updating configuration properties</caption>
* <thead>
* <tr> * <tr>
* <th>Property</th> * <th scope="col">Property</th>
* <th>Resulting Behavior</th> * <th scope="col">Resulting Behavior</th>
* </tr> * </tr>
* </thead>
* <tbody>
* <tr> * <tr>
* <td valign="top">{@code <logger>.level}</td> * <th scope="row" valign="top">{@code <logger>.level}</th>
* <td> * <td>
* <ul> * <ul>
* <li>If the resulting configuration defines a level for a logger and * <li>If the resulting configuration defines a level for a logger and
@ -1914,7 +1918,7 @@ public class LogManager {
* </ul> * </ul>
* </td> * </td>
* <tr> * <tr>
* <td valign="top">{@code <logger>.useParentHandlers}</td> * <th scope="row" valign="top">{@code <logger>.useParentHandlers}</th>
* <td> * <td>
* <ul> * <ul>
* <li>If either the resulting or the old value for the useParentHandlers * <li>If either the resulting or the old value for the useParentHandlers
@ -1928,7 +1932,7 @@ public class LogManager {
* </td> * </td>
* </tr> * </tr>
* <tr> * <tr>
* <td valign="top">{@code <logger>.handlers}</td> * <th scope="row" valign="top">{@code <logger>.handlers}</th>
* <td> * <td>
* <ul> * <ul>
* <li>If the resulting configuration defines a list of handlers for a * <li>If the resulting configuration defines a list of handlers for a
@ -1952,7 +1956,7 @@ public class LogManager {
* </td> * </td>
* </tr> * </tr>
* <tr> * <tr>
* <td valign="top">{@code <handler-name>.*}</td> * <th scope="row" valign="top">{@code <handler-name>.*}</th>
* <td> * <td>
* <ul> * <ul>
* <li>Properties configured/changed on handler classes will only affect * <li>Properties configured/changed on handler classes will only affect
@ -1964,7 +1968,7 @@ public class LogManager {
* </td> * </td>
* </tr> * </tr>
* <tr> * <tr>
* <td valign="top">{@code config} and any other property</td> * <th scope="row" valign="top">{@code config} and any other property</th>
* <td> * <td>
* <ul> * <ul>
* <li>The resulting value for these property will be stored in the * <li>The resulting value for these property will be stored in the
@ -1974,6 +1978,7 @@ public class LogManager {
* </ul> * </ul>
* </td> * </td>
* </tr> * </tr>
* </tbody>
* </table> * </table>
* <p> * <p>
* <em>Example mapper functions:</em> * <em>Example mapper functions:</em>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1497,7 +1497,7 @@ public class Logger {
* The {@code msg} string is localized using the given resource bundle. * The {@code msg} string is localized using the given resource bundle.
* If the resource bundle is {@code null}, then the {@code msg} string is not * If the resource bundle is {@code null}, then the {@code msg} string is not
* localized. * localized.
* <p> *
* @param level One of the message level identifiers, e.g., {@code SEVERE} * @param level One of the message level identifiers, e.g., {@code SEVERE}
* @param bundle Resource bundle to localize {@code msg}; * @param bundle Resource bundle to localize {@code msg};
* can be {@code null}. * can be {@code null}.
@ -1614,7 +1614,7 @@ public class Logger {
* processed specially by output {@code Formatter} objects and is not treated * processed specially by output {@code Formatter} objects and is not treated
* as a formatting parameter to the {@code LogRecord} {@code message} * as a formatting parameter to the {@code LogRecord} {@code message}
* property. * property.
* <p> *
* @param level One of the message level identifiers, e.g., {@code SEVERE} * @param level One of the message level identifiers, e.g., {@code SEVERE}
* @param bundle Resource bundle to localize {@code msg}; * @param bundle Resource bundle to localize {@code msg};
* can be {@code null}. * can be {@code null}.

View File

@ -41,7 +41,7 @@ import jdk.internal.logger.SurrogateLogger;
* The {@code SimpleFormatter} is initialized with the * The {@code SimpleFormatter} is initialized with the
* <a href="../Formatter.html#syntax">format string</a> * <a href="../Formatter.html#syntax">format string</a>
* specified in the {@code java.util.logging.SimpleFormatter.format} * specified in the {@code java.util.logging.SimpleFormatter.format}
* property to {@linkplain #format format} the log messages. * property to {@linkplain #format(LogRecord) format} the log messages.
* This property can be defined * This property can be defined
* in the {@linkplain LogManager#getProperty logging properties} * in the {@linkplain LogManager#getProperty logging properties}
* configuration file * configuration file

View File

@ -28,7 +28,6 @@ package sun.rmi.registry;
import java.io.ObjectInputFilter; import java.io.ObjectInputFilter;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.rmi.server.LogStream;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import java.security.Security; import java.security.Security;
import java.util.ArrayList; import java.util.ArrayList;
@ -58,6 +57,7 @@ import java.security.Permissions;
import java.security.ProtectionDomain; import java.security.ProtectionDomain;
import java.text.MessageFormat; import java.text.MessageFormat;
import jdk.internal.misc.SharedSecrets;
import sun.rmi.runtime.Log; import sun.rmi.runtime.Log;
import sun.rmi.server.UnicastRef; import sun.rmi.server.UnicastRef;
import sun.rmi.server.UnicastServerRef; import sun.rmi.server.UnicastServerRef;
@ -109,7 +109,7 @@ public class RegistryImpl extends java.rmi.server.RemoteServer
private static final int REGISTRY_MAX_DEPTH = 20; private static final int REGISTRY_MAX_DEPTH = 20;
/** Registry maximum array size in remote invocations. **/ /** Registry maximum array size in remote invocations. **/
private static final int REGISTRY_MAX_ARRAY_SIZE = 10000; private static final int REGISTRY_MAX_ARRAY_SIZE = 1_000_000;
/** /**
* The registryFilter created from the value of the {@code "sun.rmi.registry.registryFilter"} * The registryFilter created from the value of the {@code "sun.rmi.registry.registryFilter"}
@ -130,7 +130,7 @@ public class RegistryImpl extends java.rmi.server.RemoteServer
props = Security.getProperty(REGISTRY_FILTER_PROPNAME); props = Security.getProperty(REGISTRY_FILTER_PROPNAME);
} }
if (props != null) { if (props != null) {
filter = ObjectInputFilter.Config.createFilter(props); filter = SharedSecrets.getJavaObjectInputFilterAccess().createFilter2(props);
Log regLog = Log.getLog("sun.rmi.registry", "registry", -1); Log regLog = Log.getLog("sun.rmi.registry", "registry", -1);
if (regLog.isLoggable(Log.BRIEF)) { if (regLog.isLoggable(Log.BRIEF)) {
regLog.log(Log.BRIEF, "registryFilter = " + filter); regLog.log(Log.BRIEF, "registryFilter = " + filter);
@ -451,17 +451,10 @@ public class RegistryImpl extends java.rmi.server.RemoteServer
Class<?> clazz = filterInfo.serialClass(); Class<?> clazz = filterInfo.serialClass();
if (clazz != null) { if (clazz != null) {
if (clazz.isArray()) { if (clazz.isArray()) {
if (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > REGISTRY_MAX_ARRAY_SIZE) { // Arrays are REJECTED only if they exceed the limit
return ObjectInputFilter.Status.REJECTED; return (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > REGISTRY_MAX_ARRAY_SIZE)
} ? ObjectInputFilter.Status.REJECTED
do { : ObjectInputFilter.Status.UNDECIDED;
// Arrays are allowed depending on the component type
clazz = clazz.getComponentType();
} while (clazz.isArray());
}
if (clazz.isPrimitive()) {
// Arrays of primitives are allowed
return ObjectInputFilter.Status.ALLOWED;
} }
if (String.class == clazz if (String.class == clazz
|| java.lang.Number.class.isAssignableFrom(clazz) || java.lang.Number.class.isAssignableFrom(clazz)

View File

@ -0,0 +1,85 @@
/*
* Copyright (c) 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.incubator.http;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.util.concurrent.CompletableFuture;
import javax.net.ssl.SSLEngine;
import jdk.incubator.http.internal.common.ExceptionallyCloseable;
/**
* Asynchronous version of SSLConnection.
*
* There are two concrete implementations of this class: AsyncSSLConnection
* and AsyncSSLTunnelConnection.
* This abstraction is useful when downgrading from HTTP/2 to HTTP/1.1 over
* an SSL connection. See ExchangeImpl::get in the case where an ALPNException
* is thrown.
*
* Note: An AsyncSSLConnection wraps a PlainHttpConnection, while an
* AsyncSSLTunnelConnection wraps a PlainTunnelingConnection.
* If both these wrapped classes where made to inherit from a
* common abstraction then it might be possible to merge
* AsyncSSLConnection and AsyncSSLTunnelConnection back into
* a single class - and simply use different factory methods to
* create different wrappees, but this is left up for further cleanup.
*
*/
abstract class AbstractAsyncSSLConnection extends HttpConnection
implements AsyncConnection, ExceptionallyCloseable {
AbstractAsyncSSLConnection(InetSocketAddress addr, HttpClientImpl client) {
super(addr, client);
}
abstract SSLEngine getEngine();
abstract AsyncSSLDelegate sslDelegate();
abstract HttpConnection plainConnection();
abstract HttpConnection downgrade();
@Override
final boolean isSecure() {
return true;
}
// Blocking read functions not used here
@Override
protected final ByteBuffer readImpl() throws IOException {
throw new UnsupportedOperationException("Not supported.");
}
// whenReceivedResponse only used in HTTP/1.1 (Http1Exchange)
// AbstractAsyncSSLConnection is only used with HTTP/2
@Override
final CompletableFuture<Void> whenReceivingResponse() {
throw new UnsupportedOperationException("Not supported.");
}
}

View File

@ -35,14 +35,12 @@ import java.util.function.Supplier;
import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLEngine;
import jdk.incubator.http.internal.common.ByteBufferReference; import jdk.incubator.http.internal.common.ByteBufferReference;
import jdk.incubator.http.internal.common.ExceptionallyCloseable;
import jdk.incubator.http.internal.common.Utils; import jdk.incubator.http.internal.common.Utils;
/** /**
* Asynchronous version of SSLConnection. * Asynchronous version of SSLConnection.
*/ */
class AsyncSSLConnection extends HttpConnection class AsyncSSLConnection extends AbstractAsyncSSLConnection {
implements AsyncConnection, ExceptionallyCloseable {
final AsyncSSLDelegate sslDelegate; final AsyncSSLDelegate sslDelegate;
final PlainHttpConnection plainConnection; final PlainHttpConnection plainConnection;
@ -61,15 +59,14 @@ class AsyncSSLConnection extends HttpConnection
plainConnection.configureMode(mode); plainConnection.configureMode(mode);
} }
private CompletableFuture<Void> configureModeAsync(Void ignore) { @Override
CompletableFuture<Void> cf = new CompletableFuture<>(); PlainHttpConnection plainConnection() {
try { return plainConnection;
configureMode(Mode.ASYNC); }
cf.complete(null);
} catch (Throwable t) { @Override
cf.completeExceptionally(t); AsyncSSLDelegate sslDelegate() {
} return sslDelegate;
return cf;
} }
@Override @Override
@ -91,11 +88,6 @@ class AsyncSSLConnection extends HttpConnection
return plainConnection.connected() && sslDelegate.connected(); return plainConnection.connected() && sslDelegate.connected();
} }
@Override
boolean isSecure() {
return true;
}
@Override @Override
boolean isProxied() { boolean isProxied() {
return false; return false;
@ -172,6 +164,7 @@ class AsyncSSLConnection extends HttpConnection
plainConnection.channel().shutdownOutput(); plainConnection.channel().shutdownOutput();
} }
@Override
SSLEngine getEngine() { SSLEngine getEngine() {
return sslDelegate.getEngine(); return sslDelegate.getEngine();
} }
@ -184,18 +177,6 @@ class AsyncSSLConnection extends HttpConnection
plainConnection.setAsyncCallbacks(sslDelegate::asyncReceive, errorReceiver, sslDelegate::getNetBuffer); plainConnection.setAsyncCallbacks(sslDelegate::asyncReceive, errorReceiver, sslDelegate::getNetBuffer);
} }
// Blocking read functions not used here
@Override
protected ByteBuffer readImpl() throws IOException {
throw new UnsupportedOperationException("Not supported.");
}
@Override
CompletableFuture<Void> whenReceivingResponse() {
throw new UnsupportedOperationException("Not supported.");
}
@Override @Override
public void startReading() { public void startReading() {
plainConnection.startReading(); plainConnection.startReading();
@ -206,4 +187,9 @@ class AsyncSSLConnection extends HttpConnection
public void stopAsyncReading() { public void stopAsyncReading() {
plainConnection.stopAsyncReading(); plainConnection.stopAsyncReading();
} }
@Override
SSLConnection downgrade() {
return new SSLConnection(this);
}
} }

View File

@ -0,0 +1,206 @@
/*
* Copyright (c) 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.incubator.http;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import java.util.function.Supplier;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLParameters;
import jdk.incubator.http.internal.common.ByteBufferReference;
import jdk.incubator.http.internal.common.Utils;
/**
* An SSL tunnel built on a Plain (CONNECT) TCP tunnel.
*/
class AsyncSSLTunnelConnection extends AbstractAsyncSSLConnection {
final PlainTunnelingConnection plainConnection;
final AsyncSSLDelegate sslDelegate;
final String serverName;
@Override
public void connect() throws IOException, InterruptedException {
plainConnection.connect();
configureMode(Mode.ASYNC);
startReading();
sslDelegate.connect();
}
@Override
boolean connected() {
return plainConnection.connected() && sslDelegate.connected();
}
@Override
public CompletableFuture<Void> connectAsync() {
throw new InternalError();
}
AsyncSSLTunnelConnection(InetSocketAddress addr,
HttpClientImpl client,
String[] alpn,
InetSocketAddress proxy)
{
super(addr, client);
this.serverName = Utils.getServerName(addr);
this.plainConnection = new PlainTunnelingConnection(addr, proxy, client);
this.sslDelegate = new AsyncSSLDelegate(plainConnection, client, alpn, serverName);
}
@Override
synchronized void configureMode(Mode mode) throws IOException {
super.configureMode(mode);
plainConnection.configureMode(mode);
}
@Override
SSLParameters sslParameters() {
return sslDelegate.getSSLParameters();
}
@Override
public String toString() {
return "AsyncSSLTunnelConnection: " + super.toString();
}
@Override
PlainTunnelingConnection plainConnection() {
return plainConnection;
}
@Override
AsyncSSLDelegate sslDelegate() {
return sslDelegate;
}
@Override
ConnectionPool.CacheKey cacheKey() {
return ConnectionPool.cacheKey(address, plainConnection.proxyAddr);
}
@Override
long write(ByteBuffer[] buffers, int start, int number) throws IOException {
//debugPrint("Send", buffers, start, number);
ByteBuffer[] bufs = Utils.reduce(buffers, start, number);
long n = Utils.remaining(bufs);
sslDelegate.writeAsync(ByteBufferReference.toReferences(bufs));
sslDelegate.flushAsync();
return n;
}
@Override
long write(ByteBuffer buffer) throws IOException {
//debugPrint("Send", buffer);
long n = buffer.remaining();
sslDelegate.writeAsync(ByteBufferReference.toReferences(buffer));
sslDelegate.flushAsync();
return n;
}
@Override
public void writeAsync(ByteBufferReference[] buffers) throws IOException {
sslDelegate.writeAsync(buffers);
}
@Override
public void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
sslDelegate.writeAsyncUnordered(buffers);
}
@Override
public void flushAsync() throws IOException {
sslDelegate.flushAsync();
}
@Override
public void close() {
Utils.close(sslDelegate, plainConnection.channel());
}
@Override
void shutdownInput() throws IOException {
plainConnection.channel().shutdownInput();
}
@Override
void shutdownOutput() throws IOException {
plainConnection.channel().shutdownOutput();
}
@Override
SocketChannel channel() {
return plainConnection.channel();
}
@Override
boolean isProxied() {
return true;
}
@Override
public void setAsyncCallbacks(Consumer<ByteBufferReference> asyncReceiver,
Consumer<Throwable> errorReceiver,
Supplier<ByteBufferReference> readBufferSupplier) {
sslDelegate.setAsyncCallbacks(asyncReceiver, errorReceiver, readBufferSupplier);
plainConnection.setAsyncCallbacks(sslDelegate::asyncReceive, errorReceiver, sslDelegate::getNetBuffer);
}
@Override
public void startReading() {
plainConnection.startReading();
sslDelegate.startReading();
}
@Override
public void stopAsyncReading() {
plainConnection.stopAsyncReading();
}
@Override
public void enableCallback() {
sslDelegate.enableCallback();
}
@Override
public void closeExceptionally(Throwable cause) throws IOException {
Utils.close(cause, sslDelegate, plainConnection.channel());
}
@Override
SSLEngine getEngine() {
return sslDelegate.getEngine();
}
@Override
SSLTunnelConnection downgrade() {
return new SSLTunnelConnection(this);
}
}

View File

@ -82,9 +82,9 @@ abstract class ExchangeImpl<T> {
c = c2.getConnectionFor(request); c = c2.getConnectionFor(request);
} catch (Http2Connection.ALPNException e) { } catch (Http2Connection.ALPNException e) {
// failed to negotiate "h2" // failed to negotiate "h2"
AsyncSSLConnection as = e.getConnection(); AbstractAsyncSSLConnection as = e.getConnection();
as.stopAsyncReading(); as.stopAsyncReading();
SSLConnection sslc = new SSLConnection(as); HttpConnection sslc = as.downgrade();
ExchangeImpl<U> ex = new Http1Exchange<>(exchange, sslc); ExchangeImpl<U> ex = new Http1Exchange<>(exchange, sslc);
return ex; return ex;
} }

View File

@ -211,12 +211,13 @@ class Http2Connection {
this.hpackIn = new Decoder(clientSettings.getParameter(HEADER_TABLE_SIZE)); this.hpackIn = new Decoder(clientSettings.getParameter(HEADER_TABLE_SIZE));
this.windowUpdater = new ConnectionWindowUpdateSender(this, client.getReceiveBufferSize()); this.windowUpdater = new ConnectionWindowUpdateSender(this, client.getReceiveBufferSize());
} }
/**
* Case 1) Create from upgraded HTTP/1.1 connection. /**
* Is ready to use. Will not be SSL. exchange is the Exchange * Case 1) Create from upgraded HTTP/1.1 connection.
* that initiated the connection, whose response will be delivered * Is ready to use. Will not be SSL. exchange is the Exchange
* on a Stream. * that initiated the connection, whose response will be delivered
*/ * on a Stream.
*/
Http2Connection(HttpConnection connection, Http2Connection(HttpConnection connection,
Http2ClientImpl client2, Http2ClientImpl client2,
Exchange<?> exchange, Exchange<?> exchange,
@ -280,7 +281,7 @@ class Http2Connection {
* Throws an IOException if h2 was not negotiated * Throws an IOException if h2 was not negotiated
*/ */
private void checkSSLConfig() throws IOException { private void checkSSLConfig() throws IOException {
AsyncSSLConnection aconn = (AsyncSSLConnection)connection; AbstractAsyncSSLConnection aconn = (AbstractAsyncSSLConnection)connection;
SSLEngine engine = aconn.getEngine(); SSLEngine engine = aconn.getEngine();
String alpn = engine.getApplicationProtocol(); String alpn = engine.getApplicationProtocol();
if (alpn == null || !alpn.equals("h2")) { if (alpn == null || !alpn.equals("h2")) {
@ -906,14 +907,14 @@ class Http2Connection {
*/ */
static final class ALPNException extends IOException { static final class ALPNException extends IOException {
private static final long serialVersionUID = 23138275393635783L; private static final long serialVersionUID = 23138275393635783L;
final AsyncSSLConnection connection; final AbstractAsyncSSLConnection connection;
ALPNException(String msg, AsyncSSLConnection connection) { ALPNException(String msg, AbstractAsyncSSLConnection connection) {
super(msg); super(msg);
this.connection = connection; this.connection = connection;
} }
AsyncSSLConnection getConnection() { AbstractAsyncSSLConnection getConnection() {
return connection; return connection;
} }
} }

View File

@ -34,7 +34,6 @@ import java.nio.channels.SocketChannel;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import jdk.incubator.http.internal.common.ByteBufferReference; import jdk.incubator.http.internal.common.ByteBufferReference;
import jdk.incubator.http.internal.common.Utils;
/** /**
* Wraps socket channel layer and takes care of SSL also. * Wraps socket channel layer and takes care of SSL also.
@ -136,7 +135,11 @@ abstract class HttpConnection implements Closeable {
String[] alpn, boolean isHttp2, HttpClientImpl client) String[] alpn, boolean isHttp2, HttpClientImpl client)
{ {
if (proxy != null) { if (proxy != null) {
return new SSLTunnelConnection(addr, client, proxy); if (!isHttp2) {
return new SSLTunnelConnection(addr, client, proxy);
} else {
return new AsyncSSLTunnelConnection(addr, client, alpn, proxy);
}
} else if (!isHttp2) { } else if (!isHttp2) {
return new SSLConnection(addr, client, alpn); return new SSLConnection(addr, client, alpn);
} else { } else {
@ -154,6 +157,12 @@ abstract class HttpConnection implements Closeable {
{ {
HttpConnection c = null; HttpConnection c = null;
InetSocketAddress proxy = request.proxy(client); InetSocketAddress proxy = request.proxy(client);
if (proxy != null && proxy.isUnresolved()) {
// The default proxy selector may select a proxy whose
// address is unresolved. We must resolve the address
// before using it to connect.
proxy = new InetSocketAddress(proxy.getHostString(), proxy.getPort());
}
boolean secure = request.secure(); boolean secure = request.secure();
ConnectionPool pool = client.connectionPool(); ConnectionPool pool = client.connectionPool();
String[] alpn = null; String[] alpn = null;

View File

@ -34,12 +34,15 @@ import java.net.InetSocketAddress;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel; import java.nio.channels.SocketChannel;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import java.util.function.Supplier;
/** /**
* A plain text socket tunnel through a proxy. Uses "CONNECT" but does not * A plain text socket tunnel through a proxy. Uses "CONNECT" but does not
* encrypt. Used by WebSocket. Subclassed in SSLTunnelConnection for encryption. * encrypt. Used by WebSocket, as well as HTTP over SSL + Proxy.
* Wrapped in SSLTunnelConnection or AsyncSSLTunnelConnection for encryption.
*/ */
class PlainTunnelingConnection extends HttpConnection { class PlainTunnelingConnection extends HttpConnection implements AsyncConnection {
final PlainHttpConnection delegate; final PlainHttpConnection delegate;
protected final InetSocketAddress proxyAddr; protected final InetSocketAddress proxyAddr;
@ -116,17 +119,17 @@ class PlainTunnelingConnection extends HttpConnection {
} }
@Override @Override
void writeAsync(ByteBufferReference[] buffers) throws IOException { public void writeAsync(ByteBufferReference[] buffers) throws IOException {
delegate.writeAsync(buffers); delegate.writeAsync(buffers);
} }
@Override @Override
void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException { public void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
delegate.writeAsyncUnordered(buffers); delegate.writeAsyncUnordered(buffers);
} }
@Override @Override
void flushAsync() throws IOException { public void flushAsync() throws IOException {
delegate.flushAsync(); delegate.flushAsync();
} }
@ -165,4 +168,32 @@ class PlainTunnelingConnection extends HttpConnection {
boolean isProxied() { boolean isProxied() {
return true; return true;
} }
@Override
public void setAsyncCallbacks(Consumer<ByteBufferReference> asyncReceiver,
Consumer<Throwable> errorReceiver,
Supplier<ByteBufferReference> readBufferSupplier) {
delegate.setAsyncCallbacks(asyncReceiver, errorReceiver, readBufferSupplier);
}
@Override
public void startReading() {
delegate.startReading();
}
@Override
public void stopAsyncReading() {
delegate.stopAsyncReading();
}
@Override
public void enableCallback() {
delegate.enableCallback();
}
@Override
synchronized void configureMode(Mode mode) throws IOException {
super.configureMode(mode);
delegate.configureMode(mode);
}
} }

View File

@ -77,8 +77,8 @@ class SSLConnection extends HttpConnection {
*/ */
SSLConnection(AsyncSSLConnection c) { SSLConnection(AsyncSSLConnection c) {
super(c.address, c.client); super(c.address, c.client);
this.delegate = c.plainConnection; this.delegate = c.plainConnection();
AsyncSSLDelegate adel = c.sslDelegate; AsyncSSLDelegate adel = c.sslDelegate();
this.sslDelegate = new SSLDelegate(adel.engine, delegate.channel(), client, adel.serverName); this.sslDelegate = new SSLDelegate(adel.engine, delegate.channel(), client, adel.serverName);
this.alpn = adel.alpn; this.alpn = adel.alpn;
this.serverName = adel.serverName; this.serverName = adel.serverName;

View File

@ -85,6 +85,19 @@ class SSLTunnelConnection extends HttpConnection {
delegate = new PlainTunnelingConnection(addr, proxy, client); delegate = new PlainTunnelingConnection(addr, proxy, client);
} }
/**
* Create an SSLTunnelConnection from an existing connected AsyncSSLTunnelConnection.
* Used when downgrading from HTTP/2 to HTTP/1.1
*/
SSLTunnelConnection(AsyncSSLTunnelConnection c) {
super(c.address, c.client);
this.delegate = c.plainConnection();
AsyncSSLDelegate adel = c.sslDelegate();
this.sslDelegate = new SSLDelegate(adel.engine, delegate.channel(), client, adel.serverName);
this.serverName = adel.serverName;
connected = c.connected();
}
@Override @Override
SSLParameters sslParameters() { SSLParameters sslParameters() {
return sslDelegate.getSSLParameters(); return sslDelegate.getSSLParameters();

View File

@ -1088,8 +1088,12 @@ public class Main {
private String withWeak(PublicKey key) { private String withWeak(PublicKey key) {
if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
return String.format( int kLen = KeyUtil.getKeySize(key);
rb.getString("key.bit"), KeyUtil.getKeySize(key)); if (kLen >= 0) {
return String.format(rb.getString("key.bit"), kLen);
} else {
return rb.getString("unknown.size");
}
} else { } else {
seeWeak = true; seeWeak = true;
return String.format( return String.format(

View File

@ -164,6 +164,7 @@ public class Resources extends java.util.ListResourceBundle {
{"with.weak", "%s (weak)"}, {"with.weak", "%s (weak)"},
{"key.bit", "%d-bit key"}, {"key.bit", "%d-bit key"},
{"key.bit.weak", "%d-bit key (weak)"}, {"key.bit.weak", "%d-bit key (weak)"},
{"unknown.size", "unknown size"},
{"jarsigner.", "jarsigner: "}, {"jarsigner.", "jarsigner: "},
{"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.", {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.",

View File

@ -28,7 +28,6 @@ package com.sun.jdi;
/** /**
* Thrown to indicate that the requested module is invalid * Thrown to indicate that the requested module is invalid
* or became invalid after the module was unloaded. * or became invalid after the module was unloaded.
* <p>
* *
* @since 9 * @since 9
*/ */

View File

@ -40,17 +40,20 @@ package com.sun.jdi;
* permission allows, and discusses the risks of granting code the * permission allows, and discusses the risks of granting code the
* permission. * permission.
* *
* <table class="plain"> * <table class="striped">
* <caption style="display:none">Table shows permission target name, what the * <caption style="display:none">Table shows permission target name, what the
* permission allows, and associated risks</caption> * permission allows, and associated risks</caption>
* <thead>
* <tr> * <tr>
* <th>Permission Target Name</th> * <th scope="col">Permission Target Name</th>
* <th>What the Permission Allows</th> * <th scope="col">What the Permission Allows</th>
* <th>Risks of Allowing this Permission</th> * <th scope="col">Risks of Allowing this Permission</th>
* </tr> * </tr>
* </thead>
* *
* <tbody>
* <tr> * <tr>
* <td>virtualMachineManager</td> * <th scope="row">virtualMachineManager</th>
* <td>Ability to inspect and modify the JDI objects in the * <td>Ability to inspect and modify the JDI objects in the
* {@code VirtualMachineManager} * {@code VirtualMachineManager}
* </td> * </td>
@ -59,6 +62,7 @@ package com.sun.jdi;
* misbehave. * misbehave.
* </td> * </td>
* </tr> * </tr>
* </tbody>
* *
* </table> * </table>
* *

View File

@ -43,79 +43,86 @@ package com.sun.jdi;
* {@link ArrayType#componentType()} * {@link ArrayType#componentType()}
* </BLOCKQUOTE> * </BLOCKQUOTE>
* <P> * <P>
* The following table illustrates which subinterfaces of Type * The following tables illustrate which subinterfaces of Type
* are used to mirror types in the target VM -- * are used to mirror types in the target VM --
* <TABLE BORDER="1"> * <TABLE class="plain">
* <CAPTION style="display:none">Maps each type declared in target to a mirrored * <CAPTION>Subinterfaces of {@link PrimitiveType}</CAPTION>
* instance of a subinterface of PrimitiveType or ReferenceType"</CAPTION> * <THEAD style="background-color:#EEEEFF; text-align:left">
* <TR style="background-color:#EEEEFF">
* <TH id="primtype" colspan=3>Subinterfaces of {@link PrimitiveType}</TH>
* <TR style="background-color:#EEEEFF">
* <TH id="declared" style="text-align:left" colspan=2>Type declared in target as</TH>
* <TH id="mirrored" style="text-align:left">Is mirrored as an instance of</TH>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>boolean</CODE></TD> * <TH scope="col" style="width:25em">Type declared in target as</TH>
* <TD headers="primtype mirrored"> {@link BooleanType}</TD> * <TH scope="col" style="width:20em">Is mirrored as an instance of</TH>
* </THEAD>
* <TBODY style="text-align:left">
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>byte</CODE></TD> * <TH scope="row"><CODE>boolean</CODE></TH>
* <TD headers="primtype mirrored">{@link ByteType}</TD> * <TD> {@link BooleanType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>char</CODE></TD> * <TH scope="row"><CODE>byte</CODE></TH>
* <TD headers="primtype mirrored">{@link CharType}</TD> * <TD>{@link ByteType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>double</CODE></TD> * <TH scope="row"><CODE>char</CODE></TH>
* <TD headers="primtype mirrored">{@link DoubleType}</TD> * <TD>{@link CharType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>float</CODE></TD> * <TH scope="row"><CODE>double</CODE></TH>
* <TD headers="primtype mirrored">{@link FloatType}</TD> * <TD>{@link DoubleType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>int</CODE></TD> * <TH scope="row"><CODE>float</CODE></TH>
* <TD headers="primtype mirrored">{@link IntegerType}</TD> * <TD>{@link FloatType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>long</CODE></TD> * <TH scope="row"><CODE>int</CODE></TH>
* <TD headers="primtype mirrored">{@link LongType}</TD> * <TD>{@link IntegerType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>short</CODE></TD> * <TH scope="row"><CODE>long</CODE></TH>
* <TD headers="primtype mirrored">{@link ShortType}</TD> * <TD>{@link LongType}</TD>
* <TR> * <TR>
* <TD headers="primtype declared" colspan=2><CODE>void</CODE></TD> * <TH scope="row"><CODE>short</CODE></TH>
* <TD headers="primtype mirrored">{@link VoidType}</TD> * <TD>{@link ShortType}</TD>
* <TR style="background-color:#EEEEFF">
* <TH id="reftype" colspan=3>Subinterfaces of {@link ReferenceType}</TH>
* <TR style="background-color:#EEEEFF">
* <TH id="declared2"style="text-align:left">Type declared in target as</TH>
* <TH id="example2" style="text-align:left">For example</TH>
* <TH id="mirrored2" style="text-align:left">Is mirrored as an instance of</TH>
* <TR> * <TR>
* <TD headers="reftype declared2"><I>a class</I></TD> * <TH scope="row"><CODE>void</CODE></TH>
* <TD headers="reftype example2"><CODE>Date</CODE></TD> * <TD>{@link VoidType}</TD>
* <TD headers="reftype mirrored2">{@link ClassType}</TD> * </TBODY>
* </TABLE>
*
* <TABLE class="plain">
* <CAPTION>Subinterfaces of {@link ReferenceType}</CAPTION>
* <THEAD style="background-color:#EEEEFF; text-align:left">
* <TR> * <TR>
* <TD headers="reftype declared2"><I>an interface</I></TD> * <TH scope="col" style="width:15em">Type declared in target as</TH>
* <TD headers="reftype example2"><CODE>Runnable</CODE></TD> * <TH scope="col" style="width:10em">For example</TH>
* <TD headers="reftype mirrored2">{@link InterfaceType}</TD> * <TH scope="col" style="width:20em">Is mirrored as an instance of</TH>
* </THEAD>
* <TBODY style="text-align:left">
* <TR> * <TR>
* <TD headers="reftype declared2"><I>an array</I></TD> * <TH scope="row"><I>a class</I></TH>
* <TD headers="reftype example2">&nbsp;</TD> * <TH scope="row"><CODE>Date</CODE></TH>
* <TD headers="reftype mirrored2">{@link ArrayType}</TD> * <TD>{@link ClassType}</TD>
* <TR> * <TR>
* <TD headers="reftype declared2"><I>an array</I></TD> * <TH scope="row"><I>an interface</I></TH>
* <TD headers="reftype example2"><CODE>int[]</CODE></TD> * <TH scope="row"><CODE>Runnable</CODE></TH>
* <TD headers="reftype mirrored2">{@link ArrayType} whose * <TD>{@link InterfaceType}</TD>
* <TR>
* <TH scope="row" rowspan="4"><I>an array</I></TH>
* <TH scope="row"><i>(any)</i></TH>
* <TD>{@link ArrayType}</TD>
* <TR>
* <!--<TH scope="row"><I>an array</I></TH>-->
* <TH scope="row"><CODE>int[]</CODE></TH>
* <TD>{@link ArrayType} whose
* {@link ArrayType#componentType() componentType()} is * {@link ArrayType#componentType() componentType()} is
* {@link IntegerType}</TD> * {@link IntegerType}</TD>
* <TR> * <TR>
* <TD headers="reftype declared2"><I>an array</I></TD> * <!--<TH scope="row"><I>an array</I></TH>-->
* <TD headers="reftype example2"><CODE>Date[]</CODE></TD> * <TH scope="row"><CODE>Date[]</CODE></TH>
* <TD headers="reftype mirrored2">{@link ArrayType} whose * <TD>{@link ArrayType} whose
* {@link ArrayType#componentType() componentType()} is * {@link ArrayType#componentType() componentType()} is
* {@link ClassType}</TD> * {@link ClassType}</TD>
* <TR> * <TR>
* <TD headers="reftype declared2"><I>an array</I></TD> * <!--<TH scope="row"><I>an array</I></TH>-->
* <TD headers="reftype example2"><CODE>Runnable[]</CODE></TD> * <TH scope="row"><CODE>Runnable[]</CODE></TH>
* <TD headers="reftype mirrored2">{@link ArrayType} whose * <TD>{@link ArrayType} whose
* {@link ArrayType#componentType() componentType()} is * {@link ArrayType#componentType() componentType()} is
* {@link InterfaceType}</TD> * {@link InterfaceType}</TD>
* </TBODY>
* </TABLE> * </TABLE>
* *
* @see PrimitiveType Subinterface PrimitiveType * @see PrimitiveType Subinterface PrimitiveType

View File

@ -33,7 +33,7 @@ import com.sun.jdi.event.ModificationWatchpointEvent;
* value hierarchy encompassing primitive values and object values. * value hierarchy encompassing primitive values and object values.
* <P> * <P>
* Some examples of where values may be accessed: * Some examples of where values may be accessed:
* <BLOCKQUOTE><TABLE><CAPTION style="display:none">layout</CAPTION> * <BLOCKQUOTE><TABLE role="presentation">
* <TR> * <TR>
* <TD>{@link ObjectReference#getValue(Field) * <TD>{@link ObjectReference#getValue(Field)
* ObjectReference.getValue(Field)} * ObjectReference.getValue(Field)}
@ -52,117 +52,130 @@ import com.sun.jdi.event.ModificationWatchpointEvent;
* <TD>- returned with an event * <TD>- returned with an event
* </TABLE></BLOCKQUOTE> * </TABLE></BLOCKQUOTE>
* <P> * <P>
* The following table illustrates which subinterfaces of Value * The following tables illustrate which subinterfaces of Value
* are used to mirror values in the target VM -- * are used to mirror values in the target VM --
* <TABLE BORDER="1"> * <TABLE class="plain">
* <CAPTION style="display:none">Maps each kind of value to a mirrored * <CAPTION>Subinterfaces of {@link PrimitiveValue}</CAPTION>
* instance of a subinterface of Value</CAPTION> * <THEAD style="background-color:#EEEEFF; text-align:left">
* <TR style="background-color:#EEEEFF">
* <TH id="primval" colspan=4>Subinterfaces of {@link PrimitiveValue}</TH>
* <TR style="background-color:#EEEEFF">
* <TH id="kind" style="text-align:left">Kind of value</TH>
* <TH id="example" style="text-align:left">For example -<br>expression in target</TH>
* <TH id="mirrored" style="text-align:left">Is mirrored as an<br>instance of</TH>
* <TH id="type" style="text-align:left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
* <TR> * <TR>
* <TD headers="primval kind"> a boolean</TD> * <TH scope="col" style="width:10em">Kind of value</TH>
* <TD headers="primval example"> {@code true}</TD> * <TH scope="col" style="width:15em">For example -<br>expression in target</TH>
* <TD headers="primval mirrored"> {@link BooleanValue}</TD> * <TH scope="col" style="width:15em">Is mirrored as an<br>instance of</TH>
* <TD headers="primval type"> {@link BooleanType}</TD> * <TH scope="col" style="width:15em">{@link Type} of value<br>{@link #type() Value.type()}</TH>
* </THEAD>
* <TBODY style="text-align:left">
* <TR> * <TR>
* <TD headers="primval kind"> a byte</TD> * <TH scope="row">a boolean</TH>
* <TD headers="primval example"> {@code (byte)4}</TD> * <TD>{@code true}</TD>
* <TD headers="primval mirrored"> {@link ByteValue}</TD> * <TD>{@link BooleanValue}</TD>
* <TD headers="primval type"> {@link ByteType}</TD> * <TD>{@link BooleanType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> a char</TD> * <TH scope="row">a byte</TH>
* <TD headers="primval example"> {@code 'a'}</TD> * <TD>{@code (byte)4}</TD>
* <TD headers="primval mirrored"> {@link CharValue}</TD> * <TD>{@link ByteValue}</TD>
* <TD headers="primval type"> {@link CharType}</TD> * <TD>{@link ByteType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> a double</TD> * <TH scope="row">a char</TH>
* <TD headers="primval example"> {@code 3.1415926}</TD> * <TD>{@code 'a'}</TD>
* <TD headers="primval mirrored"> {@link DoubleValue}</TD> * <TD>{@link CharValue}</TD>
* <TD headers="primval type"> {@link DoubleType}</TD> * <TD>{@link CharType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> a float</TD> * <TH scope="row">a double</TH>
* <TD headers="primval example"> {@code 2.5f}</TD> * <TD>{@code 3.1415926}</TD>
* <TD headers="primval mirrored"> {@link FloatValue}</TD> * <TD>{@link DoubleValue}</TD>
* <TD headers="primval type"> {@link FloatType}</TD> * <TD>{@link DoubleType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> an int</TD> * <TH scope="row">a float</TH>
* <TD headers="primval example"> {@code 22}</TD> * <TD>{@code 2.5f}</TD>
* <TD headers="primval mirrored"> {@link IntegerValue}</TD> * <TD>{@link FloatValue}</TD>
* <TD headers="primval type"> {@link IntegerType}</TD> * <TD>{@link FloatType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> a long</TD> * <TH scope="row">an int</TH>
* <TD headers="primval example"> {@code 1024L}</TD> * <TD>{@code 22}</TD>
* <TD headers="primval mirrored"> {@link LongValue}</TD> * <TD>{@link IntegerValue}</TD>
* <TD headers="primval type"> {@link LongType}</TD> * <TD>{@link IntegerType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> a short</TD> * <TH scope="row">a long</TH>
* <TD headers="primval example"> {@code (short)12}</TD> * <TD>{@code 1024L}</TD>
* <TD headers="primval mirrored"> {@link ShortValue}</TD> * <TD>{@link LongValue}</TD>
* <TD headers="primval type"> {@link ShortType}</TD> * <TD>{@link LongType}</TD>
* <TR> * <TR>
* <TD headers="primval kind"> a void</TD> * <TH scope="row">a short</TH>
* <TD headers="primval example"> </TD> * <TD>{@code (short)12}</TD>
* <TD headers="primval mirrored"> {@link VoidValue}</TD> * <TD>{@link ShortValue}</TD>
* <TD headers="primval type"> {@link VoidType}</TD> * <TD>{@link ShortType}</TD>
* <TR style="background-color:#EEEEFF">
* <TH id="objref" colspan=4>Subinterfaces of {@link ObjectReference}</TH>
* <TR style="background-color:#EEEEFF">
* <TH id="kind2" style="text-align:left">Kind of value</TH>
* <TH id="example2" style="text-align:left">For example -<br>expression in target</TH>
* <TH id="mirrored2" style="text-align:left">Is mirrored as an<br>instance of</TH>
* <TH id="type2" style="text-align:left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
* <TR> * <TR>
* <TD headers="objref kind2"> a class instance</TD> * <TH scope="row">a void</TH>
* <TD headers="objref example2"> {@code this}</TD> * <TD></TD>
* <TD headers="objref mirrored2"> {@link ObjectReference}</TD> * <TD>{@link VoidValue}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD> * <TD>{@link VoidType}</TD>
* </TBODY>
* </TABLE>
*
* <TABLE class="plain">
* <CAPTION>Subinterfaces of {@link ObjectReference}</CAPTION>
* <THEAD style="background-color:#EEEEFF; text-align:left">
* <TR> * <TR>
* <TD headers="objref kind2"> an array</TD> * <TH scope="col" style="width:10em">Kind of value</TH>
* <TD headers="objref example2"> {@code new int[5]}</TD> * <TH scope="col" style="width:15em">For example -<br>expression in target</TH>
* <TD headers="objref mirrored2"> {@link ArrayReference}</TD> * <TH scope="col" style="width:15em">Is mirrored as an<br>instance of</TH>
* <TD headers="objref type2"> {@link ArrayType}</TD> * <TH scope="col" style="width:15em">{@link Type} of value<br>{@link #type() Value.type()}</TH>
* </THEAD>
* <TBODY style="text-align:left">
* <TR> * <TR>
* <TD headers="objref kind2"> a string</TD> * <TH scope="row">a class instance</TH>
* <TD headers="objref example2"> {@code "hello"}</TD> * <TD>{@code this}</TD>
* <TD headers="objref mirrored2"> {@link StringReference}</TD> * <TD>{@link ObjectReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD> * <TD>{@link ClassType}</TD>
* <TR> * <TR>
* <TD headers="objref kind2"> a thread</TD> * <TH scope="row">an array</TH>
* <TD headers="objref example2"> {@code Thread.currentThread()}</TD> * <TD>{@code new int[5]}</TD>
* <TD headers="objref mirrored2"> {@link ThreadReference}</TD> * <TD>{@link ArrayReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD> * <TD>{@link ArrayType}</TD>
* <TR> * <TR>
* <TD headers="objref kind2"> a thread group</TD> * <TH scope="row">a string</TH>
* <TD headers="objref example2"> {@code Thread.currentThread()}<br>&nbsp;&nbsp;{@code .getThreadGroup()}</TD> * <TD>{@code "hello"}</TD>
* <TD headers="objref mirrored2"> {@link ThreadGroupReference}</TD> * <TD>{@link StringReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD> * <TD>{@link ClassType}</TD>
* <TR> * <TR>
* <TD headers="objref kind2"> a {@code java.lang.Class}<br>instance</TD> * <TH scope="row">a thread</TH>
* <TD headers="objref example2"> {@code this.getClass()}</TD> * <TD>{@code Thread.currentThread()}</TD>
* <TD headers="objref mirrored2"> {@link ClassObjectReference}</TD> * <TD>{@link ThreadReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD> * <TD>{@link ClassType}</TD>
* <TR> * <TR>
* <TD headers="objref kind2"> a class loader</TD> * <TH scope="row">a thread group</TH>
* <TD headers="objref example2"> {@code this.getClass()}<br>&nbsp;&nbsp;{@code .getClassLoader()}</TD> * <TD>{@code Thread.currentThread()}<br>&nbsp;&nbsp;{@code .getThreadGroup()}</TD>
* <TD headers="objref mirrored2"> {@link ClassLoaderReference}</TD> * <TD>{@link ThreadGroupReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD> * <TD>{@link ClassType}</TD>
* <TR style="background-color:#EEEEFF">
* <TH id="other" colspan=4>Other</TH>
* <TR style="background-color:#EEEEFF">
* <TD id="kind3" style="text-align:left">Kind of value</TD>
* <TD id="example3" style="text-align:left">For example -<br>expression in target</TD>
* <TD id="mirrored3" style="text-align:left">Is mirrored as</TD>
* <TD id="type3" style="text-align:left">{@link Type} of value</TD>
* <TR> * <TR>
* <TD headers="other kind3"> null</TD> * <TH scope="row">a {@code java.lang.Class}<br>instance</TH>
* <TD headers="other example3"> {@code null}</TD> * <TD>{@code this.getClass()}</TD>
* <TD headers="other mirrored3"> {@code null}</TD> * <TD>{@link ClassObjectReference}</TD>
* <TD headers="other type3"> n/a</TD> * <TD>{@link ClassType}</TD>
* <TR>
* <TH scope="row">a class loader</TH>
* <TD>{@code this.getClass()}<br>&nbsp;&nbsp;{@code .getClassLoader()}</TD>
* <TD>{@link ClassLoaderReference}</TD>
* <TD>{@link ClassType}</TD>
* </TBODY>
* </TABLE>
*
* <TABLE class="plain">
* <CAPTION>Other values</CAPTION>
* <THEAD style="background-color:#EEEEFF; text-align:left">
* <TR>
* <TH scope="col" style="width:10em">Kind of value</TH>
* <TH scope="col" style="width:15em">For example -<br>expression in target</TH>
* <TH scope="col" style="width:15em">Is mirrored as</TH>
* <TH scope="col" style="width:15em">{@link Type} of value</TH>
* </THEAD>
* <TBODY style="text-align:left">
* <TR>
* <TH scope="row">null</TH>
* <TD>{@code null}</TD>
* <TD>{@code null}</TD>
* <TD>n/a</TD>
* </TBODY>
* </TABLE> * </TABLE>
* *
* @author Robert Field * @author Robert Field

View File

@ -59,13 +59,16 @@ import com.sun.jdi.event.VMStartEvent;
* Some {@link Connector} implementations may require slightly * Some {@link Connector} implementations may require slightly
* different handling than presented below. * different handling than presented below.
* *
* <TABLE BORDER="1" style="width:75%"> * <TABLE class="striped">
* <CAPTION style="display:none">Four scenarios for connecting a debugger to a virtual machine"</CAPTION> * <CAPTION style="display:none">Four scenarios for connecting a debugger to a virtual machine"</CAPTION>
* <THEAD>
* <TR> * <TR>
* <TH scope=col>Scenario</TH> * <TH scope="col">Scenario</TH>
* <TH scope=col>Description</TH> * <TH scope="col">Description</TH>
* </THEAD>
* <TBODY>
* <TR> * <TR>
* <TD>Debugger launches target VM (simplest, most-common scenario)</TD> * <TH scope="row">Debugger launches target VM (simplest, most-common scenario)</TH>
* *
* <TD>Debugger calls the {@link LaunchingConnector#launch(java.util.Map)} * <TD>Debugger calls the {@link LaunchingConnector#launch(java.util.Map)}
* method of the default connector, obtained with {@link #defaultConnector}. The * method of the default connector, obtained with {@link #defaultConnector}. The
@ -86,7 +89,7 @@ import com.sun.jdi.event.VMStartEvent;
* </TD> * </TD>
* </TR> * </TR>
* <TR> * <TR>
* <TD>Debugger attaches to previously-running VM</TD> * <TH scope="row">Debugger attaches to previously-running VM</TH>
* <TD> * <TD>
* <UL> * <UL>
* <LI> * <LI>
@ -113,7 +116,7 @@ import com.sun.jdi.event.VMStartEvent;
* </TR> * </TR>
* *
* <TR> * <TR>
* <TD>Target VM attaches to previously-running debugger</TD> * <TH scope="row">Target VM attaches to previously-running debugger</TH>
* <TD> * <TD>
* <UL> * <UL>
* <LI> * <LI>
@ -146,7 +149,7 @@ import com.sun.jdi.event.VMStartEvent;
* </TR> * </TR>
* *
* <TR> * <TR>
* <TD>Target VM launches debugger (sometimes called "Just-In-Time" debugging)</TD> * <TH scope="row">Target VM launches debugger (sometimes called "Just-In-Time" debugging)</TH>
* <TD> * <TD>
* <UL> * <UL>
* <LI> * <LI>

View File

@ -1,34 +1,42 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<HTML> <HTML lang="EN">
<HEAD> <HEAD>
<TITLE> <TITLE>
JDI Type Signatures JDI Type Signatures
</TITLE> </TITLE>
<META charset="UTF-8">
<STYLE type="text/css">
tbody th { font-weight: normal }
</STYLE>
</HEAD> </HEAD>
<BODY style="background-color:white"> <BODY style="background-color:white">
<dl><dd> <dl><dd>
<Table Border="0"> <Table Border="0">
<caption><font size=5><b>JDI Type Signatures</b></font></caption> <caption style="font-size:x-large"><b>JDI Type Signatures</b></caption>
<tr><th>Type Signature <thead>
<th>Java Type <tr><th scope="col">Type Signature
<tr><td>Z<td>boolean <th scope="col">Java Type
<tr><td>B<td>byte </thead>
<tr><td>C<td>char <tbody>
<tr><td>S<td>short <tr><th scope="row">Z<td>boolean
<tr><td>I<td>int <tr><th scope="row">B<td>byte
<tr><td>J<td>long <tr><th scope="row">C<td>char
<tr><td>F<td>float <tr><th scope="row">S<td>short
<tr><td>D<td>double <tr><th scope="row">I<td>int
<tr><td><strong>L</strong> <em>fully-qualified-class</em> <tr><th scope="row">J<td>long
<tr><th scope="row">F<td>float
<tr><th scope="row">D<td>double
<tr><th scope="row"><strong>L</strong> <em>fully-qualified-class</em>
<strong>;</strong> <strong>;</strong>
<td>fully-qualified-class <td>fully-qualified-class
<tr><td><strong>[</strong> <em>type <tr><th scope="row"><strong>[</strong> <em>type
</em> </em>
<td><em>type</em>[] <td><em>type</em>[]
<tr><td> <tr><th scope="row">
<strong>(</strong> <em>arg-types </em><strong>)</strong> <em>ret-type <strong>(</strong> <em>arg-types </em><strong>)</strong> <em>ret-type
</em> </em>
<td>method type (including constructors) <td>method type (including constructors)
</tbody>
</Table> </Table>
</dd></dl> </dd></dl>
<p>For example, the Java method: <p>For example, the Java method:

View File

@ -106,13 +106,24 @@ class ZipUtils {
* Converts DOS time to Java time (number of milliseconds since epoch). * Converts DOS time to Java time (number of milliseconds since epoch).
*/ */
public static long dosToJavaTime(long dtime) { public static long dosToJavaTime(long dtime) {
LocalDateTime ldt = LocalDateTime.of( int year;
(int) (((dtime >> 25) & 0x7f) + 1980), int month;
(int) ((dtime >> 21) & 0x0f), int day;
(int) ((dtime >> 16) & 0x1f), int hour = (int) ((dtime >> 11) & 0x1f);
(int) ((dtime >> 11) & 0x1f), int minute = (int) ((dtime >> 5) & 0x3f);
(int) ((dtime >> 5) & 0x3f), int second = (int) ((dtime << 1) & 0x3e);
(int) ((dtime << 1) & 0x3e)); if ((dtime >> 16) == 0) {
// Interpret the 0 DOS date as 1979-11-30 for compatibility with
// other implementations.
year = 1979;
month = 11;
day = 30;
} else {
year = (int) (((dtime >> 25) & 0x7f) + 1980);
month = (int) ((dtime >> 21) & 0x0f);
day = (int) ((dtime >> 16) & 0x1f);
}
LocalDateTime ldt = LocalDateTime.of(year, month, day, hour, minute, second);
return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond( return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond(
ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS); ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
} }

View File

@ -10,9 +10,11 @@
# randomness tests. # randomness tests.
# #
# A "headful" test requires a graphical environment to meaningfully # A "headful" test requires a graphical environment to meaningfully
# run. Tests that are not headful are "headless." # run. Tests that are not headful are "headless".
# A test flagged with key "printer" requires a printer to succeed, else
# throws a PrinterException or the like.
keys=2d dnd i18n intermittent randomness headful keys=2d dnd headful i18n intermittent printer randomness
# Tests that must run in othervm mode # Tests that must run in othervm mode
othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,8 +21,9 @@
* questions. * questions.
*/ */
/* /**
* @test * @test
* @key headful
* @bug 8007267 * @bug 8007267
* @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working * @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
* @requires (os.family == "mac") * @requires (os.family == "mac")

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -20,13 +20,16 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
/*
/**
* @test * @test
* @key headful
* @bug 8158325 * @bug 8158325
* @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced * @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
* @requires (os.family == "mac") * @requires (os.family == "mac")
* @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest * @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
*/ */
import java.awt.EventQueue; import java.awt.EventQueue;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,8 +21,9 @@
* questions. * questions.
*/ */
/* /**
* @test * @test
* @key headful
* @bug 8144594 * @bug 8144594
* @summary HiDPI: awt.Choice looks improperly (Win 8) * @summary HiDPI: awt.Choice looks improperly (Win 8)
* @run main ChoiceTest * @run main ChoiceTest

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,7 +21,9 @@
* questions. * questions.
*/ */
/* @test /**
* @test
* @key headful
* @bug 8157827 * @bug 8157827
* @summary AWT_Desktop/Automated/Exceptions/BasicTest loads incorrect GTK * @summary AWT_Desktop/Automated/Exceptions/BasicTest loads incorrect GTK
* version when jdk.gtk.version=3 * version when jdk.gtk.version=3

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,11 +30,13 @@ import java.util.concurrent.atomic.AtomicReference;
/** /**
* @test * @test
* @key headful
* @bug 8043705 * @bug 8043705
* @summary Can't exit color chooser dialog when running as an applet * @summary Can't exit color chooser dialog when running as an applet
* @modules java.desktop/sun.awt * @modules java.desktop/sun.awt
* @run main CloseDialogTest * @run main CloseDialogTest
*/ */
public class CloseDialogTest { public class CloseDialogTest {
private static volatile Frame frame; private static volatile Frame frame;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,17 +21,19 @@
* questions. * questions.
*/ */
/* /**
@test 8155740 * @test 8155740
@summary See <rdar://problem/3429130>: Events: actionPerformed() method not * @key headful
called when it is button is clicked (system load related) * @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
@summary com.apple.junit.java.awt.Frame * called when it is button is clicked (system load related)
@library ../../../regtesthelpers * @summary com.apple.junit.java.awt.Frame
@build VisibilityValidator * @library ../../../regtesthelpers
@build Util * @build VisibilityValidator
@build Waypoint * @build Util
@run main NestedModalDialogTest * @build Waypoint
* @run main NestedModalDialogTest
*/ */
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// NestedModalDialogTest.java // NestedModalDialogTest.java
// The test launches a parent frame. From this parent frame it launches a modal // The test launches a parent frame. From this parent frame it launches a modal

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,17 +21,19 @@
* questions. * questions.
*/ */
/* /**
@test 8155740 * @test 8155740
@summary See <rdar://problem/3429130>: Events: actionPerformed() method not * @key headful
called when it is button is clicked (system load related) * @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
@summary com.apple.junit.java.awt.Frame * called when it is button is clicked (system load related)
@library ../../../regtesthelpers * @summary com.apple.junit.java.awt.Frame
@build VisibilityValidator * @library ../../../regtesthelpers
@build Util * @build VisibilityValidator
@build Waypoint * @build Util
@run main NestedModelessDialogTest * @build Waypoint
* @run main NestedModelessDialogTest -Xlog:exception
*/ */
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// NestedModelessDialogTest.java // NestedModelessDialogTest.java
// The test launches a parent frame. From this parent frame it launches a modal // The test launches a parent frame. From this parent frame it launches a modal

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,24 +21,20 @@
* questions. * questions.
*/ */
/*
@test
@bug 4980592 8171363
@summary switching user in XP causes an NPE in
sun.awt.windows.WWindowPeer.displayChanged
@requires (os.family == "windows")
@modules java.desktop/java.awt.peer
@modules java.desktop/sun.awt.windows:open
@modules java.desktop/sun.awt
@author son@sparc.spb.su: area=embedded
@run main DisplayChangedTest
*/
/** /**
* DisplayChangedTest.java * @test
* * @key headful
* summary: switching user in XP causes an NPE in * @bug 4980592 8171363
* sun.awt.windows.WWindowPeer.displayChanged * @summary switching user in XP causes an NPE in
* sun.awt.windows.WWindowPeer.displayChanged
* @requires (os.family == "windows")
* @modules java.desktop/java.awt.peer
* @modules java.desktop/sun.awt.windows:open
* @modules java.desktop/sun.awt
* @author son@sparc.spb.su: area=embedded
* @run main DisplayChangedTest
*/ */
import java.awt.Frame; import java.awt.Frame;
import java.awt.Dialog; import java.awt.Dialog;
import java.awt.TextArea; import java.awt.TextArea;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,22 +21,19 @@
* questions. * questions.
*/ */
/*
@test
@bug 6345003 8171363
@summary grab problems with EmbeddedFrame
@requires (os.family == "windows")
@modules java.desktop/java.awt.peer
@modules java.desktop/sun.awt
@modules java.desktop/sun.awt.windows:open
@author Oleg.Semenov@sun.com area=EmbeddedFrame
@run main EmbeddedFrameGrabTest
*/
/** /**
* EmbeddedFrameGrabTest.java * @test
* * @key headful
* summary: grab problems with EmbeddedFrame * @bug 6345003 8171363
* @summary grab problems with EmbeddedFrame
* @requires (os.family == "windows")
* @modules java.desktop/java.awt.peer
* @modules java.desktop/sun.awt
* @modules java.desktop/sun.awt.windows:open
* @author Oleg.Semenov@sun.com area=EmbeddedFrame
* @run main EmbeddedFrameGrabTest
*/ */
import java.awt.Frame; import java.awt.Frame;
import java.awt.peer.FramePeer; import java.awt.peer.FramePeer;
import javax.swing.JComboBox; import javax.swing.JComboBox;

View File

@ -1,5 +1,5 @@
<!-- <!--
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -23,6 +23,7 @@
<HTML> <HTML>
<!-- @test <!-- @test
@key headful
@bug 4023283 @bug 4023283
@summary Checks that an Error which propogate up to the EventDispatch @summary Checks that an Error which propogate up to the EventDispatch
loop does not crash AWT. loop does not crash AWT.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,11 +21,13 @@
* questions. * questions.
*/ */
/* @test /**
@bug 6980209 * @test
@summary Make tracking SecondaryLoop.enter/exit methods easier * @key headful
@author Semyon Sadetsky * @bug 6980209
*/ * @summary Make tracking SecondaryLoop.enter/exit methods easier
* @author Semyon Sadetsky
*/
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,7 +21,9 @@
* questions. * questions.
*/ */
/* @test /**
* @test
* @key headful
* @bug 8157163 8159132 * @bug 8157163 8159132
* @summary AWT FileDialog does not inherit icon image from parent Frame * @summary AWT FileDialog does not inherit icon image from parent Frame
* @requires os.family=="windows" * @requires os.family=="windows"
@ -68,8 +70,8 @@ public class FileDialogIconTest {
"owning window. Wrong color: " + color); "owning window. Wrong color: " + color);
} }
} finally { } finally {
dialog.dispose(); if (dialog != null) { dialog.dispose(); }
frame.dispose(); if (frame != null) { frame.dispose(); }
} }
} }

View File

@ -21,20 +21,21 @@
* questions. * questions.
*/ */
/* /**
@test * @test
@bug 6516675 * @key headful
@summary Tests that EmbeddedFrame can be focused. * @bug 6516675
@author anton.tarasov: area=awt-focus * @summary Tests that EmbeddedFrame can be focused.
@requires (os.family == "windows") * @author anton.tarasov: area=awt-focus
@modules java.desktop/java.awt.peer * @requires (os.family == "windows")
java.desktop/sun.awt * @modules java.desktop/java.awt.peer
java.desktop/sun.awt.windows * java.desktop/sun.awt
@library /java/awt/patchlib ../../regtesthelpers * java.desktop/sun.awt.windows
@build java.desktop/java.awt.Helper * @library /java/awt/patchlib ../../regtesthelpers
@build Util UtilInternal * @build java.desktop/java.awt.Helper
@run main FocusEmbeddedFrameTest * @build Util UtilInternal
*/ * @run main FocusEmbeddedFrameTest
*/
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,13 +21,15 @@
* questions. * questions.
*/ */
/* /**
@test * @test
@bug 8154043 8172509 * @key headful
@summary Fields not reachable anymore by tab-key, because of new tabbing * @bug 8154043 8172509
behaviour of radio button groups. * @summary Fields not reachable anymore by tab-key, because of new tabbing
@run main ButtonGroupLayoutTraversalTest * behaviour of radio button groups.
* @run main ButtonGroupLayoutTraversalTest
*/ */
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.GridLayout; import java.awt.GridLayout;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,13 +21,14 @@
* questions. * questions.
*/ */
/* /**
@test * @test
@bug 8154434 * @key headful
@summary Open the request focus methods of the java.awt.Component which accept * @bug 8154434
FocusEvent.Cause * @summary Open the request focus methods of the java.awt.Component which accept
@run main RequestFocusByCauseTest * FocusEvent.Cause
*/ * @run main RequestFocusByCauseTest
*/
import java.awt.*; import java.awt.*;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
@ -148,4 +149,5 @@ public class RequestFocusByCauseTest {
frame.dispose(); frame.dispose();
} }
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,8 +21,9 @@
* questions. * questions.
*/ */
/* /**
* @test * @test
* @key headful
* @bug 8064833 * @bug 8064833
* @summary Test correct font is obtained via famil+style * @summary Test correct font is obtained via famil+style
* @run main HelvLtOblTest * @run main HelvLtOblTest

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,8 +21,9 @@
* questions. * questions.
*/ */
/* /**
* @test * @test
* @key headful
* @bug 8015556 * @bug 8015556
* @summary Surrogate pairs do not render properly on MacOS X. * @summary Surrogate pairs do not render properly on MacOS X.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,12 +21,14 @@
* questions. * questions.
*/ */
/* /**
* @test * @test
* @key headful
* @bug 8158918 * @bug 8158918
* @summary setExtendedState(1) for maximized Frame results in state==7 * @summary setExtendedState(1) for maximized Frame results in state==7
* @run main SetExtendedState * @run main SetExtendedState
*/ */
import java.awt.Frame; import java.awt.Frame;
public class SetExtendedState { public class SetExtendedState {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,8 +21,9 @@
* questions. * questions.
*/ */
/* /**
* @test * @test
* @key headful
* @bug 8165619 * @bug 8165619
* @summary Frame is not repainted if created in state=MAXIMIZED_BOTH on Unity * @summary Frame is not repainted if created in state=MAXIMIZED_BOTH on Unity
* @run main DecoratedFrameInsetsTest * @run main DecoratedFrameInsetsTest

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,12 +21,14 @@
* questions. * questions.
*/ */
/* @test /**
@bug 8032078 * @test
@summary Frame.setExtendedState throws RuntimeException, if * @key headful
windowState=ICONIFIED|MAXIMIZED_BOTH, on OS X * @bug 8032078
@author Anton Litvinov * @summary Frame.setExtendedState throws RuntimeException, if
*/ * windowState=ICONIFIED|MAXIMIZED_BOTH, on OS X
* @author Anton Litvinov
*/
import java.awt.*; import java.awt.*;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -21,7 +21,9 @@
* questions. * questions.
*/ */
/* @test /**
* @test
* @key headful
* @bug 8026143 * @bug 8026143
* @summary [macosx] Maximized state could be inconsistent between peer and frame * @summary [macosx] Maximized state could be inconsistent between peer and frame
* @author Petr Pchelko * @author Petr Pchelko
@ -70,7 +72,7 @@ public class MaximizedByPlatform {
throw new RuntimeException("Maximized state was not set for frame in setBounds"); throw new RuntimeException("Maximized state was not set for frame in setBounds");
} }
} finally { } finally {
frame.dispose(); if (frame != null) frame.dispose();
} }
@ -87,7 +89,7 @@ public class MaximizedByPlatform {
throw new RuntimeException("Maximized state was not set for frame in setVisible"); throw new RuntimeException("Maximized state was not set for frame in setVisible");
} }
} finally { } finally {
frame.dispose(); if (frame != null) frame.dispose();
} }
} }

Some files were not shown because too many files have changed in this diff Show More