Merge
This commit is contained in:
commit
3db27014cd
.hgtags-top-repo
corba
hotspot
jdk
.hgtags
src
java.base/share
classes
java
io
lang
math
net
nio
security
text
time
chrono
format
temporal
util
javax/net/ssl
jdk/internal/misc
sun/security/tools/keytool
conf/security
java.logging/share/classes/java/util/logging
java.rmi/share/classes/sun/rmi/registry
jdk.incubator.httpclient/share/classes/jdk/incubator/http
AbstractAsyncSSLConnection.javaAsyncSSLConnection.javaAsyncSSLTunnelConnection.javaExchangeImpl.javaHttp2Connection.javaHttpConnection.javaPlainTunnelingConnection.javaSSLConnection.javaSSLTunnelConnection.java
jdk.jartool/share/classes/sun/security/tools/jarsigner
jdk.jdi/share/classes/com/sun/jdi
jdk.zipfs/share/classes/jdk/nio/zipfs
test
TEST.ROOT
com/apple
java/awt
Choice/ChoiceHiDpi
Desktop/DesktopGtkLoadTest
Dialog
CloseDialog
NestedDialogs
EmbeddedFrame
EventDispatchThread/LoopRobustness
EventQueue/6980209
FileDialog/FileDialogIconTest
Focus
FocusEmbeddedFrameTest
FocusTraversalPolicy/ButtonGroupLayoutTraversal
RequestFocusByCause
FontClass
Frame
8158918
DecoratedFrameInsets
ExceptionOnSetExtendedStateTest
MaximizedByPlatform
@ -441,3 +441,6 @@ ec4159ebe7050fcc5dcee8a2d150cf948ecc97db jdk-9+178
|
||||
252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179
|
||||
a133a7d1007b1456bc62824382fd8ac93b45d329 jdk-10+17
|
||||
536b81db8075486ca0fe3225d8e59313df5b936c jdk-10+18
|
||||
b803e6cff41e72a1e6d8782e1ef7c25a6e3e5ee3 jdk-10+19
|
||||
d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
|
||||
b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181
|
||||
|
@ -441,3 +441,6 @@ b82b62ed5debda2d98dda597506ef29cf947fbae jdk-10+16
|
||||
24390da83c5ee9e23ceafbcaff4460a01e37bb3a jdk-9+179
|
||||
50ff1fd66362f212a8db6de76089d9d0ffa4df0f jdk-10+17
|
||||
a923b3f30e7bddb4f960059ddfc7978fc63e2e6e jdk-10+18
|
||||
28488561cfbcfa4d0d9c489e8afe0155f4231360 jdk-10+19
|
||||
6ce6cb8ff41c71c49f23b15e0f0468aca5d52b17 jdk-9+180
|
||||
ba71941ad9dba53b8fffb30602ef673eee88696c jdk-9+181
|
||||
|
@ -601,3 +601,6 @@ c1f3649a3a42f124b418a5a916dbad13d059b757 jdk-10+15
|
||||
d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179
|
||||
73e2cb8700bfa51304bd4b02f224620859a3f600 jdk-10+17
|
||||
c9d3317623d48da3327232c81e3f8cfc0d29d888 jdk-10+18
|
||||
33b74e13c1457f36041addb8b850831f81ca6e9f jdk-10+19
|
||||
d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180
|
||||
4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181
|
||||
|
@ -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.
|
||||
*
|
||||
* 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();
|
||||
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
|
||||
// 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
|
||||
|
@ -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.
|
||||
*
|
||||
* 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)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -441,3 +441,6 @@ e069834e2c518a7bc2ffadc8c7e3cd7ec69fa8a0 jdk-10+15
|
||||
06df1ce4b9b887d05ce6a13f4def3547e434dd1a jdk-9+179
|
||||
d93f2fd542b7d7855c2cd49ae15ebcc3d441a83b jdk-10+17
|
||||
c4b709bad6c5d29294124de5e74e1e2ac84fcf1f jdk-10+18
|
||||
b561eeca30decc6258b4aca8bb23beffbb6e2f7d jdk-10+19
|
||||
4feab1acec6a9c3620a19ff379a65ab8618d0e2a jdk-9+180
|
||||
bd66ea2fdde3d60a73b5272263a7b8b0ca926a33 jdk-9+181
|
||||
|
@ -54,83 +54,90 @@ package java.io;
|
||||
* Unicode strings in a format that is a slight modification of UTF-8.
|
||||
* (For information regarding the standard UTF-8 format, see section
|
||||
* <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
|
||||
* 4.0</i>).
|
||||
* Note that in the following table, the most significant bit appears in the
|
||||
* far left-hand column.
|
||||
* 4.0</i>)
|
||||
*
|
||||
* <blockquote>
|
||||
* <table class="plain">
|
||||
* <caption style="display:none">Bit values and bytes</caption>
|
||||
* <ul>
|
||||
* <li>Characters in the range {@code '\u005Cu0001'} to
|
||||
* {@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>
|
||||
* <tr>
|
||||
* <th colspan="9"><span style="font-weight:normal">
|
||||
* All characters in the range {@code '\u005Cu0001'} to
|
||||
* {@code '\u005Cu007F'} are represented by a single byte:</span></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>
|
||||
* <th scope="row" style="text-align:left; font-weight:normal">
|
||||
* {@code \u005Cu0001} to {@code \u005Cu007F} </th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
|
||||
* <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>
|
||||
* <th colspan="9"><span style="font-weight:normal">
|
||||
* The null character {@code '\u005Cu0000'} and characters
|
||||
* in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
|
||||
* represented by a pair of bytes:</span></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>
|
||||
* <th scope="row" rowspan="2" style="text-align:left; font-weight:normal">
|
||||
* {@code \u005Cu0000},<br>
|
||||
* {@code \u005Cu0080} to {@code \u005Cu07FF} </th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
|
||||
* <td style="text-align:center">1
|
||||
* <td style="text-align:center">1
|
||||
* <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>
|
||||
* <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">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>
|
||||
* <th colspan="9"><span style="font-weight:normal">
|
||||
* {@code char} values in the range {@code '\u005Cu0800'}
|
||||
* to {@code '\u005CuFFFF'} are represented by three bytes:</span></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>
|
||||
* <th scope="row" rowspan="3" style="text-align:left; font-weight:normal">
|
||||
* {@code \u005Cu0800} to {@code \u005CuFFFF} </th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:center"> 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">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>
|
||||
* <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">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>
|
||||
* <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">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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p>
|
||||
* The differences between this format and the
|
||||
* standard UTF-8 format are the following:
|
||||
|
@ -34,6 +34,7 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
|
||||
/**
|
||||
* Filter classes, array lengths, and graph metrics during deserialization.
|
||||
@ -265,6 +266,9 @@ public interface ObjectInputFilter {
|
||||
return 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) {
|
||||
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.
|
||||
*/
|
||||
private long maxArrayLength;
|
||||
/**
|
||||
* True to check the component type for arrays.
|
||||
*/
|
||||
private final boolean checkComponentType;
|
||||
|
||||
/**
|
||||
* Returns an ObjectInputFilter from a string of patterns.
|
||||
*
|
||||
* @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;
|
||||
* {@code null} if no patterns
|
||||
* @throws IllegalArgumentException if the parameter is malformed
|
||||
* if the pattern is missing the name, the long value
|
||||
* is not a number or is negative.
|
||||
*/
|
||||
static ObjectInputFilter createFilter(String pattern) {
|
||||
static ObjectInputFilter createFilter(String pattern, boolean checkComponentType) {
|
||||
try {
|
||||
return new Global(pattern);
|
||||
return new Global(pattern, checkComponentType);
|
||||
} catch (UnsupportedOperationException uoe) {
|
||||
// no non-empty patterns
|
||||
return null;
|
||||
@ -428,12 +451,15 @@ public interface ObjectInputFilter {
|
||||
* Construct a new filter from the pattern String.
|
||||
*
|
||||
* @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 UnsupportedOperationException if there are no non-empty patterns
|
||||
*/
|
||||
private Global(String pattern) {
|
||||
private Global(String pattern, boolean checkComponentType) {
|
||||
boolean hasLimits = false;
|
||||
this.pattern = pattern;
|
||||
this.checkComponentType = checkComponentType;
|
||||
|
||||
maxArrayLength = Long.MAX_VALUE; // Default values are unlimited
|
||||
maxDepth = Long.MAX_VALUE;
|
||||
@ -595,6 +621,10 @@ public interface ObjectInputFilter {
|
||||
// array length is too big
|
||||
return Status.REJECTED;
|
||||
}
|
||||
if (!checkComponentType) {
|
||||
// As revised; do not check the component type for arrays
|
||||
return Status.UNDECIDED;
|
||||
}
|
||||
do {
|
||||
// Arrays are decided based on the component type
|
||||
clazz = clazz.getComponentType();
|
||||
|
@ -9566,18 +9566,23 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
* Determines if the specified character is ISO-LATIN-1 white space.
|
||||
* This method returns {@code true} for the following five
|
||||
* characters only:
|
||||
* <table class="borderless">
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">truechars</caption>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Character
|
||||
* <th scope="col">Code
|
||||
* <th scope="col">Name
|
||||
* </thead>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -728,22 +728,22 @@ public final class Class<T> implements java.io.Serializable,
|
||||
* one or more '{@code [}' characters representing the depth of the array
|
||||
* 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>
|
||||
* <thead>
|
||||
* <tr><th style="padding-right:3em;"> Element Type <th> Encoding
|
||||
* <tr><th scope="col"> Element Type <th scope="col"> Encoding
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td> boolean <td style="text-align:center"> Z
|
||||
* <tr><td> byte <td style="text-align:center"> B
|
||||
* <tr><td> char <td style="text-align:center"> C
|
||||
* <tr><td> class or interface
|
||||
* <td style="text-align:center"> L<i>classname</i>;
|
||||
* <tr><td> double <td style="text-align:center"> D
|
||||
* <tr><td> float <td style="text-align:center"> F
|
||||
* <tr><td> int <td style="text-align:center"> I
|
||||
* <tr><td> long <td style="text-align:center"> J
|
||||
* <tr><td> short <td style="text-align:center"> S
|
||||
* <tbody style="text-align:left">
|
||||
* <tr><th scope="row"> boolean <td style="text-align:center"> Z
|
||||
* <tr><th scope="row"> byte <td style="text-align:center"> B
|
||||
* <tr><th scope="row"> char <td style="text-align:center"> C
|
||||
* <tr><th scope="row"> class or interface
|
||||
* <td style="text-align:center"> L<i>classname</i>;
|
||||
* <tr><th scope="row"> double <td style="text-align:center"> D
|
||||
* <tr><th scope="row"> float <td style="text-align:center"> F
|
||||
* <tr><th scope="row"> int <td style="text-align:center"> I
|
||||
* <tr><th scope="row"> long <td style="text-align:center"> J
|
||||
* <tr><th scope="row"> short <td style="text-align:center"> S
|
||||
* </tbody>
|
||||
* </table></blockquote>
|
||||
*
|
||||
|
@ -255,25 +255,25 @@ public final class Double extends Number implements Comparable<Double> {
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
* <table class="plain">
|
||||
* <table class="striped">
|
||||
* <caption>Examples</caption>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td>
|
||||
* <tr><td>{@code -1.0}</td> <td>{@code -0x1.0p0}</td>
|
||||
* <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td>
|
||||
* <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td>
|
||||
* <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td>
|
||||
* <tr><td>{@code 0.25}</td> <td>{@code 0x1.0p-2}</td>
|
||||
* <tr><td>{@code Double.MAX_VALUE}</td>
|
||||
* <tbody style="text-align:right">
|
||||
* <tr><th scope="row">{@code 1.0}</th> <td>{@code 0x1.0p0}</td>
|
||||
* <tr><th scope="row">{@code -1.0}</th> <td>{@code -0x1.0p0}</td>
|
||||
* <tr><th scope="row">{@code 2.0}</th> <td>{@code 0x1.0p1}</td>
|
||||
* <tr><th scope="row">{@code 3.0}</th> <td>{@code 0x1.8p1}</td>
|
||||
* <tr><th scope="row">{@code 0.5}</th> <td>{@code 0x1.0p-1}</td>
|
||||
* <tr><th scope="row">{@code 0.25}</th> <td>{@code 0x1.0p-2}</td>
|
||||
* <tr><th scope="row">{@code Double.MAX_VALUE}</th>
|
||||
* <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>
|
||||
* <tr><td>{@code Maximum Subnormal Value}</td>
|
||||
* <tr><th scope="row">{@code Maximum Subnormal Value}</th>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -256,25 +256,25 @@ public final class Float extends Number implements Comparable<Float> {
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
* <table class="plain">
|
||||
* <table class="striped">
|
||||
* <caption>Examples</caption>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td>
|
||||
* <tr><td>{@code -1.0}</td> <td>{@code -0x1.0p0}</td>
|
||||
* <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td>
|
||||
* <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td>
|
||||
* <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td>
|
||||
* <tr><td>{@code 0.25}</td> <td>{@code 0x1.0p-2}</td>
|
||||
* <tr><td>{@code Float.MAX_VALUE}</td>
|
||||
* <tr><th scope="row">{@code 1.0}</th> <td>{@code 0x1.0p0}</td>
|
||||
* <tr><th scope="row">{@code -1.0}</th> <td>{@code -0x1.0p0}</td>
|
||||
* <tr><th scope="row">{@code 2.0}</th> <td>{@code 0x1.0p1}</td>
|
||||
* <tr><th scope="row">{@code 3.0}</th> <td>{@code 0x1.8p1}</td>
|
||||
* <tr><th scope="row">{@code 0.5}</th> <td>{@code 0x1.0p-1}</td>
|
||||
* <tr><th scope="row">{@code 0.25}</th> <td>{@code 0x1.0p-2}</td>
|
||||
* <tr><th scope="row">{@code Float.MAX_VALUE}</th>
|
||||
* <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>
|
||||
* <tr><td>{@code Maximum Subnormal Value}</td>
|
||||
* <tr><th scope="row">{@code Maximum Subnormal Value}</th>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -2208,29 +2208,29 @@ public final class String
|
||||
* <caption style="display:none">Split example showing regex, limit, and result</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Regex</th>
|
||||
* <th>Limit</th>
|
||||
* <th>Result</th>
|
||||
* <th scope="col">Regex</th>
|
||||
* <th scope="col">Limit</th>
|
||||
* <th scope="col">Result</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td style="text-align:center">:</td>
|
||||
* <td style="text-align:center">2</td>
|
||||
* <tr><th scope="row" rowspan="3" style="font-weight:normal">:</th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">2</th>
|
||||
* <td>{@code { "boo", "and:foo" }}</td></tr>
|
||||
* <tr><td style="text-align:center">:</td>
|
||||
* <td style="text-align:center">5</td>
|
||||
* <tr><!-- : -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
|
||||
* <td>{@code { "boo", "and", "foo" }}</td></tr>
|
||||
* <tr><td style="text-align:center">:</td>
|
||||
* <td style="text-align:center">-2</td>
|
||||
* <tr><!-- : -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
|
||||
* <td>{@code { "boo", "and", "foo" }}</td></tr>
|
||||
* <tr><td style="text-align:center">o</td>
|
||||
* <td style="text-align:center">5</td>
|
||||
* <tr><th scope="row" rowspan="3" style="font-weight:normal">o</th>
|
||||
* <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
|
||||
* <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
|
||||
* <tr><td style="text-align:center">o</td>
|
||||
* <td style="text-align:center">-2</td>
|
||||
* <tr><!-- o -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
|
||||
* <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
|
||||
* <tr><td style="text-align:center">o</td>
|
||||
* <td style="text-align:center">0</td>
|
||||
* <tr><!-- o -->
|
||||
* <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">0</th>
|
||||
* <td>{@code { "b", "", ":and:f" }}</td></tr>
|
||||
* </tbody>
|
||||
* </table></blockquote>
|
||||
@ -2336,14 +2336,14 @@ public final class String
|
||||
* <caption style="display:none">Split examples showing regex and result</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Regex</th>
|
||||
* <th>Result</th>
|
||||
* <th scope="col">Regex</th>
|
||||
* <th scope="col">Result</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td style="text-align:center">:</td>
|
||||
* <tr><th scope="row" style="text-weight:normal">:</th>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </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>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Language Code of Locale</th>
|
||||
* <th>Upper Case</th>
|
||||
* <th>Lower Case</th>
|
||||
* <th>Description</th>
|
||||
* <th scope="col">Language Code of Locale</th>
|
||||
* <th scope="col">Upper Case</th>
|
||||
* <th scope="col">Lower Case</th>
|
||||
* <th scope="col">Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>tr (Turkish)</td>
|
||||
* <td>\u0130</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">\u0130</th>
|
||||
* <td>\u0069</td>
|
||||
* <td>capital letter I with dot above -> small letter i</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>tr (Turkish)</td>
|
||||
* <td>\u0049</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">\u0049</th>
|
||||
* <td>\u0131</td>
|
||||
* <td>capital letter I -> small letter dotless i </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <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>lowercased all chars in String</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <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/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">
|
||||
* <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>
|
||||
@ -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>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Language Code of Locale</th>
|
||||
* <th>Lower Case</th>
|
||||
* <th>Upper Case</th>
|
||||
* <th>Description</th>
|
||||
* <th scope="col">Language Code of Locale</th>
|
||||
* <th scope="col">Lower Case</th>
|
||||
* <th scope="col">Upper Case</th>
|
||||
* <th scope="col">Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>tr (Turkish)</td>
|
||||
* <td>\u0069</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">\u0069</th>
|
||||
* <td>\u0130</td>
|
||||
* <td>small letter i -> capital letter I with dot above</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>tr (Turkish)</td>
|
||||
* <td>\u0131</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">\u0131</th>
|
||||
* <td>\u0049</td>
|
||||
* <td>small letter dotless i -> capital letter I</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>(all)</td>
|
||||
* <td>\u00df</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">\u00df</th>
|
||||
* <td>\u0053 \u0053</td>
|
||||
* <td>small letter sharp s -> two letters: SS</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>(all)</td>
|
||||
* <td>Fahrvergnügen</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">Fahrvergnügen</th>
|
||||
* <td>FAHRVERGNÜGEN</td>
|
||||
* <td></td>
|
||||
* </tr>
|
||||
|
@ -583,7 +583,7 @@ public final class System {
|
||||
* system properties, a set of system properties is first created and
|
||||
* initialized. This set of system properties always includes values
|
||||
* 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>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Key</th>
|
||||
@ -1049,26 +1049,28 @@ public final class System {
|
||||
* of corresponding severity.
|
||||
* <br>The mapping is as follows:
|
||||
* <br><br>
|
||||
* <table border="1">
|
||||
* <table class="striped">
|
||||
* <caption>System.Logger Severity Level Mapping</caption>
|
||||
* <tr><td><b>System.Logger Levels</b></td>
|
||||
* <td>{@link Logger.Level#ALL ALL}</td>
|
||||
* <td>{@link Logger.Level#TRACE TRACE}</td>
|
||||
* <td>{@link Logger.Level#DEBUG DEBUG}</td>
|
||||
* <td>{@link Logger.Level#INFO INFO}</td>
|
||||
* <td>{@link Logger.Level#WARNING WARNING}</td>
|
||||
* <td>{@link Logger.Level#ERROR ERROR}</td>
|
||||
* <td>{@link Logger.Level#OFF OFF}</td>
|
||||
* </tr>
|
||||
* <tr><td><b>java.util.logging Levels</b></td>
|
||||
* <td>{@link java.util.logging.Level#ALL ALL}</td>
|
||||
* <td>{@link java.util.logging.Level#FINER FINER}</td>
|
||||
* <td>{@link java.util.logging.Level#FINE FINE}</td>
|
||||
* <td>{@link java.util.logging.Level#INFO INFO}</td>
|
||||
* <td>{@link java.util.logging.Level#WARNING WARNING}</td>
|
||||
* <td>{@link java.util.logging.Level#SEVERE SEVERE}</td>
|
||||
* <td>{@link java.util.logging.Level#OFF OFF}</td>
|
||||
* </tr>
|
||||
* <thead>
|
||||
* <tr><th scope="col">System.Logger Levels</th>
|
||||
* <th scope="col">java.util.logging Levels</th>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">{@link Logger.Level#ALL ALL}</th>
|
||||
* <td>{@link java.util.logging.Level#ALL ALL}</td>
|
||||
* <tr><th scope="row">{@link Logger.Level#TRACE TRACE}</th>
|
||||
* <td>{@link java.util.logging.Level#FINER FINER}</td>
|
||||
* <tr><th scope="row">{@link Logger.Level#DEBUG DEBUG}</th>
|
||||
* <td>{@link java.util.logging.Level#FINE FINE}</td>
|
||||
* <tr><th scope="row">{@link Logger.Level#INFO INFO}</th>
|
||||
* <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>
|
||||
* <tr><th scope="row">{@link Logger.Level#ERROR ERROR}</th>
|
||||
* <td>{@link java.util.logging.Level#SEVERE SEVERE}</td>
|
||||
* <tr><th scope="row">{@link Logger.Level#OFF OFF}</th>
|
||||
* <td>{@link java.util.logging.Level#OFF OFF}</td>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* @since 9
|
||||
|
@ -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.
|
||||
*
|
||||
* 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 runtime may take action to improve the performance of invoking
|
||||
* spin-wait loop constructions.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote
|
||||
* 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}
|
||||
@ -373,7 +373,7 @@ class Thread implements Runnable {
|
||||
* method was not called at all. However on some architectures the Java
|
||||
* Virtual Machine may issue the processor instructions to address such
|
||||
* code patterns in a more beneficial way.
|
||||
* <p>
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
|
@ -149,24 +149,24 @@ import java.util.Arrays;
|
||||
* capture argument (corresponding to the receiver) must be non-null.
|
||||
*
|
||||
* <p>A type Q is considered adaptable to S as follows:
|
||||
* <table class="borderless">
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">adaptable types</caption>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <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>None</td>
|
||||
* </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>Cast from Wrapper(Q) to S</td>
|
||||
* </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)
|
||||
* can be widened to S
|
||||
* <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>
|
||||
* </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
|
||||
* <br>for return types: none</td>
|
||||
* <td>Cast from Q to S</td>
|
||||
|
@ -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.
|
||||
*
|
||||
* 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>
|
||||
* 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.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example:
|
||||
* <blockquote><pre>{@code
|
||||
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
|
||||
* collectArgPos} argument indicates at which position in the parameter list arguments should be collected. This
|
||||
* index is zero-based.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Examples:
|
||||
* <blockquote><pre>{@code
|
||||
StringWriter swr = new StringWriter();
|
||||
|
@ -3353,7 +3353,7 @@ assert((int)twice.invokeExact(21) == 42);
|
||||
* That is, it returns a zero primitive value, a {@code null}, or {@code void}.
|
||||
* <p>The returned method handle is equivalent to
|
||||
* {@code dropArguments(zero(type.returnType()), 0, type.parameterList())}.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Given a predicate and target, a useful "if-then" construct can be produced as
|
||||
* {@code guardWithTest(pred, target, empty(target.type())}.
|
||||
* @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
|
||||
* list {@code S..., P..., M..., A...}, with the {@code P} and {@code A} types inserted as if by
|
||||
* {@link #dropArguments(MethodHandle, int, Class[])}.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote
|
||||
* 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:
|
||||
@ -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
|
||||
* zero-based index. The aforementioned method {@link #foldArguments(MethodHandle, MethodHandle)} assumes position
|
||||
* 0.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example:
|
||||
* <blockquote><pre>{@code
|
||||
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
|
||||
* 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}.
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example:
|
||||
* <blockquote><pre>{@code
|
||||
* // iterative implementation of the factorial function as a loop handle
|
||||
@ -4991,7 +4991,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
||||
* return v;
|
||||
* }
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example:
|
||||
* <blockquote><pre>{@code
|
||||
* // 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()));
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @apiNote The implementation of this method can be expressed as follows:
|
||||
* <blockquote><pre>{@code
|
||||
* MethodHandle whileLoop(MethodHandle init, MethodHandle pred, MethodHandle body) {
|
||||
@ -5104,7 +5104,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
||||
* return v;
|
||||
* }
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example:
|
||||
* <blockquote><pre>{@code
|
||||
* // 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));
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* @apiNote The implementation of this method can be expressed as follows:
|
||||
* <blockquote><pre>{@code
|
||||
* MethodHandle doWhileLoop(MethodHandle init, MethodHandle body, MethodHandle pred) {
|
||||
@ -5248,7 +5248,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
||||
* return v;
|
||||
* }
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example with a fully conformant body method:
|
||||
* <blockquote><pre>{@code
|
||||
* // 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);
|
||||
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("Lambdaman!"));
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example with the simplest possible body method type,
|
||||
* and passing the number of iterations to the loop invocation:
|
||||
* <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
|
||||
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "Lambdaman!"));
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example that treats the number of iterations, string to append to, and string to append
|
||||
* as loop parameters:
|
||||
* <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
|
||||
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "na", "Lambdaman!"));
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example that illustrates the usage of {@link #dropArgumentsToMatch(MethodHandle, int, List, int)}
|
||||
* to enforce a loop type:
|
||||
* <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
|
||||
* assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("na", 13, "Lambdaman!"));
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote The implementation of this method can be expressed as follows:
|
||||
* <blockquote><pre>{@code
|
||||
* MethodHandle countedLoop(MethodHandle iterations, MethodHandle init, MethodHandle body) {
|
||||
@ -5406,7 +5406,6 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
||||
* }
|
||||
* }</pre></blockquote>
|
||||
*
|
||||
* <p>
|
||||
* @apiNote The implementation of this method can be expressed as follows:
|
||||
* <blockquote><pre>{@code
|
||||
* MethodHandle countedLoop(MethodHandle start, MethodHandle end, MethodHandle init, MethodHandle body) {
|
||||
@ -5607,7 +5606,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
||||
* return v;
|
||||
* }
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote Example:
|
||||
* <blockquote><pre>{@code
|
||||
* // 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");
|
||||
* assertEquals(reversedList, (List<String>) loop.invoke(list));
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
*
|
||||
* @apiNote The implementation of this method can be expressed approximately as follows:
|
||||
* <blockquote><pre>{@code
|
||||
* MethodHandle iteratedLoop(MethodHandle iterator, MethodHandle init, MethodHandle body) {
|
||||
|
@ -165,28 +165,33 @@
|
||||
* <p>
|
||||
* Given these rules, here are examples of legal bootstrap method declarations,
|
||||
* given various numbers {@code N} of extra arguments.
|
||||
* The first rows (marked {@code *}) will work for any number of extra arguments.
|
||||
* <table class="plain">
|
||||
* The first row (marked {@code *}) will work for any number of extra arguments.
|
||||
* <table class="plain" style="vertical-align:top">
|
||||
* <caption style="display:none">Static argument types</caption>
|
||||
* <tr><th>N</th><th>Sample bootstrap method</th></tr>
|
||||
* <tr><td>*</td>
|
||||
* <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
|
||||
* <tr><td>*</td><td>
|
||||
* <code>CallSite bootstrap(Object... args)</code></td></tr>
|
||||
* <tr><td>*</td><td>
|
||||
* <code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
|
||||
* <tr><td>0</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
|
||||
* <tr><td>0</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
|
||||
* <tr><td>1</td><td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">N</th><th scope="col">Sample bootstrap method</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">*</th><td>
|
||||
* <ul style="list-style:none; padding-left: 0; margin:0">
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
|
||||
* <li><code>CallSite bootstrap(Object... args)</code>
|
||||
* <li><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code>
|
||||
* </ul></td></tr>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">0</th><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>
|
||||
* <tr><td>2</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
|
||||
* <tr><td>2</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
|
||||
* <tr><td>2</td>
|
||||
* <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">2</th><td>
|
||||
* <ul style="list-style:none; padding-left: 0; margin:0">
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code>
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code>
|
||||
* </ul></td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* The last example assumes that the extra arguments are of type
|
||||
* {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.
|
||||
|
@ -108,27 +108,39 @@ import sun.reflect.annotation.AnnotationType;
|
||||
* <table class="plain">
|
||||
* <caption>Overview of kind of presence detected by different AnnotatedElement methods</caption>
|
||||
* <thead>
|
||||
* <tr><th colspan=2></th><th colspan=4>Kind of Presence</th>
|
||||
* <tr><th colspan=2>Method</th><th>Directly Present</th><th>Indirectly Present</th><th>Present</th><th>Associated</th>
|
||||
* <tr><th colspan=2 scope="col">Method</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>
|
||||
* <tbody>
|
||||
* <tr><td style="text-align:right">{@code T}</td><td>{@link #getAnnotation(Class) getAnnotation(Class<T>)}
|
||||
* <td></td><td></td><td>X</td><td></td>
|
||||
* <tr><td style="text-align:right">{@code T}</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotation(Class) getAnnotation(Class<T>)}
|
||||
* <td></td><td></td><td style="text-align:center">X</td><td></td>
|
||||
* </tr>
|
||||
* <tr><td style="text-align:right">{@code Annotation[]}</td><td>{@link #getAnnotations getAnnotations()}
|
||||
* <td></td><td></td><td>X</td><td></td>
|
||||
* <tr><td style="text-align:right">{@code Annotation[]}</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><td style="text-align:right">{@code T[]}</td><td>{@link #getAnnotationsByType(Class) getAnnotationsByType(Class<T>)}
|
||||
* <td></td><td></td><td></td><td>X</td>
|
||||
* <tr><td style="text-align:right">{@code T[]}</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotationsByType(Class) getAnnotationsByType(Class<T>)}
|
||||
* <td></td><td></td><td></td><td style="text-align:center">X</td>
|
||||
* </tr>
|
||||
* <tr><td style="text-align:right">{@code T}</td><td>{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class<T>)}
|
||||
* <td>X</td><td></td><td></td><td></td>
|
||||
* <tr><td style="text-align:right">{@code T}</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class<T>)}
|
||||
* <td style="text-align:center">X</td><td></td><td></td><td></td>
|
||||
* </tr>
|
||||
* <tr><td style="text-align:right">{@code Annotation[]}</td><td>{@link #getDeclaredAnnotations getDeclaredAnnotations()}
|
||||
* <td>X</td><td></td><td></td><td></td>
|
||||
* <tr><td style="text-align:right">{@code Annotation[]}</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><td style="text-align:right">{@code T[]}</td><td>{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class<T>)}
|
||||
* <td>X</td><td>X</td><td></td><td></td>
|
||||
* <tr><td style="text-align:right">{@code T[]}</td>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class<T>)}
|
||||
* <td style="text-align:center">X</td><td style="text-align:center">X</td><td></td><td></td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -120,18 +120,18 @@ import java.util.Arrays;
|
||||
* preferred scale for representing a result. The preferred
|
||||
* scale for each operation is listed in the table below.
|
||||
*
|
||||
* <table class="plain">
|
||||
* <caption><b>Preferred Scales for Results of Arithmetic Operations
|
||||
* </b></caption>
|
||||
* <table class="striped" style="text-align:left">
|
||||
* <caption>Preferred Scales for Results of Arithmetic Operations
|
||||
* </caption>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <tr><td>Add</td><td>max(addend.scale(), augend.scale())</td>
|
||||
* <tr><td>Subtract</td><td>max(minuend.scale(), subtrahend.scale())</td>
|
||||
* <tr><td>Multiply</td><td>multiplier.scale() + multiplicand.scale()</td>
|
||||
* <tr><td>Divide</td><td>dividend.scale() - divisor.scale()</td>
|
||||
* <tr><td>Square root</td><td>radicand.scale()/2</td>
|
||||
* <tr><th scope="row">Add</th><td>max(addend.scale(), augend.scale())</td>
|
||||
* <tr><th scope="row">Subtract</th><td>max(minuend.scale(), subtrahend.scale())</td>
|
||||
* <tr><th scope="row">Multiply</th><td>multiplier.scale() + multiplicand.scale()</td>
|
||||
* <tr><th scope="row">Divide</th><td>dividend.scale() - divisor.scale()</td>
|
||||
* <tr><th scope="row">Square root</th><td>radicand.scale()/2</td>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
|
@ -51,13 +51,13 @@ package java.math;
|
||||
* proper {@code MathContext}. A summary table showing the results
|
||||
* 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>
|
||||
* <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>
|
||||
* <tr style="vertical-align:top">
|
||||
* <th>Input Number</th> <th>{@code UP}</th>
|
||||
* <th>{@code UP}</th>
|
||||
* <th>{@code DOWN}</th>
|
||||
* <th>{@code CEILING}</th>
|
||||
* <th>{@code FLOOR}</th>
|
||||
@ -66,18 +66,18 @@ package java.math;
|
||||
* <th>{@code HALF_EVEN}</th>
|
||||
* <th>{@code UNNECESSARY}</th>
|
||||
* </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 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 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 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 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 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 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 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 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 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>6</td> <td>5</td> <td>6</td> <td>5</td> <td>6</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><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><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><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><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><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><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><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><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>
|
||||
* </table>
|
||||
*
|
||||
@ -104,23 +104,23 @@ public enum RoundingMode {
|
||||
* value.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode UP Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode UP Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code UP} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code UP} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>6</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>3</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-3</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>6</td>
|
||||
*<tr><th scope="row">2.5</th> <td>3</td>
|
||||
*<tr><th scope="row">1.6</th> <td>2</td>
|
||||
*<tr><th scope="row">1.1</th> <td>2</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-2</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-2</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-3</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-6</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -132,23 +132,23 @@ public enum RoundingMode {
|
||||
* rounding mode never increases the magnitude of the calculated value.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode DOWN Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode DOWN Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code DOWN} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code DOWN} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>5</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-5</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>5</td>
|
||||
*<tr><th scope="row">2.5</th> <td>2</td>
|
||||
*<tr><th scope="row">1.6</th> <td>1</td>
|
||||
*<tr><th scope="row">1.1</th> <td>1</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-1</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-2</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-5</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -161,23 +161,23 @@ public enum RoundingMode {
|
||||
* that this rounding mode never decreases the calculated value.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode CEILING Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode CEILING Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code CEILING} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>6</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>3</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-5</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>6</td>
|
||||
*<tr><th scope="row">2.5</th> <td>3</td>
|
||||
*<tr><th scope="row">1.6</th> <td>2</td>
|
||||
*<tr><th scope="row">1.1</th> <td>2</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-1</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-2</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-5</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -190,23 +190,23 @@ public enum RoundingMode {
|
||||
* this rounding mode never increases the calculated value.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode FLOOR Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode FLOOR Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code FLOOR} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code FLOOR} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>5</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-3</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>5</td>
|
||||
*<tr><th scope="row">2.5</th> <td>2</td>
|
||||
*<tr><th scope="row">1.6</th> <td>1</td>
|
||||
*<tr><th scope="row">1.1</th> <td>1</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-2</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-2</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-3</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-6</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -221,23 +221,23 @@ public enum RoundingMode {
|
||||
* mode commonly taught at school.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode HALF_UP Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode HALF_UP Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code HALF_UP} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code HALF_UP} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>6</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>3</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-3</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>6</td>
|
||||
*<tr><th scope="row">2.5</th> <td>3</td>
|
||||
*<tr><th scope="row">1.6</th> <td>2</td>
|
||||
*<tr><th scope="row">1.1</th> <td>1</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-2</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-3</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-6</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -251,23 +251,23 @@ public enum RoundingMode {
|
||||
* {@code RoundingMode.DOWN}.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode HALF_DOWN Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode HALF_DOWN Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code HALF_DOWN} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code HALF_DOWN} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>5</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-5</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>5</td>
|
||||
*<tr><th scope="row">2.5</th> <td>2</td>
|
||||
*<tr><th scope="row">1.6</th> <td>2</td>
|
||||
*<tr><th scope="row">1.1</th> <td>1</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-2</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-2</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-5</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -288,23 +288,23 @@ public enum RoundingMode {
|
||||
* arithmetic in Java.
|
||||
*
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode HALF_EVEN Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode HALF_EVEN Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code HALF_EVEN} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code HALF_EVEN} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>6</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>2</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>6</td>
|
||||
*<tr><th scope="row">2.5</th> <td>2</td>
|
||||
*<tr><th scope="row">1.6</th> <td>2</td>
|
||||
*<tr><th scope="row">1.1</th> <td>1</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>-2</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>-2</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>-6</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
@ -316,23 +316,23 @@ public enum RoundingMode {
|
||||
* specified on an operation that yields an inexact result, an
|
||||
* {@code ArithmeticException} is thrown.
|
||||
*<p>Example:
|
||||
*<table class="plain">
|
||||
* <caption><b>Rounding mode UNNECESSARY Examples</b></caption>
|
||||
*<table class="striped">
|
||||
* <caption>Rounding mode UNNECESSARY Examples</caption>
|
||||
*<thead>
|
||||
*<tr style="vertical-align:top"><th>Input Number</th>
|
||||
* <th>Input rounded to one digit<br> with {@code UNNECESSARY} rounding
|
||||
*<tr style="vertical-align:top"><th scope="col">Input Number</th>
|
||||
* <th scope="col">Input rounded to one digit<br> with {@code UNNECESSARY} rounding
|
||||
*</thead>
|
||||
*<tbody>
|
||||
*<tr style="text-align:right"><td>5.5</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>2.5</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>1.6</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>1.1</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>1.0</td> <td>1</td>
|
||||
*<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
|
||||
*<tr style="text-align:right"><td>-1.1</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>-1.6</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>-2.5</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr style="text-align:right"><td>-5.5</td> <td>throw {@code ArithmeticException}</td>
|
||||
*<tbody style="text-align:right">
|
||||
*<tr><th scope="row">5.5</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">2.5</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">1.6</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">1.1</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">1.0</th> <td>1</td>
|
||||
*<tr><th scope="row">-1.0</th> <td>-1</td>
|
||||
*<tr><th scope="row">-1.1</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">-1.6</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">-2.5</th> <td>throw {@code ArithmeticException}</td>
|
||||
*<tr><th scope="row">-5.5</th> <td>throw {@code ArithmeticException}</td>
|
||||
*</tbody>
|
||||
*</table>
|
||||
*/
|
||||
|
@ -72,10 +72,13 @@ import sun.net.util.IPAddressUtil;
|
||||
*
|
||||
* <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>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Address Type</th><th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <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
|
||||
* a unicast address is delivered to the interface identified by
|
||||
* that address.
|
||||
@ -94,12 +97,12 @@ import sun.net.util.IPAddressUtil;
|
||||
* IP address loops around and becomes IP input on the local
|
||||
* host. This address is often used when testing a
|
||||
* 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
|
||||
* to different nodes). A packet sent to a multicast address is
|
||||
* delivered to all interfaces identified by that address.</td></tr>
|
||||
* </tbody>
|
||||
* </table></blockquote>
|
||||
* </table>
|
||||
*
|
||||
* <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
|
||||
* positive and negative host name resolution caching:
|
||||
*
|
||||
* <blockquote>
|
||||
* <dl>
|
||||
* <dl style="margin-left:2em">
|
||||
* <dt><b>networkaddress.cache.ttl</b></dt>
|
||||
* <dd>Indicates the caching policy for successful name lookups from
|
||||
* 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".
|
||||
* </dd>
|
||||
* </dl>
|
||||
* </blockquote>
|
||||
*
|
||||
* @author Chris Warth
|
||||
* @see java.net.InetAddress#getByAddress(byte[])
|
||||
|
@ -132,23 +132,23 @@ import java.lang.NullPointerException; // for javadoc
|
||||
*
|
||||
* <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>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <tr><td>scheme</td><td>{@code String}</td></tr>
|
||||
* <tr><td>scheme-specific-part </td><td>{@code String}</td></tr>
|
||||
* <tr><td>authority</td><td>{@code String}</td></tr>
|
||||
* <tr><td>user-info</td><td>{@code String}</td></tr>
|
||||
* <tr><td>host</td><td>{@code String}</td></tr>
|
||||
* <tr><td>port</td><td>{@code int}</td></tr>
|
||||
* <tr><td>path</td><td>{@code String}</td></tr>
|
||||
* <tr><td>query</td><td>{@code String}</td></tr>
|
||||
* <tr><td>fragment</td><td>{@code String}</td></tr>
|
||||
* <tbody style="text-align:left">
|
||||
* <tr><th scope="row">scheme</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">scheme-specific-part</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">authority</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">user-info</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">host</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">port</th><td>{@code int}</td></tr>
|
||||
* <tr><th scope="row">path</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">query</th><td>{@code String}</td></tr>
|
||||
* <tr><th scope="row">fragment</th><td>{@code String}</td></tr>
|
||||
* </tbody>
|
||||
* </table></blockquote>
|
||||
* </table>
|
||||
*
|
||||
* In a given instance any particular component is either <i>undefined</i> or
|
||||
* <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
|
||||
* 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>
|
||||
* <tbody>
|
||||
* <tr><th style="vertical-align:top"><i>alpha</i></th>
|
||||
* <thead>
|
||||
* <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,
|
||||
* {@code 'A'} through {@code 'Z'}
|
||||
* and {@code 'a'} through {@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,
|
||||
* {@code '0'} through {@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>
|
||||
* <tr><th style="vertical-align:top"><i>unreserved</i> </th>
|
||||
* <tr><th scope="row" style="vertical-align:top">unreserved</th>
|
||||
* <td>All <i>alphanum</i> characters together with those in the string
|
||||
* {@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>
|
||||
* <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
|
||||
* {@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
|
||||
* character ({@code '%'}) followed by two hexadecimal digits
|
||||
* ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
|
||||
* {@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,
|
||||
* are not control characters (according to the {@link
|
||||
* java.lang.Character#isISOControl(char) Character.isISOControl}
|
||||
@ -287,7 +290,7 @@ import java.lang.NullPointerException; // for javadoc
|
||||
* method) <i>(<b>Deviation from RFC 2396</b>, which is
|
||||
* limited to US-ASCII)</i></td></tr>
|
||||
* </tbody>
|
||||
* </table></blockquote>
|
||||
* </table>
|
||||
*
|
||||
* <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>
|
||||
|
@ -51,31 +51,16 @@ import sun.security.action.GetPropertyAction;
|
||||
* The abstract class {@code URLConnection} is the superclass
|
||||
* of all classes that represent a communications link between the
|
||||
* 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
|
||||
* 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>
|
||||
* ---------------------------->
|
||||
* <br>time</div>
|
||||
* read from and to write to the resource referenced by the URL.
|
||||
*
|
||||
* <p>
|
||||
* In general, creating a connection to a URL is a multistep process:
|
||||
* <ol>
|
||||
* <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 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
|
||||
* of the remote object can be accessed.
|
||||
* </ol>
|
||||
|
@ -72,22 +72,22 @@ import java.security.Permission;
|
||||
* 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
|
||||
* three different ways as the following examples show:
|
||||
* <table class="plain">
|
||||
* <table class="striped">
|
||||
* <caption>URL Examples</caption>
|
||||
* <thead>
|
||||
* <tr><th>Example url</th><th>Description</th></tr>
|
||||
* <tr><th scope="col">Example url</th><th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
|
||||
* <tbody style="text-align:left">
|
||||
* <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>
|
||||
* </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
|
||||
* other words all resources with the same number of path components, and
|
||||
* which only differ in the final path component, represented by the '*'.
|
||||
* </td>
|
||||
* </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
|
||||
* preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
|
||||
* example).
|
||||
@ -114,11 +114,12 @@ import java.security.Permission;
|
||||
* 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.
|
||||
* Some examples are:
|
||||
* <pre>
|
||||
* "POST,GET,DELETE"
|
||||
* "GET:X-Foo-Request,X-Bar-Request"
|
||||
* "POST,GET:Header1,Header2"
|
||||
* </pre>
|
||||
* <ul>
|
||||
* <li>"POST,GET,DELETE"
|
||||
* <li>"GET:X-Foo-Request,X-Bar-Request"
|
||||
* <li>"POST,GET:Header1,Header2"
|
||||
* </ul>
|
||||
* <p>
|
||||
* 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
|
||||
* example specifies two request methods, and two headers.
|
||||
@ -253,16 +254,16 @@ public final class URLPermission extends Permission {
|
||||
* <table class="plain">
|
||||
* <caption>Examples of Path Matching</caption>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr>
|
||||
* <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
|
||||
* <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
|
||||
* <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
|
||||
* <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
|
||||
* <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
|
||||
* <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
|
||||
* <tbody style="text-align:left">
|
||||
* <tr><th scope="row">/a/b</th><th scope="row">/a/b</th><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> <th scope="row">/a/b/c/d</th><td>no</td></tr>
|
||||
* <tr> <th scope="row">/a/b/c/-</th><td>no</td></tr>
|
||||
* <tr><th scope="row" rowspan="3">/a/b/-</th><th scope="row">/a/b/c/d</th><td>yes</td></tr>
|
||||
* <tr> <th scope="row">/a/b/c/d/e</th><td>yes</td></tr>
|
||||
* <tr> <th scope="row">/a/b/c/*</th><td>yes</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@
|
||||
or visit www.oracle.com if you need additional information or have any
|
||||
questions.
|
||||
-->
|
||||
<HTML>
|
||||
<HTML lang="EN">
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
|
||||
<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,
|
||||
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
|
||||
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
|
||||
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>
|
||||
|
@ -30,46 +30,50 @@
|
||||
*
|
||||
* <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>
|
||||
* <tr><th style="text-align:left">Channels</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top"><i>{@link java.nio.channels.Channel}</i></td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Channels</th>
|
||||
* <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>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ReadableByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.ReadableByteChannel}</i></span></th>
|
||||
* <td>Can read into a buffer</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ScatteringByteChannel} </i></td>
|
||||
* <td>Can read into a sequence of buffers</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.WritableByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.ScatteringByteChannel}</i></span></th>
|
||||
* <td>Can read into a sequence of buffers</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.WritableByteChannel}</i></span></th>
|
||||
* <td>Can write from a buffer</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.GatheringByteChannel}</i></td>
|
||||
* <td>Can write from a sequence of buffers</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ByteChannel}</i></td>
|
||||
* <td>Can read/write to/from a buffer</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.SeekableByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.GatheringByteChannel}</i></span></th>
|
||||
* <td>Can write from a sequence of buffers</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.ByteChannel}</i></span></th>
|
||||
* <td>Can read/write to/from a buffer</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <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
|
||||
* sequence of bytes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.AsynchronousChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.AsynchronousChannel}</i></span></th>
|
||||
* <td>Supports asynchronous I/O operations.</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.AsynchronousByteChannel}</i></span></th>
|
||||
* <td>Can read and write bytes asynchronously</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.NetworkChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.channels.NetworkChannel}</i></span></th>
|
||||
* <td>A channel to a network socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.MulticastChannel}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em"><i>{@link java.nio.channels.MulticastChannel}</i></span></th>
|
||||
* <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>
|
||||
* </table></blockquote>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <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
|
||||
@ -122,21 +126,25 @@
|
||||
* be constructed that uses a given charset to encode characters into bytes and
|
||||
* 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">
|
||||
* Lists file channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">File channels</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.FileChannel}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">File channels</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.FileChannel}</th>
|
||||
* <td>Reads, writes, maps, and manipulates files</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.FileLock}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.FileLock}</th>
|
||||
* <td>A lock on a (region of a) file</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.MappedByteBuffer} </td>
|
||||
* <td>A direct byte buffer mapped to a region of a file</td></tr>
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.MappedByteBuffer}</th>
|
||||
* <td>A direct byte buffer mapped to a region of a file</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> The {@link java.nio.channels.FileChannel} class supports the usual
|
||||
* operations of reading bytes from, and writing bytes to, a channel connected to
|
||||
@ -156,36 +164,40 @@
|
||||
* class.
|
||||
*
|
||||
* <a id="multiplex"></a>
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="margin-left:2em; text-align:left">
|
||||
* <caption style="display:none">
|
||||
* Lists multiplexed, non-blocking channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">Multiplexed, non-blocking I/O</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectableChannel}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Multiplexed, non-blocking I/O</th>
|
||||
* <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>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.DatagramChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.DatagramChannel}</span></th>
|
||||
* <td>A channel to a datagram-oriented socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.Pipe.SinkChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.Pipe.SinkChannel}</span></th>
|
||||
* <td>The write end of a pipe</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.Pipe.SourceChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.Pipe.SourceChannel}</span></th>
|
||||
* <td>The read end of a pipe</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.ServerSocketChannel} </td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.ServerSocketChannel}</span></th>
|
||||
* <td>A channel to a stream-oriented listening socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.SocketChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">{@link java.nio.channels.SocketChannel}</span></th>
|
||||
* <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>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectionKey}</td>
|
||||
* <td>A token representing the registration <br> of a channel
|
||||
* with a selector</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Pipe}</td>
|
||||
* <td>Two channels that form a unidirectional pipe</td></tr>
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">{@link java.nio.channels.SelectionKey}</th>
|
||||
* <td>A token representing the registration of a channel
|
||||
* with a selector</td></tr>
|
||||
* <tr><th scope="row">{@link java.nio.channels.Pipe}</th>
|
||||
* <td>Two channels that form a unidirectional pipe</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <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
|
||||
@ -251,27 +263,31 @@
|
||||
*
|
||||
* <a id="async"></a>
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="padding-left:2em; text-align:left">
|
||||
* <caption style="display:none">
|
||||
* Lists asynchronous channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">
|
||||
* Asynchronous I/O</th><th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousFileChannel}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Asynchronous I/O</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </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>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousSocketChannel}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousSocketChannel}</th>
|
||||
* <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousServerSocketChannel} </td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousServerSocketChannel}</th>
|
||||
* <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.CompletionHandler}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.CompletionHandler}</th>
|
||||
* <td>A handler for consuming the result of an asynchronous operation</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousChannelGroup}</td>
|
||||
* <tr><th scope="row">
|
||||
* {@link java.nio.channels.AsynchronousChannelGroup}</th>
|
||||
* <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
|
||||
* special type of channel capable of asynchronous I/O operations. Asynchronous
|
||||
|
@ -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.
|
||||
*
|
||||
* 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
|
||||
* 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>
|
||||
* <tr><th style="text-align:left">Class name</th>
|
||||
* <th style="text-align:left"><th>DescriptiPath
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td>
|
||||
* <td>A named mapping between characters<br>and bytes</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Class name</th>
|
||||
* <th scope="col">Description
|
||||
* </thead>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td>
|
||||
* <td>Describes actions to take when<br>coding errors are detected</td></tr>
|
||||
*
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">{@link java.nio.charset.CodingErrorAction}</th>
|
||||
* <td>Describes actions to take when coding errors are detected</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <p> A <i>charset</i> is named mapping between sequences of
|
||||
* sixteen-bit Unicode characters and sequences of bytes, in the sense
|
||||
|
@ -314,45 +314,49 @@ public abstract class FileSystem
|
||||
* representation of the path is matched using a limited pattern language
|
||||
* that resembles regular expressions but with a simpler syntax. For example:
|
||||
*
|
||||
* <blockquote>
|
||||
* <table class="borderless">
|
||||
* <table class="striped" style="text-align:left; margin-left:2em">
|
||||
* <caption style="display:none">Pattern Language</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th scope="col">Example
|
||||
* <th scope="col">Description
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <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>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>{@code *.*}</td>
|
||||
* <th scope="row">{@code *.*}</th>
|
||||
* <td>Matches file names containing a dot</td>
|
||||
* </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>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>{@code foo.?}</td>
|
||||
* <th scope="row">{@code foo.?}</th>
|
||||
* <td>Matches file names starting with {@code foo.} and a single
|
||||
* character extension</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>/home/*/*</code>
|
||||
* <th scope="row"><code>/home/*/*</code>
|
||||
* <td>Matches <code>/home/gus/data</code> on UNIX platforms</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>/home/**</code>
|
||||
* <th scope="row"><code>/home/**</code>
|
||||
* <td>Matches <code>/home/gus</code> and
|
||||
* <code>/home/gus/data</code> on UNIX platforms</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><code>C:\\*</code>
|
||||
* <th scope="row"><code>C:\\*</code>
|
||||
* <td>Matches <code>C:\foo</code> and <code>C:\bar</code> on the Windows
|
||||
* platform (note that the backslash is escaped; as a string literal in the
|
||||
* Java Language the pattern would be <code>"C:\\\\*"</code>) </td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* </blockquote>
|
||||
*
|
||||
* <p> The following rules are used to interpret glob patterns:
|
||||
*
|
||||
|
@ -1923,30 +1923,33 @@ public final class Files {
|
||||
* <p> The following examples demonstrate possible values for the {@code
|
||||
* attributes} parameter:
|
||||
*
|
||||
* <blockquote>
|
||||
* <table class="borderless">
|
||||
* <table class="striped" style="text-align: left; margin-left:2em">
|
||||
* <caption style="display:none">Possible values</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th scope="col">Example
|
||||
* <th scope="col">Description
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td> {@code "*"} </td>
|
||||
* <th scope="row"> {@code "*"} </th>
|
||||
* <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
|
||||
* </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
|
||||
* attributes. </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td> {@code "posix:*"} </td>
|
||||
* <th scope="row"> {@code "posix:*"} </th>
|
||||
* <td> Read all {@link PosixFileAttributes POSIX-file-attributes}. </td>
|
||||
* </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>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* </blockquote>
|
||||
*
|
||||
* <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,
|
||||
|
@ -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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* <blockquote><table class="borderless">
|
||||
* <table class="striped" style="padding-left:2em; text-align:left">
|
||||
* <caption style="display:none">Attribute views</caption>
|
||||
* <tr><th style="text-align:left">Attribute views</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Attribute views</th>
|
||||
* <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>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileAttributeView}</i></span></th>
|
||||
* <td>Can read or update file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.BasicFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">
|
||||
* <i>{@link java.nio.file.attribute.BasicFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update a basic set of file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.PosixFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:3em">
|
||||
* <i>{@link java.nio.file.attribute.PosixFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update POSIX defined file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.DosFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:3em">
|
||||
* <i>{@link java.nio.file.attribute.DosFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update FAT file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">
|
||||
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView}</i></span></th>
|
||||
* <td>Can read or update the owner of a file</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.AclFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:3em">
|
||||
* <i>{@link java.nio.file.attribute.AclFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update Access Control Lists</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView} </i></td>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:2em">
|
||||
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}</i></span></th>
|
||||
* <td>Can read or update user-defined file attributes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
|
||||
* <tr><th scope="row">
|
||||
* <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>
|
||||
* </table></blockquote>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
* <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.
|
||||
|
@ -48,7 +48,7 @@
|
||||
* <li><p> <i>Selectors</i> and <i>selection keys</i>, which
|
||||
* together with <br> <i>selectable channels</i> define a <a
|
||||
* href="channels/package-summary.html#multiplex">multiplexed,
|
||||
* non-blocking <br> I/O</a> facility. </p></li>
|
||||
* non-blocking <br> I/O</a> facility. </p></li>
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
@ -62,33 +62,44 @@
|
||||
*
|
||||
* <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>
|
||||
* <tr><th style="text-align:left">Buffers</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.Buffer}</td>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Buffers</th>
|
||||
* <th scope="col">Description</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">{@link java.nio.Buffer}</th>
|
||||
* <td>Position, limit, and capacity;
|
||||
* <br>clear, flip, rewind, and mark/reset</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.ByteBuffer}</td>
|
||||
* <td>Get/put, compact, views; allocate, wrap</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.MappedByteBuffer} </td>
|
||||
* clear, flip, rewind, and mark/reset</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.ByteBuffer}</span></th>
|
||||
* <td>Get/put, compact, views; allocate, wrap</td></tr>
|
||||
* <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>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.CharBuffer}</td>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.DoubleBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.FloatBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.IntBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.LongBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.ShortBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.ByteOrder}</td>
|
||||
* <td>Typesafe enumeration for byte orders</td></tr>
|
||||
* </table></blockquote>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.CharBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.DoubleBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.FloatBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.IntBuffer}</span></th>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><th scope="row">
|
||||
* <span style="padding-left:1em">{@link java.nio.LongBuffer}</span></th>
|
||||
* <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
|
||||
* specific primitive type. In addition to its content a buffer has a
|
||||
|
@ -263,18 +263,18 @@ public class DrbgParameters {
|
||||
* Capability effective = ((DrbgParametes.Initiate) s.getParameters())
|
||||
* .getCapability();</pre>
|
||||
* </blockquote>
|
||||
* <table class="plain">
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">requested and effective capabilities</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Requested Value</th>
|
||||
* <th>Possible Effective Values</th>
|
||||
* <th scope="col">Requested Value</th>
|
||||
* <th scope="col">Possible Effective Values</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td>NONE</td><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
|
||||
* <tr><td>RESEED_ONLY</td><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
|
||||
* <tr><td>PR_AND_RESEED</td><td>PR_AND_RESEED</td></tr>
|
||||
* <tbody style="text-align:left">
|
||||
* <tr><th scope="row">NONE</th><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
|
||||
* <tr><th scope="row">RESEED_ONLY</th><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
|
||||
* <tr><th scope="row">PR_AND_RESEED</th><td>PR_AND_RESEED</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* <p>
|
||||
|
@ -61,19 +61,19 @@ import java.util.function.Function;
|
||||
* security framework. Services of this type cannot be added, removed,
|
||||
* or modified by applications.
|
||||
* 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>
|
||||
* <thead>
|
||||
* <tr><th>Name</th><th>Value</th>
|
||||
* <tr><th scope="col">Name</th><th scope="col">Value</th>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td>{@code Provider.id name}</td>
|
||||
* <tbody style="text-align:left">
|
||||
* <tr><th scope="row">{@code Provider.id name}</th>
|
||||
* <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>
|
||||
* <tr><td>{@code Provider.id info}</td>
|
||||
* <tr><th scope="row">{@code Provider.id info}</th>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -153,33 +153,33 @@ public interface X509Extension {
|
||||
* by periods.
|
||||
*
|
||||
* <p>For example:<br>
|
||||
* <table class="plain">
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">Examples of OIDs and extension names</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>OID <em>(Object Identifier)</em></th>
|
||||
* <th>Extension Name</th></tr>
|
||||
* <th scope="col">OID <em>(Object Identifier)</em></th>
|
||||
* <th scope="col">Extension Name</th></tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td>2.5.29.14</td>
|
||||
* <tbody style="text-align:left">
|
||||
* <tr><th scope="row">2.5.29.14</th>
|
||||
* <td>SubjectKeyIdentifier</td></tr>
|
||||
* <tr><td>2.5.29.15</td>
|
||||
* <tr><th scope="row">2.5.29.15</th>
|
||||
* <td>KeyUsage</td></tr>
|
||||
* <tr><td>2.5.29.16</td>
|
||||
* <tr><th scope="row">2.5.29.16</th>
|
||||
* <td>PrivateKeyUsage</td></tr>
|
||||
* <tr><td>2.5.29.17</td>
|
||||
* <tr><th scope="row">2.5.29.17</th>
|
||||
* <td>SubjectAlternativeName</td></tr>
|
||||
* <tr><td>2.5.29.18</td>
|
||||
* <tr><th scope="row">2.5.29.18</th>
|
||||
* <td>IssuerAlternativeName</td></tr>
|
||||
* <tr><td>2.5.29.19</td>
|
||||
* <tr><th scope="row">2.5.29.19</th>
|
||||
* <td>BasicConstraints</td></tr>
|
||||
* <tr><td>2.5.29.30</td>
|
||||
* <tr><th scope="row">2.5.29.30</th>
|
||||
* <td>NameConstraints</td></tr>
|
||||
* <tr><td>2.5.29.33</td>
|
||||
* <tr><th scope="row">2.5.29.33</th>
|
||||
* <td>PolicyMappings</td></tr>
|
||||
* <tr><td>2.5.29.35</td>
|
||||
* <tr><th scope="row">2.5.29.35</th>
|
||||
* <td>AuthorityKeyIdentifier</td></tr>
|
||||
* <tr><td>2.5.29.36</td>
|
||||
* <tr><th scope="row">2.5.29.36</th>
|
||||
* <td>PolicyConstraints</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -150,73 +150,73 @@ import java.util.Locale;
|
||||
* <caption style="display:none">Shows how FormatType and FormatStyle values map to Format instances</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th id="ft" class="TableHeadingColor">FormatType
|
||||
* <th id="fs" class="TableHeadingColor">FormatStyle
|
||||
* <th id="sc" class="TableHeadingColor">Subformat Created
|
||||
* <th scope="col" class="TableHeadingColor">FormatType
|
||||
* <th scope="col" class="TableHeadingColor">FormatStyle
|
||||
* <th scope="col" class="TableHeadingColor">Subformat Created
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td headers="ft"><i>(none)</i>
|
||||
* <td headers="fs"><i>(none)</i>
|
||||
* <td headers="sc"><code>null</code>
|
||||
* <th scope="row" style="text-weight: normal"><i>(none)</i>
|
||||
* <th scope="row" style="text-weight: normal"><i>(none)</i>
|
||||
* <td>{@code null}
|
||||
* <tr>
|
||||
* <td headers="ft" rowspan=5><code>number</code>
|
||||
* <td headers="fs"><i>(none)</i>
|
||||
* <td headers="sc">{@link NumberFormat#getInstance(Locale) NumberFormat.getInstance}{@code (getLocale())}
|
||||
* <th scope="row" style="text-weight: normal" rowspan=5>{@code number}
|
||||
* <th scope="row" style="text-weight: normal"><i>(none)</i>
|
||||
* <td>{@link NumberFormat#getInstance(Locale) NumberFormat.getInstance}{@code (getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>integer</code>
|
||||
* <td headers="sc">{@link NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance}{@code (getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code integer}
|
||||
* <td>{@link NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance}{@code (getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>currency</code>
|
||||
* <td headers="sc">{@link NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance}{@code (getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code currency}
|
||||
* <td>{@link NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance}{@code (getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>percent</code>
|
||||
* <td headers="sc">{@link NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance}{@code (getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code percent}
|
||||
* <td>{@link NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance}{@code (getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><i>SubformatPattern</i>
|
||||
* <td headers="sc">{@code new} {@link DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat}{@code (subformatPattern,} {@link DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance}{@code (getLocale()))}
|
||||
* <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
|
||||
* <td>{@code new} {@link DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat}{@code (subformatPattern,} {@link DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance}{@code (getLocale()))}
|
||||
* <tr>
|
||||
* <td headers="ft" rowspan=6><code>date</code>
|
||||
* <td headers="fs"><i>(none)</i>
|
||||
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal" rowspan=6>{@code date}
|
||||
* <th scope="row" style="text-weight: normal"><i>(none)</i>
|
||||
* <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>short</code>
|
||||
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code short}
|
||||
* <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>medium</code>
|
||||
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code medium}
|
||||
* <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>long</code>
|
||||
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code long}
|
||||
* <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>full</code>
|
||||
* <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code full}
|
||||
* <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><i>SubformatPattern</i>
|
||||
* <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
|
||||
* <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
|
||||
* <td>{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
|
||||
* <tr>
|
||||
* <td headers="ft" rowspan=6><code>time</code>
|
||||
* <td headers="fs"><i>(none)</i>
|
||||
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal" rowspan=6>{@code time}
|
||||
* <th scope="row" style="text-weight: normal"><i>(none)</i>
|
||||
* <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>short</code>
|
||||
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code short}
|
||||
* <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>medium</code>
|
||||
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code medium}
|
||||
* <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>long</code>
|
||||
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code long}
|
||||
* <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><code>full</code>
|
||||
* <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
|
||||
* <th scope="row" style="text-weight: normal">{@code full}
|
||||
* <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
|
||||
* <tr>
|
||||
* <td headers="fs"><i>SubformatPattern</i>
|
||||
* <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
|
||||
* <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
|
||||
* <td>{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
|
||||
* <tr>
|
||||
* <td headers="ft"><code>choice</code>
|
||||
* <td headers="fs"><i>SubformatPattern</i>
|
||||
* <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
|
||||
* <th scope="row" style="text-weight: normal">{@code choice}
|
||||
* <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
|
||||
* <td>{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
@ -776,44 +776,40 @@ public class MessageFormat extends Format {
|
||||
* <caption style="display:none">Examples of subformat,argument,and formatted text</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Subformat
|
||||
* <th>Argument
|
||||
* <th>Formatted Text
|
||||
* <th scope="col">Subformat
|
||||
* <th scope="col">Argument
|
||||
* <th scope="col">Formatted Text
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td><i>any</i>
|
||||
* <td><i>unavailable</i>
|
||||
* <th scope="row" style="text-weight-normal" rowspan=2><i>any</i>
|
||||
* <th scope="row" style="text-weight-normal"><i>unavailable</i>
|
||||
* <td><code>"{" + argumentIndex + "}"</code>
|
||||
* <tr>
|
||||
* <td><i>any</i>
|
||||
* <td><code>null</code>
|
||||
* <th scope="row" style="text-weight-normal"><code>null</code>
|
||||
* <td><code>"null"</code>
|
||||
* <tr>
|
||||
* <td><code>instanceof ChoiceFormat</code>
|
||||
* <td><i>any</i>
|
||||
* <th scope="row" style="text-weight-normal"><code>instanceof ChoiceFormat</code>
|
||||
* <th scope="row" style="text-weight-normal"><i>any</i>
|
||||
* <td><code>subformat.format(argument).indexOf('{') >= 0 ?<br>
|
||||
* (new MessageFormat(subformat.format(argument), getLocale())).format(argument) :
|
||||
* subformat.format(argument)</code>
|
||||
* <tr>
|
||||
* <td><code>!= null</code>
|
||||
* <td><i>any</i>
|
||||
* <th scope="row" style="text-weight-normal"><code>!= null</code>
|
||||
* <th scope="row" style="text-weight-normal"><i>any</i>
|
||||
* <td><code>subformat.format(argument)</code>
|
||||
* <tr>
|
||||
* <td><code>null</code>
|
||||
* <td><code>instanceof Number</code>
|
||||
* <th scope="row" style="text-weight-normal" rowspan=4><code>null</code>
|
||||
* <th scope="row" style="text-weight-normal"><code>instanceof Number</code>
|
||||
* <td><code>NumberFormat.getInstance(getLocale()).format(argument)</code>
|
||||
* <tr>
|
||||
* <td><code>null</code>
|
||||
* <td><code>instanceof Date</code>
|
||||
* <th scope="row" style="text-weight-normal"><code>instanceof Date</code>
|
||||
* <td><code>DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)</code>
|
||||
* <tr>
|
||||
* <td><code>null</code>
|
||||
* <td><code>instanceof String</code>
|
||||
* <th scope="row" style="text-weight-normal"><code>instanceof String</code>
|
||||
* <td><code>argument</code>
|
||||
* <tr>
|
||||
* <td><code>null</code>
|
||||
* <td><i>any</i>
|
||||
* <th scope="row" style="text-weight-normal"><i>any</i>
|
||||
* <td><code>argument.toString()</code>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -103,19 +103,19 @@ import sun.util.logging.PlatformLogger;
|
||||
*
|
||||
* <p>
|
||||
* CLDR and LDML identify variants:
|
||||
* <table class="striped">
|
||||
* <table class="striped" style="text-align:left">
|
||||
* <caption style="display:none">Variants of Hijrah Calendars</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th style="text-align:left" >Chronology ID</th>
|
||||
* <th style="text-align:left" >Calendar Type</th>
|
||||
* <th style="text-align:left" >Locale extension, see {@link java.util.Locale}</th>
|
||||
* <th style="text-align:left" >Description</th>
|
||||
* <th scope="col">Chronology ID</th>
|
||||
* <th scope="col">Calendar Type</th>
|
||||
* <th scope="col">Locale extension, see {@link java.util.Locale}</th>
|
||||
* <th scope="col">Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>Hijrah-umalqura</td>
|
||||
* <th scope="row">Hijrah-umalqura</th>
|
||||
* <td>islamic-umalqura</td>
|
||||
* <td>ca-islamic-umalqura</td>
|
||||
* <td>Islamic - Umm Al-Qura calendar of Saudi Arabia</td>
|
||||
@ -148,38 +148,38 @@ import sun.util.logging.PlatformLogger;
|
||||
* <p>
|
||||
* The Hijrah property resource is a set of properties that describe the calendar.
|
||||
* 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>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th style="text-align:left" > Property Name</th>
|
||||
* <th style="text-align:left" > Property value</th>
|
||||
* <th style="text-align:left" > Description </th>
|
||||
* <th scope="col">Property Name</th>
|
||||
* <th scope="col">Property value</th>
|
||||
* <th scope="col">Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>id</td>
|
||||
* <th scope="row">id</th>
|
||||
* <td>Chronology Id, for example, "Hijrah-umalqura"</td>
|
||||
* <td>The Id of the calendar in common usage</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>type</td>
|
||||
* <th scope="row">type</th>
|
||||
* <td>Calendar type, for example, "islamic-umalqura"</td>
|
||||
* <td>LDML defines the calendar types</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>version</td>
|
||||
* <th scope="row">version</th>
|
||||
* <td>Version, for example: "1.8.0_1"</td>
|
||||
* <td>The version of the Hijrah variant data</td>
|
||||
* </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>The ISO date of the first day of the minimum Hijrah year.</td>
|
||||
* </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,
|
||||
* 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.
|
||||
|
@ -70,27 +70,27 @@ import java.time.DateTimeException;
|
||||
* 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.
|
||||
*
|
||||
* <table class="striped">
|
||||
* <table class="striped" style="text-align:left">
|
||||
* <caption style="display:none">ISO years and eras</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th style="text-align:left">year-of-era</th>
|
||||
* <th style="text-align:left">era</th>
|
||||
* <th style="text-align:left">proleptic-year</th>
|
||||
* <th scope="col">year-of-era</th>
|
||||
* <th scope="col">era</th>
|
||||
* <th scope="col">proleptic-year</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>2</td><td>CE</td><td>2</td>
|
||||
* <td>2</td><td>CE</td><th scope="row">2</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>1</td><td>CE</td><td>1</td>
|
||||
* <td>1</td><td>CE</td><th scope="row">1</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>1</td><td>BCE</td><td>0</td>
|
||||
* <td>1</td><td>BCE</td><th scope="row">0</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>2</td><td>BCE</td><td>-1</td>
|
||||
* <td>2</td><td>BCE</td><th scope="row">-1</th>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -71,28 +71,28 @@ import java.time.DateTimeException;
|
||||
* 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.
|
||||
*
|
||||
* <table class="striped">
|
||||
* <table class="striped" style="text-align:left">
|
||||
* <caption style="display:none">Minguo years and eras</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th style="text-align:left">year-of-era</th>
|
||||
* <th style="text-align:left">era</th>
|
||||
* <th style="text-align:left">proleptic-year</th>
|
||||
* <th style="text-align:left">ISO proleptic-year</th>
|
||||
* <th>year-of-era</th>
|
||||
* <th>era</th>
|
||||
* <th>proleptic-year</th>
|
||||
* <th>ISO proleptic-year</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -71,28 +71,28 @@ import java.time.DateTimeException;
|
||||
* 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.
|
||||
*
|
||||
* <table class="striped">
|
||||
* <table class="striped" style="text-align:left">
|
||||
* <caption style="display:none">Buddhist years and eras</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th style="text-align:left">year-of-era</th>
|
||||
* <th style="text-align:left">era</th>
|
||||
* <th style="text-align:left">proleptic-year</th>
|
||||
* <th style="text-align:left">ISO proleptic-year</th>
|
||||
* <th scope="col">year-of-era</th>
|
||||
* <th scope="col">era</th>
|
||||
* <th scope="col">proleptic-year</th>
|
||||
* <th scope="col">ISO proleptic-year</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -150,13 +150,13 @@ import java.util.Set;
|
||||
* implementation of {@code java.text.Format}.
|
||||
*
|
||||
* <h3 id="predefined">Predefined Formatters</h3>
|
||||
* <table class="striped">
|
||||
* <table class="striped" style="text-align:left">
|
||||
* <caption>Predefined Formatters</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th scope="col" style="text-align:left">Formatter</th>
|
||||
* <th scope="col" style="text-align:left">Description</th>
|
||||
* <th scope="col" style="text-align:left">Example</th>
|
||||
* <th scope="col">Formatter</th>
|
||||
* <th scope="col">Description</th>
|
||||
* <th scope="col">Example</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
@ -276,56 +276,60 @@ import java.util.Set;
|
||||
* <p>
|
||||
* All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The
|
||||
* following pattern letters are defined:
|
||||
* <pre>
|
||||
* Symbol Meaning Presentation Examples
|
||||
* ------ ------- ------------ -------
|
||||
* G era text AD; Anno Domini; A
|
||||
* u year year 2004; 04
|
||||
* y year-of-era year 2004; 04
|
||||
* D day-of-year number 189
|
||||
* M/L month-of-year number/text 7; 07; Jul; July; J
|
||||
* d day-of-month number 10
|
||||
* g modified-julian-day number 2451334
|
||||
* <table class="striped">
|
||||
* <caption>Pattern Letters and Symbols</caption>
|
||||
* <thead>
|
||||
* <tr><th scope="col">Symbol</th> <th scope="col">Meaning</th> <th scope="col">Presentation</th> <th scope="col">Examples</th>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><th scope="row">G</th> <td>era</td> <td>text</td> <td>AD; Anno Domini; A</td>
|
||||
* <tr><th scope="row">u</th> <td>year</td> <td>year</td> <td>2004; 04</td>
|
||||
* <tr><th scope="row">y</th> <td>year-of-era</td> <td>year</td> <td>2004; 04</td>
|
||||
* <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
|
||||
* Y week-based-year year 1996; 96
|
||||
* w week-of-week-based-year number 27
|
||||
* W week-of-month number 4
|
||||
* E day-of-week text Tue; Tuesday; T
|
||||
* e/c localized day-of-week number/text 2; 02; Tue; Tuesday; T
|
||||
* F day-of-week-in-month number 3
|
||||
* <tr><th scope="row">Q/q</th> <td>quarter-of-year</td> <td>number/text</td> <td>3; 03; Q3; 3rd quarter</td>
|
||||
* <tr><th scope="row">Y</th> <td>week-based-year</td> <td>year</td> <td>1996; 96</td>
|
||||
* <tr><th scope="row">w</th> <td>week-of-week-based-year</td> <td>number</td> <td>27</td>
|
||||
* <tr><th scope="row">W</th> <td>week-of-month</td> <td>number</td> <td>4</td>
|
||||
* <tr><th scope="row">E</th> <td>day-of-week</td> <td>text</td> <td>Tue; Tuesday; T</td>
|
||||
* <tr><th scope="row">e/c</th> <td>localized day-of-week</td> <td>number/text</td> <td>2; 02; Tue; Tuesday; T</td>
|
||||
* <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
|
||||
* h clock-hour-of-am-pm (1-12) number 12
|
||||
* K hour-of-am-pm (0-11) number 0
|
||||
* k clock-hour-of-day (1-24) number 24
|
||||
* <tr><th scope="row">a</th> <td>am-pm-of-day</td> <td>text</td> <td>PM</td>
|
||||
* <tr><th scope="row">h</th> <td>clock-hour-of-am-pm (1-12)</td> <td>number</td> <td>12</td>
|
||||
* <tr><th scope="row">K</th> <td>hour-of-am-pm (0-11)</td> <td>number</td> <td>0</td>
|
||||
* <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
|
||||
* m minute-of-hour number 30
|
||||
* s second-of-minute number 55
|
||||
* S fraction-of-second fraction 978
|
||||
* A milli-of-day number 1234
|
||||
* n nano-of-second number 987654321
|
||||
* N nano-of-day number 1234000000
|
||||
* <tr><th scope="row">H</th> <td>hour-of-day (0-23)</td> <td>number</td> <td>0</td>
|
||||
* <tr><th scope="row">m</th> <td>minute-of-hour</td> <td>number</td> <td>30</td>
|
||||
* <tr><th scope="row">s</th> <td>second-of-minute</td> <td>number</td> <td>55</td>
|
||||
* <tr><th scope="row">S</th> <td>fraction-of-second</td> <td>fraction</td> <td>978</td>
|
||||
* <tr><th scope="row">A</th> <td>milli-of-day</td> <td>number</td> <td>1234</td>
|
||||
* <tr><th scope="row">n</th> <td>nano-of-second</td> <td>number</td> <td>987654321</td>
|
||||
* <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
|
||||
* v generic time-zone name zone-name Pacific Time; PT
|
||||
* z time-zone name zone-name Pacific Standard Time; PST
|
||||
* O localized zone-offset offset-O GMT+8; GMT+08:00; UTC-08:00
|
||||
* X zone-offset 'Z' for zero offset-X Z; -08; -0830; -08:30; -083015; -08:30:15
|
||||
* x zone-offset offset-x +0000; -08; -0830; -08:30; -083015; -08:30:15
|
||||
* Z zone-offset offset-Z +0000; -0800; -08:00
|
||||
* <tr><th scope="row">V</th> <td>time-zone ID</td> <td>zone-id</td> <td>America/Los_Angeles; Z; -08:30</td>
|
||||
* <tr><th scope="row">v</th> <td>generic time-zone name</td> <td>zone-name</td> <td>Pacific Time; PT</td>
|
||||
* <tr><th scope="row">z</th> <td>time-zone name</td> <td>zone-name</td> <td>Pacific Standard Time; PST</td>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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
|
||||
* '' single quote literal '
|
||||
* [ optional section start
|
||||
* ] optional section end
|
||||
* # reserved for future use
|
||||
* { reserved for future use
|
||||
* } reserved for future use
|
||||
* </pre>
|
||||
* <tr><th scope="row">'</th> <td>escape for text</td> <td>delimiter</td> <td></td>
|
||||
* <tr><th scope="row">''</th> <td>single quote</td> <td>literal</td> <td>'</td>
|
||||
* <tr><th scope="row">[</th> <td>optional section start</td> <td></td> <td></td>
|
||||
* <tr><th scope="row">]</th> <td>optional section end</td> <td></td> <td></td>
|
||||
* <tr><th scope="row">#</th> <td>reserved for future use</td> <td></td> <td></td>
|
||||
* <tr><th scope="row">{</th> <td>reserved for future use</td> <td></td> <td></td>
|
||||
* <tr><th scope="row">}</th> <td>reserved for future use</td> <td></td> <td></td>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* <p>
|
||||
* The count of pattern letters determines the format.
|
||||
* <p>
|
||||
|
@ -136,18 +136,18 @@ import sun.util.locale.provider.LocaleResources;
|
||||
* <p>
|
||||
* 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>
|
||||
* <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>
|
||||
* <tbody>
|
||||
* <tr><th>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>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>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">2008-12-28</th><td>Sunday</td><td>Week 52 of week-based-year 2008</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 scope="row">2008-12-31</th><td>Wednesday</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 scope="row">2009-01-04</th><td>Sunday</td><td>Week 1 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>
|
||||
* </table>
|
||||
*
|
||||
|
@ -130,17 +130,17 @@ import sun.util.locale.provider.LocaleResources;
|
||||
* <table class=striped style="text-align: left">
|
||||
* <caption>Examples of WeekFields</caption>
|
||||
* <thead>
|
||||
* <tr><th>Date</th><td>Day-of-week</td>
|
||||
* <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr>
|
||||
* <tr><th scope="col">Date</th><th scope="col">Day-of-week</th>
|
||||
* <th scope="col">First day: Monday<br>Minimal days: 4</th><th scope="col">First day: Monday<br>Minimal days: 5</th></tr>
|
||||
* </thead>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
@ -164,17 +164,17 @@ import sun.util.locale.provider.LocaleResources;
|
||||
* <table class=striped style="text-align: left;">
|
||||
* <caption>Examples of WeekFields for week-based-year</caption>
|
||||
* <thead>
|
||||
* <tr><th>Date</th><td>Day-of-week</td>
|
||||
* <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr>
|
||||
* <tr><th scope="col">Date</th><th scope="col">Day-of-week</th>
|
||||
* <th scope="col">First day: Monday<br>Minimal days: 4</th><th scope="col">First day: Monday<br>Minimal days: 5</th></tr>
|
||||
* </thead>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* <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>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -35,8 +35,7 @@
|
||||
|
||||
package java.util.concurrent;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.VarHandle;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.AbstractSet;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@ -506,19 +505,21 @@ public class ConcurrentSkipListSet<E>
|
||||
: ((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) {
|
||||
MAP.setVolatile(this, map);
|
||||
}
|
||||
|
||||
// VarHandle mechanics
|
||||
private static final VarHandle MAP;
|
||||
static {
|
||||
Field mapField = java.security.AccessController.doPrivileged(
|
||||
(java.security.PrivilegedAction<Field>) () -> {
|
||||
try {
|
||||
Field f = ConcurrentSkipListSet.class
|
||||
.getDeclaredField("m");
|
||||
f.setAccessible(true);
|
||||
return f;
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new Error(e);
|
||||
}});
|
||||
try {
|
||||
MethodHandles.Lookup l = MethodHandles.lookup();
|
||||
MAP = l.findVarHandle(ConcurrentSkipListSet.class, "m",
|
||||
ConcurrentNavigableMap.class);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
mapField.set(this, map);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
}
|
||||
|
@ -85,9 +85,9 @@ package java.util.concurrent;
|
||||
* this.executor = executor;
|
||||
* }
|
||||
* public synchronized void request(long n) {
|
||||
* if (n != 0 && !completed) {
|
||||
* if (!completed) {
|
||||
* completed = true;
|
||||
* if (n < 0) {
|
||||
* if (n <= 0) {
|
||||
* IllegalArgumentException ex = new IllegalArgumentException();
|
||||
* executor.execute(() -> subscriber.onError(ex));
|
||||
* } else {
|
||||
|
@ -576,7 +576,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
private static final RuntimePermission shutdownPerm =
|
||||
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;
|
||||
|
||||
/**
|
||||
@ -1314,9 +1314,9 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
throw new IllegalArgumentException();
|
||||
if (workQueue == null || threadFactory == null || handler == null)
|
||||
throw new NullPointerException();
|
||||
this.acc = System.getSecurityManager() == null ?
|
||||
null :
|
||||
AccessController.getContext();
|
||||
this.acc = (System.getSecurityManager() == null)
|
||||
? null
|
||||
: AccessController.getContext();
|
||||
this.corePoolSize = corePoolSize;
|
||||
this.maximumPoolSize = maximumPoolSize;
|
||||
this.workQueue = workQueue;
|
||||
|
@ -81,13 +81,24 @@ class ZipUtils {
|
||||
* Converts DOS time to Java time (number of milliseconds since epoch).
|
||||
*/
|
||||
public static long dosToJavaTime(long dtime) {
|
||||
LocalDateTime ldt = LocalDateTime.of(
|
||||
(int) (((dtime >> 25) & 0x7f) + 1980),
|
||||
(int) ((dtime >> 21) & 0x0f),
|
||||
(int) ((dtime >> 16) & 0x1f),
|
||||
(int) ((dtime >> 11) & 0x1f),
|
||||
(int) ((dtime >> 5) & 0x3f),
|
||||
(int) ((dtime << 1) & 0x3e));
|
||||
int year;
|
||||
int month;
|
||||
int day;
|
||||
int hour = (int) ((dtime >> 11) & 0x1f);
|
||||
int minute = (int) ((dtime >> 5) & 0x3f);
|
||||
int second = (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(
|
||||
ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
|
||||
}
|
||||
|
@ -1292,7 +1292,7 @@ public abstract class SSLEngine {
|
||||
* href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
|
||||
* Application-Layer Protocol Negotiation (ALPN), can negotiate
|
||||
* application-level values between peers.
|
||||
* <p>
|
||||
*
|
||||
* @implSpec
|
||||
* The implementation in this class throws
|
||||
* {@code UnsupportedOperationException} and performs no other action.
|
||||
@ -1317,7 +1317,7 @@ public abstract class SSLEngine {
|
||||
* Like {@link #getHandshakeSession()},
|
||||
* a connection may be in the middle of a handshake. The
|
||||
* application protocol may or may not yet be available.
|
||||
* <p>
|
||||
*
|
||||
* @implSpec
|
||||
* The implementation in this class throws
|
||||
* {@code UnsupportedOperationException} and performs no other action.
|
||||
|
@ -646,7 +646,7 @@ public class SSLParameters {
|
||||
* requested by the peer, the underlying protocol will determine what
|
||||
* action to take. (For example, ALPN will send a
|
||||
* {@code "no_application_protocol"} alert and terminate the connection.)
|
||||
* <p>
|
||||
*
|
||||
* @implSpec
|
||||
* This method will make a copy of the {@code protocols} array.
|
||||
*
|
||||
|
@ -702,7 +702,7 @@ public abstract class SSLSocket extends Socket
|
||||
* href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
|
||||
* Application-Layer Protocol Negotiation (ALPN), can negotiate
|
||||
* application-level values between peers.
|
||||
* <p>
|
||||
*
|
||||
* @implSpec
|
||||
* The implementation in this class throws
|
||||
* {@code UnsupportedOperationException} and performs no other action.
|
||||
@ -727,7 +727,7 @@ public abstract class SSLSocket extends Socket
|
||||
* Like {@link #getHandshakeSession()},
|
||||
* a connection may be in the middle of a handshake. The
|
||||
* application protocol may or may not yet be available.
|
||||
* <p>
|
||||
*
|
||||
* @implSpec
|
||||
* The implementation in this class throws
|
||||
* {@code UnsupportedOperationException} and performs no other action.
|
||||
|
@ -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);
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
|
||||
package jdk.internal.misc;
|
||||
|
||||
import java.io.ObjectInputFilter;
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.jar.JarFile;
|
||||
@ -70,6 +71,7 @@ public class SharedSecrets {
|
||||
private static JavaAWTFontAccess javaAWTFontAccess;
|
||||
private static JavaBeansAccess javaBeansAccess;
|
||||
private static JavaObjectInputStreamAccess javaObjectInputStreamAccess;
|
||||
private static JavaObjectInputFilterAccess javaObjectInputFilterAccess;
|
||||
private static JavaIORandomAccessFileAccess javaIORandomAccessFileAccess;
|
||||
|
||||
public static JavaUtilJarAccess javaUtilJarAccess() {
|
||||
@ -315,6 +317,17 @@ public class SharedSecrets {
|
||||
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) {
|
||||
javaIORandomAccessFileAccess = jirafa;
|
||||
}
|
||||
|
@ -3071,8 +3071,14 @@ public final class Main {
|
||||
|
||||
private String withWeak(PublicKey key) {
|
||||
if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
|
||||
return String.format(rb.getString("key.bit"),
|
||||
KeyUtil.getKeySize(key), key.getAlgorithm());
|
||||
int kLen = KeyUtil.getKeySize(key);
|
||||
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 {
|
||||
return String.format(rb.getString("key.bit.weak"),
|
||||
KeyUtil.getKeySize(key), key.getAlgorithm());
|
||||
|
@ -462,6 +462,7 @@ public class Resources extends java.util.ListResourceBundle {
|
||||
{"with.weak", "%s (weak)"},
|
||||
{"key.bit", "%d-bit %s key"},
|
||||
{"key.bit.weak", "%d-bit %s key (weak)"},
|
||||
{"unknown.size.1", "unknown size %s key"},
|
||||
{".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}"},
|
||||
{"PKCS.10.with.weak",
|
||||
|
@ -951,12 +951,36 @@ jdk.xml.dsig.secureValidationPolicy=\
|
||||
#
|
||||
# The filter pattern uses the same format as jdk.serialFilter.
|
||||
# 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.
|
||||
# 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
|
||||
#
|
||||
|
@ -1887,13 +1887,17 @@ public class LogManager {
|
||||
* The registered {@linkplain #addConfigurationListener configuration
|
||||
* listeners} will be invoked after the configuration is successfully updated.
|
||||
* <br><br>
|
||||
* <table><caption style="display:none">Updating configuration properties</caption>
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">Updating configuration properties</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Property</th>
|
||||
* <th>Resulting Behavior</th>
|
||||
* <th scope="col">Property</th>
|
||||
* <th scope="col">Resulting Behavior</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td valign="top">{@code <logger>.level}</td>
|
||||
* <th scope="row" valign="top">{@code <logger>.level}</th>
|
||||
* <td>
|
||||
* <ul>
|
||||
* <li>If the resulting configuration defines a level for a logger and
|
||||
@ -1914,7 +1918,7 @@ public class LogManager {
|
||||
* </ul>
|
||||
* </td>
|
||||
* <tr>
|
||||
* <td valign="top">{@code <logger>.useParentHandlers}</td>
|
||||
* <th scope="row" valign="top">{@code <logger>.useParentHandlers}</th>
|
||||
* <td>
|
||||
* <ul>
|
||||
* <li>If either the resulting or the old value for the useParentHandlers
|
||||
@ -1928,7 +1932,7 @@ public class LogManager {
|
||||
* </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign="top">{@code <logger>.handlers}</td>
|
||||
* <th scope="row" valign="top">{@code <logger>.handlers}</th>
|
||||
* <td>
|
||||
* <ul>
|
||||
* <li>If the resulting configuration defines a list of handlers for a
|
||||
@ -1952,7 +1956,7 @@ public class LogManager {
|
||||
* </td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign="top">{@code <handler-name>.*}</td>
|
||||
* <th scope="row" valign="top">{@code <handler-name>.*}</th>
|
||||
* <td>
|
||||
* <ul>
|
||||
* <li>Properties configured/changed on handler classes will only affect
|
||||
@ -1964,7 +1968,7 @@ public class LogManager {
|
||||
* </td>
|
||||
* </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>
|
||||
* <ul>
|
||||
* <li>The resulting value for these property will be stored in the
|
||||
@ -1974,6 +1978,7 @@ public class LogManager {
|
||||
* </ul>
|
||||
* </td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* <p>
|
||||
* <em>Example mapper functions:</em>
|
||||
|
@ -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.
|
||||
*
|
||||
* 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.
|
||||
* If the resource bundle is {@code null}, then the {@code msg} string is not
|
||||
* localized.
|
||||
* <p>
|
||||
*
|
||||
* @param level One of the message level identifiers, e.g., {@code SEVERE}
|
||||
* @param bundle Resource bundle to localize {@code msg};
|
||||
* can be {@code null}.
|
||||
@ -1614,7 +1614,7 @@ public class Logger {
|
||||
* processed specially by output {@code Formatter} objects and is not treated
|
||||
* as a formatting parameter to the {@code LogRecord} {@code message}
|
||||
* property.
|
||||
* <p>
|
||||
*
|
||||
* @param level One of the message level identifiers, e.g., {@code SEVERE}
|
||||
* @param bundle Resource bundle to localize {@code msg};
|
||||
* can be {@code null}.
|
||||
|
@ -41,7 +41,7 @@ import jdk.internal.logger.SurrogateLogger;
|
||||
* The {@code SimpleFormatter} is initialized with the
|
||||
* <a href="../Formatter.html#syntax">format string</a>
|
||||
* 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
|
||||
* in the {@linkplain LogManager#getProperty logging properties}
|
||||
* configuration file
|
||||
|
@ -28,7 +28,6 @@ package sun.rmi.registry;
|
||||
import java.io.ObjectInputFilter;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.rmi.server.LogStream;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.Security;
|
||||
import java.util.ArrayList;
|
||||
@ -58,6 +57,7 @@ import java.security.Permissions;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import sun.rmi.runtime.Log;
|
||||
import sun.rmi.server.UnicastRef;
|
||||
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;
|
||||
|
||||
/** 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"}
|
||||
@ -130,7 +130,7 @@ public class RegistryImpl extends java.rmi.server.RemoteServer
|
||||
props = Security.getProperty(REGISTRY_FILTER_PROPNAME);
|
||||
}
|
||||
if (props != null) {
|
||||
filter = ObjectInputFilter.Config.createFilter(props);
|
||||
filter = SharedSecrets.getJavaObjectInputFilterAccess().createFilter2(props);
|
||||
Log regLog = Log.getLog("sun.rmi.registry", "registry", -1);
|
||||
if (regLog.isLoggable(Log.BRIEF)) {
|
||||
regLog.log(Log.BRIEF, "registryFilter = " + filter);
|
||||
@ -451,17 +451,10 @@ public class RegistryImpl extends java.rmi.server.RemoteServer
|
||||
Class<?> clazz = filterInfo.serialClass();
|
||||
if (clazz != null) {
|
||||
if (clazz.isArray()) {
|
||||
if (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > REGISTRY_MAX_ARRAY_SIZE) {
|
||||
return ObjectInputFilter.Status.REJECTED;
|
||||
}
|
||||
do {
|
||||
// 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;
|
||||
// Arrays are REJECTED only if they exceed the limit
|
||||
return (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > REGISTRY_MAX_ARRAY_SIZE)
|
||||
? ObjectInputFilter.Status.REJECTED
|
||||
: ObjectInputFilter.Status.UNDECIDED;
|
||||
}
|
||||
if (String.class == clazz
|
||||
|| java.lang.Number.class.isAssignableFrom(clazz)
|
||||
|
85
jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AbstractAsyncSSLConnection.java
Normal file
85
jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AbstractAsyncSSLConnection.java
Normal 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.");
|
||||
}
|
||||
|
||||
}
|
@ -35,14 +35,12 @@ import java.util.function.Supplier;
|
||||
import javax.net.ssl.SSLEngine;
|
||||
|
||||
import jdk.incubator.http.internal.common.ByteBufferReference;
|
||||
import jdk.incubator.http.internal.common.ExceptionallyCloseable;
|
||||
import jdk.incubator.http.internal.common.Utils;
|
||||
|
||||
/**
|
||||
* Asynchronous version of SSLConnection.
|
||||
*/
|
||||
class AsyncSSLConnection extends HttpConnection
|
||||
implements AsyncConnection, ExceptionallyCloseable {
|
||||
class AsyncSSLConnection extends AbstractAsyncSSLConnection {
|
||||
|
||||
final AsyncSSLDelegate sslDelegate;
|
||||
final PlainHttpConnection plainConnection;
|
||||
@ -61,15 +59,14 @@ class AsyncSSLConnection extends HttpConnection
|
||||
plainConnection.configureMode(mode);
|
||||
}
|
||||
|
||||
private CompletableFuture<Void> configureModeAsync(Void ignore) {
|
||||
CompletableFuture<Void> cf = new CompletableFuture<>();
|
||||
try {
|
||||
configureMode(Mode.ASYNC);
|
||||
cf.complete(null);
|
||||
} catch (Throwable t) {
|
||||
cf.completeExceptionally(t);
|
||||
}
|
||||
return cf;
|
||||
@Override
|
||||
PlainHttpConnection plainConnection() {
|
||||
return plainConnection;
|
||||
}
|
||||
|
||||
@Override
|
||||
AsyncSSLDelegate sslDelegate() {
|
||||
return sslDelegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -91,11 +88,6 @@ class AsyncSSLConnection extends HttpConnection
|
||||
return plainConnection.connected() && sslDelegate.connected();
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isSecure() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isProxied() {
|
||||
return false;
|
||||
@ -172,6 +164,7 @@ class AsyncSSLConnection extends HttpConnection
|
||||
plainConnection.channel().shutdownOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
SSLEngine getEngine() {
|
||||
return sslDelegate.getEngine();
|
||||
}
|
||||
@ -184,18 +177,6 @@ class AsyncSSLConnection extends HttpConnection
|
||||
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
|
||||
public void startReading() {
|
||||
plainConnection.startReading();
|
||||
@ -206,4 +187,9 @@ class AsyncSSLConnection extends HttpConnection
|
||||
public void stopAsyncReading() {
|
||||
plainConnection.stopAsyncReading();
|
||||
}
|
||||
|
||||
@Override
|
||||
SSLConnection downgrade() {
|
||||
return new SSLConnection(this);
|
||||
}
|
||||
}
|
||||
|
206
jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLTunnelConnection.java
Normal file
206
jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLTunnelConnection.java
Normal 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);
|
||||
}
|
||||
}
|
@ -82,9 +82,9 @@ abstract class ExchangeImpl<T> {
|
||||
c = c2.getConnectionFor(request);
|
||||
} catch (Http2Connection.ALPNException e) {
|
||||
// failed to negotiate "h2"
|
||||
AsyncSSLConnection as = e.getConnection();
|
||||
AbstractAsyncSSLConnection as = e.getConnection();
|
||||
as.stopAsyncReading();
|
||||
SSLConnection sslc = new SSLConnection(as);
|
||||
HttpConnection sslc = as.downgrade();
|
||||
ExchangeImpl<U> ex = new Http1Exchange<>(exchange, sslc);
|
||||
return ex;
|
||||
}
|
||||
|
@ -211,12 +211,13 @@ class Http2Connection {
|
||||
this.hpackIn = new Decoder(clientSettings.getParameter(HEADER_TABLE_SIZE));
|
||||
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
|
||||
* that initiated the connection, whose response will be delivered
|
||||
* on a Stream.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Case 1) Create from upgraded HTTP/1.1 connection.
|
||||
* Is ready to use. Will not be SSL. exchange is the Exchange
|
||||
* that initiated the connection, whose response will be delivered
|
||||
* on a Stream.
|
||||
*/
|
||||
Http2Connection(HttpConnection connection,
|
||||
Http2ClientImpl client2,
|
||||
Exchange<?> exchange,
|
||||
@ -280,7 +281,7 @@ class Http2Connection {
|
||||
* Throws an IOException if h2 was not negotiated
|
||||
*/
|
||||
private void checkSSLConfig() throws IOException {
|
||||
AsyncSSLConnection aconn = (AsyncSSLConnection)connection;
|
||||
AbstractAsyncSSLConnection aconn = (AbstractAsyncSSLConnection)connection;
|
||||
SSLEngine engine = aconn.getEngine();
|
||||
String alpn = engine.getApplicationProtocol();
|
||||
if (alpn == null || !alpn.equals("h2")) {
|
||||
@ -906,14 +907,14 @@ class Http2Connection {
|
||||
*/
|
||||
static final class ALPNException extends IOException {
|
||||
private static final long serialVersionUID = 23138275393635783L;
|
||||
final AsyncSSLConnection connection;
|
||||
final AbstractAsyncSSLConnection connection;
|
||||
|
||||
ALPNException(String msg, AsyncSSLConnection connection) {
|
||||
ALPNException(String msg, AbstractAsyncSSLConnection connection) {
|
||||
super(msg);
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
AsyncSSLConnection getConnection() {
|
||||
AbstractAsyncSSLConnection getConnection() {
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ import java.nio.channels.SocketChannel;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import jdk.incubator.http.internal.common.ByteBufferReference;
|
||||
import jdk.incubator.http.internal.common.Utils;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
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) {
|
||||
return new SSLConnection(addr, client, alpn);
|
||||
} else {
|
||||
@ -154,6 +157,12 @@ abstract class HttpConnection implements Closeable {
|
||||
{
|
||||
HttpConnection c = null;
|
||||
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();
|
||||
ConnectionPool pool = client.connectionPool();
|
||||
String[] alpn = null;
|
||||
|
@ -34,12 +34,15 @@ 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;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
protected final InetSocketAddress proxyAddr;
|
||||
@ -116,17 +119,17 @@ class PlainTunnelingConnection extends HttpConnection {
|
||||
}
|
||||
|
||||
@Override
|
||||
void writeAsync(ByteBufferReference[] buffers) throws IOException {
|
||||
public void writeAsync(ByteBufferReference[] buffers) throws IOException {
|
||||
delegate.writeAsync(buffers);
|
||||
}
|
||||
|
||||
@Override
|
||||
void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
|
||||
public void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
|
||||
delegate.writeAsyncUnordered(buffers);
|
||||
}
|
||||
|
||||
@Override
|
||||
void flushAsync() throws IOException {
|
||||
public void flushAsync() throws IOException {
|
||||
delegate.flushAsync();
|
||||
}
|
||||
|
||||
@ -165,4 +168,32 @@ class PlainTunnelingConnection extends HttpConnection {
|
||||
boolean isProxied() {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -77,8 +77,8 @@ class SSLConnection extends HttpConnection {
|
||||
*/
|
||||
SSLConnection(AsyncSSLConnection c) {
|
||||
super(c.address, c.client);
|
||||
this.delegate = c.plainConnection;
|
||||
AsyncSSLDelegate adel = c.sslDelegate;
|
||||
this.delegate = c.plainConnection();
|
||||
AsyncSSLDelegate adel = c.sslDelegate();
|
||||
this.sslDelegate = new SSLDelegate(adel.engine, delegate.channel(), client, adel.serverName);
|
||||
this.alpn = adel.alpn;
|
||||
this.serverName = adel.serverName;
|
||||
|
@ -85,6 +85,19 @@ class SSLTunnelConnection extends HttpConnection {
|
||||
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
|
||||
SSLParameters sslParameters() {
|
||||
return sslDelegate.getSSLParameters();
|
||||
|
@ -1088,8 +1088,12 @@ public class Main {
|
||||
|
||||
private String withWeak(PublicKey key) {
|
||||
if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
|
||||
return String.format(
|
||||
rb.getString("key.bit"), KeyUtil.getKeySize(key));
|
||||
int kLen = KeyUtil.getKeySize(key);
|
||||
if (kLen >= 0) {
|
||||
return String.format(rb.getString("key.bit"), kLen);
|
||||
} else {
|
||||
return rb.getString("unknown.size");
|
||||
}
|
||||
} else {
|
||||
seeWeak = true;
|
||||
return String.format(
|
||||
|
@ -164,6 +164,7 @@ public class Resources extends java.util.ListResourceBundle {
|
||||
{"with.weak", "%s (weak)"},
|
||||
{"key.bit", "%d-bit key"},
|
||||
{"key.bit.weak", "%d-bit key (weak)"},
|
||||
{"unknown.size", "unknown size"},
|
||||
|
||||
{"jarsigner.", "jarsigner: "},
|
||||
{"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.",
|
||||
|
@ -28,7 +28,6 @@ package com.sun.jdi;
|
||||
/**
|
||||
* Thrown to indicate that the requested module is invalid
|
||||
* or became invalid after the module was unloaded.
|
||||
* <p>
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
|
@ -40,17 +40,20 @@ package com.sun.jdi;
|
||||
* permission allows, and discusses the risks of granting code the
|
||||
* permission.
|
||||
*
|
||||
* <table class="plain">
|
||||
* <table class="striped">
|
||||
* <caption style="display:none">Table shows permission target name, what the
|
||||
* permission allows, and associated risks</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th>Permission Target Name</th>
|
||||
* <th>What the Permission Allows</th>
|
||||
* <th>Risks of Allowing this Permission</th>
|
||||
* <th scope="col">Permission Target Name</th>
|
||||
* <th scope="col">What the Permission Allows</th>
|
||||
* <th scope="col">Risks of Allowing this Permission</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
*
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <td>virtualMachineManager</td>
|
||||
* <th scope="row">virtualMachineManager</th>
|
||||
* <td>Ability to inspect and modify the JDI objects in the
|
||||
* {@code VirtualMachineManager}
|
||||
* </td>
|
||||
@ -59,6 +62,7 @@ package com.sun.jdi;
|
||||
* misbehave.
|
||||
* </td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
*
|
||||
* </table>
|
||||
*
|
||||
|
@ -43,79 +43,86 @@ package com.sun.jdi;
|
||||
* {@link ArrayType#componentType()}
|
||||
* </BLOCKQUOTE>
|
||||
* <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 --
|
||||
* <TABLE BORDER="1">
|
||||
* <CAPTION style="display:none">Maps each type declared in target to a mirrored
|
||||
* instance of a subinterface of PrimitiveType or ReferenceType"</CAPTION>
|
||||
* <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>
|
||||
* <TABLE class="plain">
|
||||
* <CAPTION>Subinterfaces of {@link PrimitiveType}</CAPTION>
|
||||
* <THEAD style="background-color:#EEEEFF; text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>boolean</CODE></TD>
|
||||
* <TD headers="primtype mirrored"> {@link BooleanType}</TD>
|
||||
* <TH scope="col" style="width:25em">Type declared in target as</TH>
|
||||
* <TH scope="col" style="width:20em">Is mirrored as an instance of</TH>
|
||||
* </THEAD>
|
||||
* <TBODY style="text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>byte</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link ByteType}</TD>
|
||||
* <TH scope="row"><CODE>boolean</CODE></TH>
|
||||
* <TD> {@link BooleanType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>char</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link CharType}</TD>
|
||||
* <TH scope="row"><CODE>byte</CODE></TH>
|
||||
* <TD>{@link ByteType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>double</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link DoubleType}</TD>
|
||||
* <TH scope="row"><CODE>char</CODE></TH>
|
||||
* <TD>{@link CharType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>float</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link FloatType}</TD>
|
||||
* <TH scope="row"><CODE>double</CODE></TH>
|
||||
* <TD>{@link DoubleType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>int</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link IntegerType}</TD>
|
||||
* <TH scope="row"><CODE>float</CODE></TH>
|
||||
* <TD>{@link FloatType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>long</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link LongType}</TD>
|
||||
* <TH scope="row"><CODE>int</CODE></TH>
|
||||
* <TD>{@link IntegerType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>short</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link ShortType}</TD>
|
||||
* <TH scope="row"><CODE>long</CODE></TH>
|
||||
* <TD>{@link LongType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primtype declared" colspan=2><CODE>void</CODE></TD>
|
||||
* <TD headers="primtype mirrored">{@link VoidType}</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>
|
||||
* <TH scope="row"><CODE>short</CODE></TH>
|
||||
* <TD>{@link ShortType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="reftype declared2"><I>a class</I></TD>
|
||||
* <TD headers="reftype example2"><CODE>Date</CODE></TD>
|
||||
* <TD headers="reftype mirrored2">{@link ClassType}</TD>
|
||||
* <TH scope="row"><CODE>void</CODE></TH>
|
||||
* <TD>{@link VoidType}</TD>
|
||||
* </TBODY>
|
||||
* </TABLE>
|
||||
*
|
||||
* <TABLE class="plain">
|
||||
* <CAPTION>Subinterfaces of {@link ReferenceType}</CAPTION>
|
||||
* <THEAD style="background-color:#EEEEFF; text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="reftype declared2"><I>an interface</I></TD>
|
||||
* <TD headers="reftype example2"><CODE>Runnable</CODE></TD>
|
||||
* <TD headers="reftype mirrored2">{@link InterfaceType}</TD>
|
||||
* <TH scope="col" style="width:15em">Type declared in target as</TH>
|
||||
* <TH scope="col" style="width:10em">For example</TH>
|
||||
* <TH scope="col" style="width:20em">Is mirrored as an instance of</TH>
|
||||
* </THEAD>
|
||||
* <TBODY style="text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="reftype declared2"><I>an array</I></TD>
|
||||
* <TD headers="reftype example2"> </TD>
|
||||
* <TD headers="reftype mirrored2">{@link ArrayType}</TD>
|
||||
* <TH scope="row"><I>a class</I></TH>
|
||||
* <TH scope="row"><CODE>Date</CODE></TH>
|
||||
* <TD>{@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="reftype declared2"><I>an array</I></TD>
|
||||
* <TD headers="reftype example2"><CODE>int[]</CODE></TD>
|
||||
* <TD headers="reftype mirrored2">{@link ArrayType} whose
|
||||
* <TH scope="row"><I>an interface</I></TH>
|
||||
* <TH scope="row"><CODE>Runnable</CODE></TH>
|
||||
* <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 IntegerType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="reftype declared2"><I>an array</I></TD>
|
||||
* <TD headers="reftype example2"><CODE>Date[]</CODE></TD>
|
||||
* <TD headers="reftype mirrored2">{@link ArrayType} whose
|
||||
* <!--<TH scope="row"><I>an array</I></TH>-->
|
||||
* <TH scope="row"><CODE>Date[]</CODE></TH>
|
||||
* <TD>{@link ArrayType} whose
|
||||
* {@link ArrayType#componentType() componentType()} is
|
||||
* {@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="reftype declared2"><I>an array</I></TD>
|
||||
* <TD headers="reftype example2"><CODE>Runnable[]</CODE></TD>
|
||||
* <TD headers="reftype mirrored2">{@link ArrayType} whose
|
||||
* <!--<TH scope="row"><I>an array</I></TH>-->
|
||||
* <TH scope="row"><CODE>Runnable[]</CODE></TH>
|
||||
* <TD>{@link ArrayType} whose
|
||||
* {@link ArrayType#componentType() componentType()} is
|
||||
* {@link InterfaceType}</TD>
|
||||
* </TBODY>
|
||||
* </TABLE>
|
||||
*
|
||||
* @see PrimitiveType Subinterface PrimitiveType
|
||||
|
@ -33,7 +33,7 @@ import com.sun.jdi.event.ModificationWatchpointEvent;
|
||||
* value hierarchy encompassing primitive values and object values.
|
||||
* <P>
|
||||
* Some examples of where values may be accessed:
|
||||
* <BLOCKQUOTE><TABLE><CAPTION style="display:none">layout</CAPTION>
|
||||
* <BLOCKQUOTE><TABLE role="presentation">
|
||||
* <TR>
|
||||
* <TD>{@link ObjectReference#getValue(Field)
|
||||
* ObjectReference.getValue(Field)}
|
||||
@ -52,117 +52,130 @@ import com.sun.jdi.event.ModificationWatchpointEvent;
|
||||
* <TD>- returned with an event
|
||||
* </TABLE></BLOCKQUOTE>
|
||||
* <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 --
|
||||
* <TABLE BORDER="1">
|
||||
* <CAPTION style="display:none">Maps each kind of value to a mirrored
|
||||
* instance of a subinterface of Value</CAPTION>
|
||||
* <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>
|
||||
* <TABLE class="plain">
|
||||
* <CAPTION>Subinterfaces of {@link PrimitiveValue}</CAPTION>
|
||||
* <THEAD style="background-color:#EEEEFF; text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a boolean</TD>
|
||||
* <TD headers="primval example"> {@code true}</TD>
|
||||
* <TD headers="primval mirrored"> {@link BooleanValue}</TD>
|
||||
* <TD headers="primval type"> {@link BooleanType}</TD>
|
||||
* <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 an<br>instance of</TH>
|
||||
* <TH scope="col" style="width:15em">{@link Type} of value<br>{@link #type() Value.type()}</TH>
|
||||
* </THEAD>
|
||||
* <TBODY style="text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a byte</TD>
|
||||
* <TD headers="primval example"> {@code (byte)4}</TD>
|
||||
* <TD headers="primval mirrored"> {@link ByteValue}</TD>
|
||||
* <TD headers="primval type"> {@link ByteType}</TD>
|
||||
* <TH scope="row">a boolean</TH>
|
||||
* <TD>{@code true}</TD>
|
||||
* <TD>{@link BooleanValue}</TD>
|
||||
* <TD>{@link BooleanType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a char</TD>
|
||||
* <TD headers="primval example"> {@code 'a'}</TD>
|
||||
* <TD headers="primval mirrored"> {@link CharValue}</TD>
|
||||
* <TD headers="primval type"> {@link CharType}</TD>
|
||||
* <TH scope="row">a byte</TH>
|
||||
* <TD>{@code (byte)4}</TD>
|
||||
* <TD>{@link ByteValue}</TD>
|
||||
* <TD>{@link ByteType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a double</TD>
|
||||
* <TD headers="primval example"> {@code 3.1415926}</TD>
|
||||
* <TD headers="primval mirrored"> {@link DoubleValue}</TD>
|
||||
* <TD headers="primval type"> {@link DoubleType}</TD>
|
||||
* <TH scope="row">a char</TH>
|
||||
* <TD>{@code 'a'}</TD>
|
||||
* <TD>{@link CharValue}</TD>
|
||||
* <TD>{@link CharType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a float</TD>
|
||||
* <TD headers="primval example"> {@code 2.5f}</TD>
|
||||
* <TD headers="primval mirrored"> {@link FloatValue}</TD>
|
||||
* <TD headers="primval type"> {@link FloatType}</TD>
|
||||
* <TH scope="row">a double</TH>
|
||||
* <TD>{@code 3.1415926}</TD>
|
||||
* <TD>{@link DoubleValue}</TD>
|
||||
* <TD>{@link DoubleType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> an int</TD>
|
||||
* <TD headers="primval example"> {@code 22}</TD>
|
||||
* <TD headers="primval mirrored"> {@link IntegerValue}</TD>
|
||||
* <TD headers="primval type"> {@link IntegerType}</TD>
|
||||
* <TH scope="row">a float</TH>
|
||||
* <TD>{@code 2.5f}</TD>
|
||||
* <TD>{@link FloatValue}</TD>
|
||||
* <TD>{@link FloatType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a long</TD>
|
||||
* <TD headers="primval example"> {@code 1024L}</TD>
|
||||
* <TD headers="primval mirrored"> {@link LongValue}</TD>
|
||||
* <TD headers="primval type"> {@link LongType}</TD>
|
||||
* <TH scope="row">an int</TH>
|
||||
* <TD>{@code 22}</TD>
|
||||
* <TD>{@link IntegerValue}</TD>
|
||||
* <TD>{@link IntegerType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a short</TD>
|
||||
* <TD headers="primval example"> {@code (short)12}</TD>
|
||||
* <TD headers="primval mirrored"> {@link ShortValue}</TD>
|
||||
* <TD headers="primval type"> {@link ShortType}</TD>
|
||||
* <TH scope="row">a long</TH>
|
||||
* <TD>{@code 1024L}</TD>
|
||||
* <TD>{@link LongValue}</TD>
|
||||
* <TD>{@link LongType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="primval kind"> a void</TD>
|
||||
* <TD headers="primval example"> </TD>
|
||||
* <TD headers="primval mirrored"> {@link VoidValue}</TD>
|
||||
* <TD headers="primval type"> {@link VoidType}</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>
|
||||
* <TH scope="row">a short</TH>
|
||||
* <TD>{@code (short)12}</TD>
|
||||
* <TD>{@link ShortValue}</TD>
|
||||
* <TD>{@link ShortType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="objref kind2"> a class instance</TD>
|
||||
* <TD headers="objref example2"> {@code this}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link ObjectReference}</TD>
|
||||
* <TD headers="objref type2"> {@link ClassType}</TD>
|
||||
* <TH scope="row">a void</TH>
|
||||
* <TD></TD>
|
||||
* <TD>{@link VoidValue}</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>
|
||||
* <TD headers="objref kind2"> an array</TD>
|
||||
* <TD headers="objref example2"> {@code new int[5]}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link ArrayReference}</TD>
|
||||
* <TD headers="objref type2"> {@link ArrayType}</TD>
|
||||
* <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 an<br>instance of</TH>
|
||||
* <TH scope="col" style="width:15em">{@link Type} of value<br>{@link #type() Value.type()}</TH>
|
||||
* </THEAD>
|
||||
* <TBODY style="text-align:left">
|
||||
* <TR>
|
||||
* <TD headers="objref kind2"> a string</TD>
|
||||
* <TD headers="objref example2"> {@code "hello"}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link StringReference}</TD>
|
||||
* <TD headers="objref type2"> {@link ClassType}</TD>
|
||||
* <TH scope="row">a class instance</TH>
|
||||
* <TD>{@code this}</TD>
|
||||
* <TD>{@link ObjectReference}</TD>
|
||||
* <TD>{@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="objref kind2"> a thread</TD>
|
||||
* <TD headers="objref example2"> {@code Thread.currentThread()}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link ThreadReference}</TD>
|
||||
* <TD headers="objref type2"> {@link ClassType}</TD>
|
||||
* <TH scope="row">an array</TH>
|
||||
* <TD>{@code new int[5]}</TD>
|
||||
* <TD>{@link ArrayReference}</TD>
|
||||
* <TD>{@link ArrayType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="objref kind2"> a thread group</TD>
|
||||
* <TD headers="objref example2"> {@code Thread.currentThread()}<br> {@code .getThreadGroup()}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link ThreadGroupReference}</TD>
|
||||
* <TD headers="objref type2"> {@link ClassType}</TD>
|
||||
* <TH scope="row">a string</TH>
|
||||
* <TD>{@code "hello"}</TD>
|
||||
* <TD>{@link StringReference}</TD>
|
||||
* <TD>{@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="objref kind2"> a {@code java.lang.Class}<br>instance</TD>
|
||||
* <TD headers="objref example2"> {@code this.getClass()}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link ClassObjectReference}</TD>
|
||||
* <TD headers="objref type2"> {@link ClassType}</TD>
|
||||
* <TH scope="row">a thread</TH>
|
||||
* <TD>{@code Thread.currentThread()}</TD>
|
||||
* <TD>{@link ThreadReference}</TD>
|
||||
* <TD>{@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="objref kind2"> a class loader</TD>
|
||||
* <TD headers="objref example2"> {@code this.getClass()}<br> {@code .getClassLoader()}</TD>
|
||||
* <TD headers="objref mirrored2"> {@link ClassLoaderReference}</TD>
|
||||
* <TD headers="objref type2"> {@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>
|
||||
* <TH scope="row">a thread group</TH>
|
||||
* <TD>{@code Thread.currentThread()}<br> {@code .getThreadGroup()}</TD>
|
||||
* <TD>{@link ThreadGroupReference}</TD>
|
||||
* <TD>{@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TD headers="other kind3"> null</TD>
|
||||
* <TD headers="other example3"> {@code null}</TD>
|
||||
* <TD headers="other mirrored3"> {@code null}</TD>
|
||||
* <TD headers="other type3"> n/a</TD>
|
||||
* <TH scope="row">a {@code java.lang.Class}<br>instance</TH>
|
||||
* <TD>{@code this.getClass()}</TD>
|
||||
* <TD>{@link ClassObjectReference}</TD>
|
||||
* <TD>{@link ClassType}</TD>
|
||||
* <TR>
|
||||
* <TH scope="row">a class loader</TH>
|
||||
* <TD>{@code this.getClass()}<br> {@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>
|
||||
*
|
||||
* @author Robert Field
|
||||
|
@ -59,13 +59,16 @@ import com.sun.jdi.event.VMStartEvent;
|
||||
* Some {@link Connector} implementations may require slightly
|
||||
* 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>
|
||||
* <THEAD>
|
||||
* <TR>
|
||||
* <TH scope=col>Scenario</TH>
|
||||
* <TH scope=col>Description</TH>
|
||||
* <TH scope="col">Scenario</TH>
|
||||
* <TH scope="col">Description</TH>
|
||||
* </THEAD>
|
||||
* <TBODY>
|
||||
* <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)}
|
||||
* method of the default connector, obtained with {@link #defaultConnector}. The
|
||||
@ -86,7 +89,7 @@ import com.sun.jdi.event.VMStartEvent;
|
||||
* </TD>
|
||||
* </TR>
|
||||
* <TR>
|
||||
* <TD>Debugger attaches to previously-running VM</TD>
|
||||
* <TH scope="row">Debugger attaches to previously-running VM</TH>
|
||||
* <TD>
|
||||
* <UL>
|
||||
* <LI>
|
||||
@ -113,7 +116,7 @@ import com.sun.jdi.event.VMStartEvent;
|
||||
* </TR>
|
||||
*
|
||||
* <TR>
|
||||
* <TD>Target VM attaches to previously-running debugger</TD>
|
||||
* <TH scope="row">Target VM attaches to previously-running debugger</TH>
|
||||
* <TD>
|
||||
* <UL>
|
||||
* <LI>
|
||||
@ -146,7 +149,7 @@ import com.sun.jdi.event.VMStartEvent;
|
||||
* </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>
|
||||
* <UL>
|
||||
* <LI>
|
||||
|
@ -1,34 +1,42 @@
|
||||
<!DOCTYPE HTML>
|
||||
<HTML>
|
||||
<HTML lang="EN">
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
JDI Type Signatures
|
||||
</TITLE>
|
||||
<META charset="UTF-8">
|
||||
<STYLE type="text/css">
|
||||
tbody th { font-weight: normal }
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY style="background-color:white">
|
||||
<dl><dd>
|
||||
<Table Border="0">
|
||||
<caption><font size=5><b>JDI Type Signatures</b></font></caption>
|
||||
<tr><th>Type Signature
|
||||
<th>Java Type
|
||||
<tr><td>Z<td>boolean
|
||||
<tr><td>B<td>byte
|
||||
<tr><td>C<td>char
|
||||
<tr><td>S<td>short
|
||||
<tr><td>I<td>int
|
||||
<tr><td>J<td>long
|
||||
<tr><td>F<td>float
|
||||
<tr><td>D<td>double
|
||||
<tr><td><strong>L</strong> <em>fully-qualified-class</em>
|
||||
<caption style="font-size:x-large"><b>JDI Type Signatures</b></caption>
|
||||
<thead>
|
||||
<tr><th scope="col">Type Signature
|
||||
<th scope="col">Java Type
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th scope="row">Z<td>boolean
|
||||
<tr><th scope="row">B<td>byte
|
||||
<tr><th scope="row">C<td>char
|
||||
<tr><th scope="row">S<td>short
|
||||
<tr><th scope="row">I<td>int
|
||||
<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>
|
||||
<td>fully-qualified-class
|
||||
<tr><td><strong>[</strong> <em>type
|
||||
<tr><th scope="row"><strong>[</strong> <em>type
|
||||
</em>
|
||||
<td><em>type</em>[]
|
||||
<tr><td>
|
||||
<tr><th scope="row">
|
||||
<strong>(</strong> <em>arg-types </em><strong>)</strong> <em>ret-type
|
||||
</em>
|
||||
<td>method type (including constructors)
|
||||
</tbody>
|
||||
</Table>
|
||||
</dd></dl>
|
||||
<p>For example, the Java method:
|
||||
|
@ -106,13 +106,24 @@ class ZipUtils {
|
||||
* Converts DOS time to Java time (number of milliseconds since epoch).
|
||||
*/
|
||||
public static long dosToJavaTime(long dtime) {
|
||||
LocalDateTime ldt = LocalDateTime.of(
|
||||
(int) (((dtime >> 25) & 0x7f) + 1980),
|
||||
(int) ((dtime >> 21) & 0x0f),
|
||||
(int) ((dtime >> 16) & 0x1f),
|
||||
(int) ((dtime >> 11) & 0x1f),
|
||||
(int) ((dtime >> 5) & 0x3f),
|
||||
(int) ((dtime << 1) & 0x3e));
|
||||
int year;
|
||||
int month;
|
||||
int day;
|
||||
int hour = (int) ((dtime >> 11) & 0x1f);
|
||||
int minute = (int) ((dtime >> 5) & 0x3f);
|
||||
int second = (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(
|
||||
ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
|
||||
}
|
||||
|
@ -10,9 +10,11 @@
|
||||
# randomness tests.
|
||||
#
|
||||
# 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
|
||||
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
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,8 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8007267
|
||||
* @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
|
||||
* @requires (os.family == "mac")
|
||||
|
@ -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.
|
||||
*
|
||||
* 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
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8158325
|
||||
* @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
|
||||
* @requires (os.family == "mac")
|
||||
* @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
|
||||
*/
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,8 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8144594
|
||||
* @summary HiDPI: awt.Choice looks improperly (Win 8)
|
||||
* @run main ChoiceTest
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,7 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8157827
|
||||
* @summary AWT_Desktop/Automated/Exceptions/BasicTest loads incorrect GTK
|
||||
* version when jdk.gtk.version=3
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -30,11 +30,13 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8043705
|
||||
* @summary Can't exit color chooser dialog when running as an applet
|
||||
* @modules java.desktop/sun.awt
|
||||
* @run main CloseDialogTest
|
||||
*/
|
||||
|
||||
public class CloseDialogTest {
|
||||
|
||||
private static volatile Frame frame;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,17 +21,19 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test 8155740
|
||||
@summary See <rdar://problem/3429130>: Events: actionPerformed() method not
|
||||
called when it is button is clicked (system load related)
|
||||
@summary com.apple.junit.java.awt.Frame
|
||||
@library ../../../regtesthelpers
|
||||
@build VisibilityValidator
|
||||
@build Util
|
||||
@build Waypoint
|
||||
@run main NestedModalDialogTest
|
||||
/**
|
||||
* @test 8155740
|
||||
* @key headful
|
||||
* @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
|
||||
* called when it is button is clicked (system load related)
|
||||
* @summary com.apple.junit.java.awt.Frame
|
||||
* @library ../../../regtesthelpers
|
||||
* @build VisibilityValidator
|
||||
* @build Util
|
||||
* @build Waypoint
|
||||
* @run main NestedModalDialogTest
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// NestedModalDialogTest.java
|
||||
// The test launches a parent frame. From this parent frame it launches a modal
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,17 +21,19 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test 8155740
|
||||
@summary See <rdar://problem/3429130>: Events: actionPerformed() method not
|
||||
called when it is button is clicked (system load related)
|
||||
@summary com.apple.junit.java.awt.Frame
|
||||
@library ../../../regtesthelpers
|
||||
@build VisibilityValidator
|
||||
@build Util
|
||||
@build Waypoint
|
||||
@run main NestedModelessDialogTest
|
||||
/**
|
||||
* @test 8155740
|
||||
* @key headful
|
||||
* @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
|
||||
* called when it is button is clicked (system load related)
|
||||
* @summary com.apple.junit.java.awt.Frame
|
||||
* @library ../../../regtesthelpers
|
||||
* @build VisibilityValidator
|
||||
* @build Util
|
||||
* @build Waypoint
|
||||
* @run main NestedModelessDialogTest -Xlog:exception
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// NestedModelessDialogTest.java
|
||||
// The test launches a parent frame. From this parent frame it launches a modal
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,24 +21,20 @@
|
||||
* 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
|
||||
*
|
||||
* summary: switching user in XP causes an NPE in
|
||||
* sun.awt.windows.WWindowPeer.displayChanged
|
||||
* @test
|
||||
* @key headful
|
||||
* @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
|
||||
*/
|
||||
|
||||
import java.awt.Frame;
|
||||
import java.awt.Dialog;
|
||||
import java.awt.TextArea;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,22 +21,19 @@
|
||||
* 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
|
||||
*
|
||||
* summary: grab problems with EmbeddedFrame
|
||||
* @test
|
||||
* @key headful
|
||||
* @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.peer.FramePeer;
|
||||
import javax.swing.JComboBox;
|
||||
|
@ -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.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
<HTML>
|
||||
<!-- @test
|
||||
@key headful
|
||||
@bug 4023283
|
||||
@summary Checks that an Error which propogate up to the EventDispatch
|
||||
loop does not crash AWT.
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,11 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
@bug 6980209
|
||||
@summary Make tracking SecondaryLoop.enter/exit methods easier
|
||||
@author Semyon Sadetsky
|
||||
*/
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 6980209
|
||||
* @summary Make tracking SecondaryLoop.enter/exit methods easier
|
||||
* @author Semyon Sadetsky
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,7 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8157163 8159132
|
||||
* @summary AWT FileDialog does not inherit icon image from parent Frame
|
||||
* @requires os.family=="windows"
|
||||
@ -68,8 +70,8 @@ public class FileDialogIconTest {
|
||||
"owning window. Wrong color: " + color);
|
||||
}
|
||||
} finally {
|
||||
dialog.dispose();
|
||||
frame.dispose();
|
||||
if (dialog != null) { dialog.dispose(); }
|
||||
if (frame != null) { frame.dispose(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,20 +21,21 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 6516675
|
||||
@summary Tests that EmbeddedFrame can be focused.
|
||||
@author anton.tarasov: area=awt-focus
|
||||
@requires (os.family == "windows")
|
||||
@modules java.desktop/java.awt.peer
|
||||
java.desktop/sun.awt
|
||||
java.desktop/sun.awt.windows
|
||||
@library /java/awt/patchlib ../../regtesthelpers
|
||||
@build java.desktop/java.awt.Helper
|
||||
@build Util UtilInternal
|
||||
@run main FocusEmbeddedFrameTest
|
||||
*/
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 6516675
|
||||
* @summary Tests that EmbeddedFrame can be focused.
|
||||
* @author anton.tarasov: area=awt-focus
|
||||
* @requires (os.family == "windows")
|
||||
* @modules java.desktop/java.awt.peer
|
||||
* java.desktop/sun.awt
|
||||
* java.desktop/sun.awt.windows
|
||||
* @library /java/awt/patchlib ../../regtesthelpers
|
||||
* @build java.desktop/java.awt.Helper
|
||||
* @build Util UtilInternal
|
||||
* @run main FocusEmbeddedFrameTest
|
||||
*/
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,13 +21,15 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 8154043 8172509
|
||||
@summary Fields not reachable anymore by tab-key, because of new tabbing
|
||||
behaviour of radio button groups.
|
||||
@run main ButtonGroupLayoutTraversalTest
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8154043 8172509
|
||||
* @summary Fields not reachable anymore by tab-key, because of new tabbing
|
||||
* behaviour of radio button groups.
|
||||
* @run main ButtonGroupLayoutTraversalTest
|
||||
*/
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.GridLayout;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 8154434
|
||||
@summary Open the request focus methods of the java.awt.Component which accept
|
||||
FocusEvent.Cause
|
||||
@run main RequestFocusByCauseTest
|
||||
*/
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8154434
|
||||
* @summary Open the request focus methods of the java.awt.Component which accept
|
||||
* FocusEvent.Cause
|
||||
* @run main RequestFocusByCauseTest
|
||||
*/
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.FocusEvent;
|
||||
@ -148,4 +149,5 @@ public class RequestFocusByCauseTest {
|
||||
frame.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,8 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8064833
|
||||
* @summary Test correct font is obtained via famil+style
|
||||
* @run main HelvLtOblTest
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,8 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8015556
|
||||
* @summary Surrogate pairs do not render properly on MacOS X.
|
||||
*/
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,12 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8158918
|
||||
* @summary setExtendedState(1) for maximized Frame results in state==7
|
||||
* @run main SetExtendedState
|
||||
*/
|
||||
|
||||
import java.awt.Frame;
|
||||
|
||||
public class SetExtendedState {
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,8 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8165619
|
||||
* @summary Frame is not repainted if created in state=MAXIMIZED_BOTH on Unity
|
||||
* @run main DecoratedFrameInsetsTest
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,12 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
@bug 8032078
|
||||
@summary Frame.setExtendedState throws RuntimeException, if
|
||||
windowState=ICONIFIED|MAXIMIZED_BOTH, on OS X
|
||||
@author Anton Litvinov
|
||||
*/
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8032078
|
||||
* @summary Frame.setExtendedState throws RuntimeException, if
|
||||
* windowState=ICONIFIED|MAXIMIZED_BOTH, on OS X
|
||||
* @author Anton Litvinov
|
||||
*/
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -21,7 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8026143
|
||||
* @summary [macosx] Maximized state could be inconsistent between peer and frame
|
||||
* @author Petr Pchelko
|
||||
@ -70,7 +72,7 @@ public class MaximizedByPlatform {
|
||||
throw new RuntimeException("Maximized state was not set for frame in setBounds");
|
||||
}
|
||||
} 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");
|
||||
}
|
||||
} finally {
|
||||
frame.dispose();
|
||||
if (frame != null) frame.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user