Merge
This commit is contained in:
commit
e1ad369695
1
.hgtags
1
.hgtags
@ -441,3 +441,4 @@ e6d70017f5b9adbb2ec82d826973d0251800a3c3 jdk-10+12
|
||||
878e216039322cb3f0ecbd0944642a2b4e2593f3 jdk-10+15
|
||||
4bbea012e5676e8025ade2bcfab4d6581e6e9f4b jdk-10+16
|
||||
7db699468b4f84abbcc01647e5a964409737411a jdk-10+17
|
||||
3739654290616e533fc6f51bf9ad69ed47a6abba jdk-10+18
|
||||
|
@ -440,3 +440,4 @@ a6c830ee8a6798b186730475e700027cdf4598aa jdk-10+15
|
||||
ec4159ebe7050fcc5dcee8a2d150cf948ecc97db jdk-9+178
|
||||
252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179
|
||||
a133a7d1007b1456bc62824382fd8ac93b45d329 jdk-10+17
|
||||
536b81db8075486ca0fe3225d8e59313df5b936c jdk-10+18
|
||||
|
@ -440,3 +440,4 @@ b82b62ed5debda2d98dda597506ef29cf947fbae jdk-10+16
|
||||
9c1e9712648921ae389d623042d22561fad82d75 jdk-9+178
|
||||
24390da83c5ee9e23ceafbcaff4460a01e37bb3a jdk-9+179
|
||||
50ff1fd66362f212a8db6de76089d9d0ffa4df0f jdk-10+17
|
||||
a923b3f30e7bddb4f960059ddfc7978fc63e2e6e jdk-10+18
|
||||
|
@ -600,3 +600,4 @@ c1f3649a3a42f124b418a5a916dbad13d059b757 jdk-10+15
|
||||
9d032191f82fca5ba0aac98682f69c4ff0f1283d jdk-9+178
|
||||
d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179
|
||||
73e2cb8700bfa51304bd4b02f224620859a3f600 jdk-10+17
|
||||
c9d3317623d48da3327232c81e3f8cfc0d29d888 jdk-10+18
|
||||
|
@ -440,3 +440,4 @@ d109d55cf642bf2b438624e81f94c18c168f9178 jdk-10+16
|
||||
0983b2dbe17ba4fed3af34e0512ca77a9845fe8a jdk-9+178
|
||||
87243a3131f79e8b3903eaca6b629abc48f08ace jdk-9+179
|
||||
97d6f14334cfd766f57c296a5a707c8a709aeff0 jdk-10+17
|
||||
7ba7ebbc304a4817e05b72efa6b45ed635839b98 jdk-10+18
|
||||
|
@ -443,3 +443,4 @@ bc8289ce1ed3ed5fff62152ed46da3be0b60b7c3 jdk-10+16
|
||||
d0190aaf1816081d9b2e0577b65b793804896d1e jdk-9+178
|
||||
56ac1831ac5924b5092a53a85d6fc68749501fb8 jdk-9+179
|
||||
4c07d366c2e177edba7aa54c4b015e4dbf12bc83 jdk-10+17
|
||||
6859ffbe2c510c930f88983743578d8186cf6dbd jdk-10+18
|
||||
|
@ -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
|
||||
|
@ -31,6 +31,8 @@ import java.security.InvalidKeyException;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.DESKeySpec;
|
||||
|
||||
import jdk.internal.ref.CleanerFactory;
|
||||
|
||||
/**
|
||||
* This class represents a DES key.
|
||||
*
|
||||
@ -74,6 +76,11 @@ final class DESKey implements SecretKey {
|
||||
this.key = new byte[DESKeySpec.DES_KEY_LEN];
|
||||
System.arraycopy(key, offset, this.key, 0, DESKeySpec.DES_KEY_LEN);
|
||||
DESKeyGenerator.setParityBit(this.key, 0);
|
||||
|
||||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
@ -144,20 +151,4 @@ final class DESKey implements SecretKey {
|
||||
getFormat(),
|
||||
getEncoded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the bytes of this key are
|
||||
* set to zero when there are no more references to it.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
if (this.key != null) {
|
||||
java.util.Arrays.fill(this.key, (byte)0x00);
|
||||
this.key = null;
|
||||
}
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ import java.security.InvalidKeyException;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.DESedeKeySpec;
|
||||
|
||||
import jdk.internal.ref.CleanerFactory;
|
||||
|
||||
/**
|
||||
* This class represents a DES-EDE key.
|
||||
*
|
||||
@ -76,6 +78,11 @@ final class DESedeKey implements SecretKey {
|
||||
DESKeyGenerator.setParityBit(this.key, 0);
|
||||
DESKeyGenerator.setParityBit(this.key, 8);
|
||||
DESKeyGenerator.setParityBit(this.key, 16);
|
||||
|
||||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
@ -145,20 +152,4 @@ final class DESedeKey implements SecretKey {
|
||||
getFormat(),
|
||||
getEncoded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the bytes of this key are
|
||||
* set to zero when there are no more references to it.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
if (this.key != null) {
|
||||
java.util.Arrays.fill(this.key, (byte)0x00);
|
||||
this.key = null;
|
||||
}
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import java.util.Locale;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.PBEKeySpec;
|
||||
|
||||
import jdk.internal.ref.CleanerFactory;
|
||||
|
||||
/**
|
||||
* This class represents a PBE key.
|
||||
*
|
||||
@ -49,7 +51,7 @@ final class PBEKey implements SecretKey {
|
||||
/**
|
||||
* Creates a PBE key from a given PBE key specification.
|
||||
*
|
||||
* @param key the given PBE key specification
|
||||
* @param keytype the given PBE key specification
|
||||
*/
|
||||
PBEKey(PBEKeySpec keySpec, String keytype) throws InvalidKeySpecException {
|
||||
char[] passwd = keySpec.getPassword();
|
||||
@ -70,6 +72,11 @@ final class PBEKey implements SecretKey {
|
||||
this.key[i] = (byte) (passwd[i] & 0x7f);
|
||||
java.util.Arrays.fill(passwd, ' ');
|
||||
type = keytype;
|
||||
|
||||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
@ -140,20 +147,4 @@ final class PBEKey implements SecretKey {
|
||||
getFormat(),
|
||||
getEncoded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the password bytes of this key are
|
||||
* set to zero when there are no more references to it.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
if (this.key != null) {
|
||||
java.util.Arrays.fill(this.key, (byte)0x00);
|
||||
this.key = null;
|
||||
}
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ import javax.crypto.Mac;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.PBEKeySpec;
|
||||
|
||||
import jdk.internal.ref.CleanerFactory;
|
||||
|
||||
/**
|
||||
* This class represents a PBE key derived using PBKDF2 defined
|
||||
* in PKCS#5 v2.0. meaning that
|
||||
@ -76,7 +78,8 @@ final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey {
|
||||
/**
|
||||
* Creates a PBE key from a given PBE key specification.
|
||||
*
|
||||
* @param key the given PBE key specification
|
||||
* @param keySpec the given PBE key specification
|
||||
* @param prfAlgo the given PBE key algorithm
|
||||
*/
|
||||
PBKDF2KeyImpl(PBEKeySpec keySpec, String prfAlgo)
|
||||
throws InvalidKeySpecException {
|
||||
@ -120,6 +123,15 @@ final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey {
|
||||
throw ike;
|
||||
}
|
||||
this.key = deriveKey(prf, passwdBytes, salt, iterCount, keyLength);
|
||||
|
||||
// Use the cleaner to zero the key when no longer referenced
|
||||
final byte[] k = this.key;
|
||||
final char[] p = this.passwd;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> {
|
||||
java.util.Arrays.fill(k, (byte)0x00);
|
||||
java.util.Arrays.fill(p, '0');
|
||||
});
|
||||
}
|
||||
|
||||
private static byte[] deriveKey(final Mac prf, final byte[] password,
|
||||
@ -262,24 +274,4 @@ final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey {
|
||||
return new KeyRep(KeyRep.Type.SECRET, getAlgorithm(),
|
||||
getFormat(), getEncoded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the password bytes of this key are
|
||||
* erased when there are no more references to it.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
if (this.passwd != null) {
|
||||
java.util.Arrays.fill(this.passwd, '0');
|
||||
this.passwd = null;
|
||||
}
|
||||
if (this.key != null) {
|
||||
java.util.Arrays.fill(this.key, (byte)0x00);
|
||||
this.key = null;
|
||||
}
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -35,6 +35,7 @@ import java.security.SecureRandom;
|
||||
import java.security.UnrecoverableKeyException;
|
||||
import java.util.*;
|
||||
|
||||
import jdk.internal.ref.CleanerFactory;
|
||||
import sun.security.pkcs.PKCS8Key;
|
||||
import sun.security.pkcs.EncryptedPrivateKeyInfo;
|
||||
import sun.security.x509.AlgorithmId;
|
||||
@ -141,18 +142,10 @@ final class KeyProtector {
|
||||
passwdBytes[j++] = (byte)(password[i] >> 8);
|
||||
passwdBytes[j++] = (byte)password[i];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the password bytes of this key protector are
|
||||
* set to zero when there are no more references to it.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
if (passwdBytes != null) {
|
||||
Arrays.fill(passwdBytes, (byte)0x00);
|
||||
passwdBytes = null;
|
||||
}
|
||||
// Use the cleaner to zero the password when no longer referenced
|
||||
final byte[] k = this.passwdBytes;
|
||||
CleanerFactory.cleaner().register(this,
|
||||
() -> java.util.Arrays.fill(k, (byte)0x00));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -154,6 +154,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;
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @modules java.base/com.sun.crypto.provider:+open
|
||||
* @run main/othervm DESKeyCleanupTest
|
||||
* @summary Verify that key storage is cleared
|
||||
*/
|
||||
|
||||
import java.lang.ref.PhantomReference;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
/**
|
||||
* Test that the array holding the key bytes is cleared when it is
|
||||
* no longer referenced by the key.
|
||||
*/
|
||||
|
||||
public class DESKeyCleanupTest {
|
||||
|
||||
private final static String SunJCEProvider = "SunJCE";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
testCleanupSecret("DES");
|
||||
testCleanupSecret("DESede");
|
||||
}
|
||||
|
||||
static void testCleanupSecret(String algorithm) throws Exception {
|
||||
KeyGenerator desGen = KeyGenerator.getInstance(algorithm, SunJCEProvider);
|
||||
SecretKey key = desGen.generateKey();
|
||||
|
||||
// Break into the implementation to observe the key byte array.
|
||||
Class<?> keyClass = key.getClass();
|
||||
Field keyField = keyClass.getDeclaredField("key");
|
||||
keyField.setAccessible(true);
|
||||
byte[] array = (byte[])keyField.get(key);
|
||||
|
||||
byte[] zeros = new byte[array.length];
|
||||
do {
|
||||
// Wait for array to be cleared; if not cleared test will timeout
|
||||
System.out.printf("%s array: %s%n", algorithm, Arrays.toString(array));
|
||||
key = null;
|
||||
System.gc(); // attempt to reclaim the key
|
||||
} while (Arrays.compare(zeros, array) != 0);
|
||||
System.out.printf("%s array: %s%n", algorithm, Arrays.toString(array));
|
||||
|
||||
Reference.reachabilityFence(key); // Keep key alive
|
||||
Reference.reachabilityFence(array); // Keep array alive
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @modules java.base/com.sun.crypto.provider:+open
|
||||
* @run main/othervm PBEKeyCleanupTest
|
||||
* @summary Verify that key storage is cleared
|
||||
*/
|
||||
|
||||
import java.lang.ref.PhantomReference;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.PBEKeySpec;
|
||||
|
||||
/**
|
||||
* Test that the array holding the key bytes is cleared when it is
|
||||
* no longer referenced by the key.
|
||||
*/
|
||||
public class PBEKeyCleanupTest {
|
||||
|
||||
private final static String SunJCEProvider = "SunJCE";
|
||||
|
||||
private static final String PASS_PHRASE = "some hidden string";
|
||||
private static final int ITERATION_COUNT = 1000;
|
||||
private static final int KEY_SIZE = 128;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
testPBESecret("PBEWithMD5AndDES");
|
||||
testPBKSecret("PBKDF2WithHmacSHA1");
|
||||
}
|
||||
|
||||
private static void testPBESecret(String algorithm) throws Exception {
|
||||
char[] password = new char[] {'f', 'o', 'o'};
|
||||
PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
|
||||
SecretKeyFactory keyFac =
|
||||
SecretKeyFactory.getInstance(algorithm, SunJCEProvider);
|
||||
|
||||
testCleanupSecret(algorithm, keyFac.generateSecret(pbeKeySpec));
|
||||
}
|
||||
|
||||
private static void testPBKSecret(String algorithm) throws Exception {
|
||||
byte[] salt = new byte[8];
|
||||
new Random().nextBytes(salt);
|
||||
char[] password = new char[] {'f', 'o', 'o'};
|
||||
PBEKeySpec pbeKeySpec = new PBEKeySpec(PASS_PHRASE.toCharArray(), salt,
|
||||
ITERATION_COUNT, KEY_SIZE);
|
||||
SecretKeyFactory keyFac =
|
||||
SecretKeyFactory.getInstance(algorithm, SunJCEProvider);
|
||||
|
||||
testCleanupSecret(algorithm, keyFac.generateSecret(pbeKeySpec));
|
||||
}
|
||||
|
||||
static void testCleanupSecret(String algorithm, SecretKey key) throws Exception {
|
||||
|
||||
// Break into the implementation to observe the key byte array.
|
||||
Class<?> keyClass = key.getClass();
|
||||
Field keyField = keyClass.getDeclaredField("key");
|
||||
keyField.setAccessible(true);
|
||||
byte[] array = (byte[])keyField.get(key);
|
||||
|
||||
byte[] zeros = new byte[array.length];
|
||||
do {
|
||||
// Wait for array to be cleared; if not cleared test will timeout
|
||||
System.out.printf("%s array: %s%n", algorithm, Arrays.toString(array));
|
||||
key = null;
|
||||
System.gc(); // attempt to reclaim the key
|
||||
} while (Arrays.compare(zeros, array) != 0);
|
||||
System.out.printf("%s array: %s%n", algorithm, Arrays.toString(array));
|
||||
|
||||
Reference.reachabilityFence(key); // Keep key alive
|
||||
Reference.reachabilityFence(array); // Keep array alive
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 8171949
|
||||
* @summary Tests that bitwise mask is set and state listener is notified during state transition.
|
||||
* @author Dmitry Markov
|
||||
|
@ -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
|
||||
@ -22,14 +22,16 @@
|
||||
*/
|
||||
import java.awt.*;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8065739
|
||||
* @summary Moved window is maximazed to new screen
|
||||
* @author Alexandr Scherbatiy
|
||||
*
|
||||
* @run main MaximizedMovedWindow
|
||||
*/
|
||||
|
||||
public class MaximizedMovedWindow {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2015, 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
|
||||
@ -22,8 +22,10 @@
|
||||
*/
|
||||
|
||||
import java.awt.*;
|
||||
/*
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8065739 8131339
|
||||
* @summary When Frame.setExtendedState(Frame.MAXIMIZED_BOTH)
|
||||
* is called for a Frame after been called setMaximizedBounds() with
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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,15 +21,16 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 7128738 7161759
|
||||
@summary dragged dialog freezes system on dispose
|
||||
@author Oleg Pekhovskiy: area=awt.toplevel
|
||||
@library ../../regtesthelpers
|
||||
@build Util
|
||||
@run main WindowDragTest
|
||||
*/
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 7128738 7161759
|
||||
* @summary dragged dialog freezes system on dispose
|
||||
* @author Oleg Pekhovskiy: area=awt.toplevel
|
||||
* @library ../../regtesthelpers
|
||||
* @build Util
|
||||
* @run main WindowDragTest
|
||||
*/
|
||||
|
||||
import java.awt.Frame;
|
||||
import java.awt.event.InputEvent;
|
||||
|
@ -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
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8022810
|
||||
* @summary Device.getDisplayMode() doesn't report refresh rate on Linux in case
|
||||
* of dual screen
|
||||
|
@ -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
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8022810
|
||||
* @summary Cannot list all the available display modes on Ubuntu linux in case
|
||||
* of two screen devices
|
||||
|
@ -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,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 6741526 8004693
|
||||
@summary KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy) affects created components
|
||||
@author Andrei Dmitriev : area=awt-focus
|
||||
@run main DefaultPolicyChange_Swing
|
||||
*/
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 6741526 8004693
|
||||
* @summary KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy) affects created components
|
||||
* @author Andrei Dmitriev : area=awt-focus
|
||||
* @run main DefaultPolicyChange_Swing
|
||||
*/
|
||||
|
||||
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,8 +21,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8007006
|
||||
* @summary [macosx] Closing subwindow loses main window menus.
|
||||
* @author Leonid Romanov
|
||||
|
@ -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
|
||||
@ -32,8 +32,9 @@ import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8013468
|
||||
* @summary Cursor does not update properly when in fullscreen mode on Mac
|
||||
* The core reason of the issue was the lack of a mouse entered event in fullscreen
|
||||
@ -45,6 +46,7 @@ import java.lang.reflect.Proxy;
|
||||
* @author Petr Pchelko area=awt.event
|
||||
* @run main FullscreenEnterEventTest
|
||||
*/
|
||||
|
||||
public class FullscreenEnterEventTest {
|
||||
|
||||
private static String OS = System.getProperty("os.name").toLowerCase();
|
||||
|
@ -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
|
||||
@ -29,13 +29,16 @@ import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
/* @test
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8073320
|
||||
* @summary Windows HiDPI support
|
||||
* @author Alexander Scherbatiy
|
||||
* @requires (os.family == "windows")
|
||||
* @run main/othervm -Dsun.java2d.win.uiScale=2 HiDPIRobotMouseClick
|
||||
*/
|
||||
|
||||
public class HiDPIRobotMouseClick {
|
||||
|
||||
private static volatile int mouseX;
|
||||
|
@ -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
|
||||
@ -32,7 +32,9 @@ import java.awt.Robot;
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
/* @test
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8073320
|
||||
* @summary Windows HiDPI support
|
||||
* @author Alexander Scherbatiy
|
||||
@ -40,6 +42,7 @@ import javax.swing.UIManager;
|
||||
* @run main/othervm -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2
|
||||
* HiDPIRobotScreenCaptureTest
|
||||
*/
|
||||
|
||||
public class HiDPIRobotScreenCaptureTest {
|
||||
|
||||
private static final Color[] COLORS = {
|
||||
|
@ -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
|
||||
@ -26,9 +26,11 @@ import java.awt.event.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 4449139
|
||||
* @summary test MouseWheelEvent generation by Scrollbar component
|
||||
*/
|
||||
|
||||
public final class ScrollbarMouseWheelTest
|
||||
implements MouseWheelListener, WindowListener {
|
||||
|
||||
|
@ -34,8 +34,9 @@ import javax.swing.JFrame;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8024185
|
||||
* @summary Native Mac OS X full screen does not work after showing the splash
|
||||
* @requires (os.family == "mac")
|
||||
@ -48,6 +49,7 @@ import javax.swing.WindowConstants;
|
||||
* @author Petr Pchelko area=awt.event
|
||||
* @run main/othervm -splash:test.png FullScreenAfterSplash
|
||||
*/
|
||||
|
||||
public class FullScreenAfterSplash {
|
||||
|
||||
private static JFrame frame;
|
||||
|
@ -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
|
||||
@ -45,12 +45,14 @@ import javax.imageio.ImageIO;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8145174 8151787 8168657
|
||||
* @summary HiDPI splash screen support on Linux
|
||||
* @modules java.desktop/sun.java2d
|
||||
* @requires (os.family == "linux")
|
||||
* @run main UnixMultiResolutionSplashTest
|
||||
*/
|
||||
|
||||
public class UnixMultiResolutionSplashTest {
|
||||
|
||||
private static final int IMAGE_WIDTH = 300;
|
||||
|
@ -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,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 5003402 8151588
|
||||
@summary TextArea must scroll automatically when calling append and select,
|
||||
even when not in focus.
|
||||
@run main AutoScrollOnSelectAndAppend
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 5003402 8151588
|
||||
* @summary TextArea must scroll automatically when calling append and select,
|
||||
* even when not in focus.
|
||||
* @run main AutoScrollOnSelectAndAppend
|
||||
*/
|
||||
|
||||
import java.awt.Button;
|
||||
|
@ -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,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 8149636
|
||||
@summary TextArea over scrolls to right when selecting text towards right.
|
||||
@requires os.family == "windows"
|
||||
@run main OverScrollTest
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8149636
|
||||
* @summary TextArea over scrolls to right when selecting text towards right.
|
||||
* @requires os.family == "windows"
|
||||
* @run main OverScrollTest
|
||||
*/
|
||||
|
||||
import java.awt.Frame;
|
||||
|
@ -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,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 8149636
|
||||
@summary TextField over scrolls to right when selecting text towards right.
|
||||
@requires os.family == "windows"
|
||||
@run main OverScrollTest
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8149636
|
||||
* @summary TextField over scrolls to right when selecting text towards right.
|
||||
* @requires os.family == "windows"
|
||||
* @run main OverScrollTest
|
||||
*/
|
||||
|
||||
import java.awt.Frame;
|
||||
|
@ -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
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* @test @summary setLocationRelativeTo stopped working in Ubuntu 13.10 (Unity)
|
||||
* @key headful
|
||||
* @bug 8036915 8161273
|
||||
* @run main/othervm -Dsun.java2d.uiScale=1 GetScreenLocationTest
|
||||
* @run main/othervm -Dsun.java2d.uiScale=2 GetScreenLocationTest
|
||||
|
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