This commit is contained in:
J. Duke 2017-07-05 23:16:15 +02:00
commit a2b246f5ff
230 changed files with 5136 additions and 1229 deletions

View File

@ -409,3 +409,4 @@ cda60babd152d889aba4d8f20a8f643ab151d3de jdk-9+161
c38c6b270ccc8e2b86d1631bcf42248241b54d2c jdk-9+163
7810f75d016a52e32295c4233009de5ca90e31af jdk-9+164
aff4f339acd40942d3dab499846b52acd87b3af1 jdk-9+165
ba5b16c9c6d80632b61959a33d424b1c3398ce62 jdk-9+166

View File

@ -231,7 +231,8 @@ var getJibProfilesCommon = function (input, data) {
// List of the main profile names used for iteration
common.main_profile_names = [
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
"solaris-sparcv9", "windows-x64", "windows-x86"
"solaris-sparcv9", "windows-x64", "windows-x86",
"linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn"
];
// These are the base setttings for all the main build profiles.
@ -391,7 +392,7 @@ var getJibProfilesCommon = function (input, data) {
// on such hardware.
if (input.build_cpu == "sparcv9") {
var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
if (cpu_brand.trim() == 'SPARC-M7') {
if (cpu_brand.trim().match('SPARC-.7')) {
boot_jdk_revision = "8u20";
boot_jdk_subdirpart = "1.8.0_20";
}
@ -471,8 +472,43 @@ var getJibProfilesProfiles = function (input, common, data) {
build_cpu: "x64",
dependencies: ["devkit", "freetype"],
configure_args: concat(common.configure_args_32bit),
},
"linux-arm64": {
target_os: "linux",
target_cpu: "aarch64",
build_cpu: "x64",
dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"],
configure_args: [
"--with-cpu-port=arm64",
"--with-jvm-variants=server",
"--openjdk-target=aarch64-linux-gnu",
"--enable-headless-only"
],
},
"linux-arm-vfp-hflt": {
target_os: "linux",
target_cpu: "arm",
build_cpu: "x64",
dependencies: ["devkit", "build_devkit", "cups"],
configure_args: [
"--with-jvm-variants=minimal1,client",
"--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI",
"--openjdk-target=arm-linux-gnueabihf",
"--with-abi-profile=arm-vfp-hflt"
],
},
// Special version of the SE profile adjusted to be testable on arm64 hardware.
"linux-arm-vfp-hflt-dyn": {
configure_args: "--with-stdc++lib=dynamic"
}
};
// Let linux-arm-vfp-hflt-dyn inherit everything from linux-arm-vfp-hflt
profiles["linux-arm-vfp-hflt-dyn"] = concatObjects(
profiles["linux-arm-vfp-hflt-dyn"], profiles["linux-arm-vfp-hflt"]);
// Add the base settings to all the main profiles
common.main_profile_names.forEach(function (name) {
profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
@ -584,7 +620,7 @@ var getJibProfilesProfiles = function (input, common, data) {
var testOnlyProfilesPrebuilt = {
"run-test-prebuilt": {
src: "src.conf",
dependencies: [ "jtreg", "gnumake", testedProfile + ".jdk",
dependencies: [ "jtreg", "gnumake", "boot_jdk", testedProfile + ".jdk",
testedProfile + ".test", "src.full"
],
work_dir: input.get("src.full", "install_path") + "/test",
@ -658,16 +694,28 @@ var getJibProfilesProfiles = function (input, common, data) {
"windows-x86": {
platform: "windows-x86",
demo_ext: "zip"
},
"linux-arm64": {
platform: "linux-arm64-vfp-hflt",
demo_ext: "tar.gz"
},
"linux-arm-vfp-hflt": {
platform: "linux-arm32-vfp-hflt",
demo_ext: "tar.gz"
},
"linux-arm-vfp-hflt-dyn": {
platform: "linux-arm32-vfp-hflt-dyn",
demo_ext: "tar.gz"
}
}
// Generate common artifacts for all main profiles
common.main_profile_names.forEach(function (name) {
Object.keys(artifactData).forEach(function (name) {
profiles[name] = concatObjects(profiles[name],
common.main_profile_artifacts(artifactData[name].platform, artifactData[name].demo_ext));
});
// Generate common artifacts for all debug profiles
common.main_profile_names.forEach(function (name) {
Object.keys(artifactData).forEach(function (name) {
var debugName = name + common.debug_suffix;
profiles[debugName] = concatObjects(profiles[debugName],
common.debug_profile_artifacts(artifactData[name].platform));
@ -839,7 +887,11 @@ var getJibProfilesDependencies = function (input, common) {
macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
solaris_x64: "SS12u4-Solaris11u1+1.0",
solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
windows_x64: "VS2013SP4+1.0"
windows_x64: "VS2013SP4+1.0",
linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0",
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
: "arm-linaro-4.7+1.0")
};
var devkit_platform = (input.target_cpu == "x86"

View File

@ -409,3 +409,4 @@ c7688f2fa07936b089ca0e9a0a0eff68ff37a542 jdk-9+160
493011dee80e51c2a2b064d049183c047df36d80 jdk-9+163
965bbae3072702f7c0d95c240523b65e6bb19261 jdk-9+164
a510b2201154abdd12ede42788086b5283bfb9a6 jdk-9+165
934c18145915b06d3fcc0de1a30f91f5aab8a192 jdk-9+166

View File

@ -569,3 +569,4 @@ b01c519b715ef6f785d0631adee0a6537cf6c12e jdk-9+162
983fe207555724d98f4876991e1cbafbcf2733e8 jdk-9+163
0af429be8bbaeaaf0cb838e9af28c953dda6a9c8 jdk-9+164
c92c6416ca03b1464d5ed99cf6201e52b5ba0a70 jdk-9+165
560d7aa083a24b6a56443feb8de0f40435d33aa9 jdk-9+166

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*

View File

@ -47,6 +47,7 @@ class Metadata : public MetaspaceObj {
virtual bool is_method() const volatile { return false; }
virtual bool is_methodData() const volatile { return false; }
virtual bool is_constantPool() const volatile { return false; }
virtual bool is_methodCounters() const volatile { return false; }
virtual const char* internal_name() const = 0;

View File

@ -73,3 +73,11 @@ void MethodCounters::set_highest_osr_comp_level(int level) {
#endif
}
void MethodCounters::print_value_on(outputStream* st) const {
assert(is_methodCounters(), "must be methodCounters");
st->print("method counters");
print_address_on(st);
}

View File

@ -30,7 +30,7 @@
#include "interpreter/invocationCounter.hpp"
#include "runtime/arguments.hpp"
class MethodCounters: public MetaspaceObj {
class MethodCounters : public Metadata {
friend class VMStructs;
friend class JVMCIVMStructs;
private:
@ -109,10 +109,11 @@ class MethodCounters: public MetaspaceObj {
}
public:
virtual bool is_methodCounters() const volatile { return true; }
static MethodCounters* allocate(methodHandle mh, TRAPS);
void deallocate_contents(ClassLoaderData* loader_data) {}
DEBUG_ONLY(bool on_stack() { return false; }) // for template
AOT_ONLY(Method* method() const { return _method; })
@ -120,8 +121,6 @@ class MethodCounters: public MetaspaceObj {
return align_size_up(sizeof(MethodCounters), wordSize) / wordSize;
}
bool is_klass() const { return false; }
void clear_counters();
#if defined(COMPILER2) || INCLUDE_JVMCI
@ -253,5 +252,9 @@ class MethodCounters: public MetaspaceObj {
static ByteSize backedge_mask_offset() {
return byte_offset_of(MethodCounters, _backedge_mask);
}
virtual const char* internal_name() const { return "{method counters}"; }
virtual void print_value_on(outputStream* st) const;
};
#endif //SHARE_VM_OOPS_METHODCOUNTERS_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -1668,6 +1668,9 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
}
Node* adr = array_element_address(value, index, T_CHAR);
if (adr->is_top()) {
return false;
}
if (is_store) {
(void) store_to_memory(control(), adr, ch, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered,
false, false, true /* mismatched */);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -189,19 +189,6 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
assert(vf->is_compiled_frame(), "Wrong frame type");
chunk->push(compiledVFrame::cast(vf));
ScopeDesc* trap_scope = chunk->at(0)->scope();
Handle exceptionObject;
if (trap_scope->rethrow_exception()) {
if (PrintDeoptimizationDetails) {
tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci());
}
GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw");
ScopeValue* topOfStack = expressions->top();
exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj();
assert(exceptionObject() != NULL, "exception oop can not be null");
}
bool realloc_failures = false;
#if defined(COMPILER2) || INCLUDE_JVMCI
@ -296,6 +283,19 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
#endif // INCLUDE_JVMCI
#endif // COMPILER2 || INCLUDE_JVMCI
ScopeDesc* trap_scope = chunk->at(0)->scope();
Handle exceptionObject;
if (trap_scope->rethrow_exception()) {
if (PrintDeoptimizationDetails) {
tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci());
}
GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw");
ScopeValue* topOfStack = expressions->top();
exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj();
guarantee(exceptionObject() != NULL, "exception oop can not be null");
}
// Ensure that no safepoint is taken after pointers have been stored
// in fields of rematerialized objects. If a safepoint occurs from here on
// out the java state residing in the vframeArray will be missed.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -141,7 +141,7 @@ public class SABase extends CiReplayBase {
if (Platform.isSolaris()) {
try {
OutputAnalyzer oa = ProcessTools.executeProcess("coreadm", "-p", "core",
"" + ProcessHandle.current().getPid());
"" + ProcessHandle.current().pid());
oa.shouldHaveExitValue(0);
} catch (Throwable t) {
throw new Error("Can't launch coreadm: " + t, t);

View File

@ -0,0 +1,320 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8158168
* @summary Verifies that callers of StringUTF16 intrinsics throw array out of bounds exceptions.
* @library /compiler/patches /test/lib
* @build java.base/java.lang.Helper
* @run main/othervm -Xbatch -XX:CompileThreshold=100 -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_getCharStringU,_putCharStringU compiler.intrinsics.string.TestStringUTF16IntrinsicRangeChecks
* @run main/othervm -Xbatch -XX:CompileThreshold=100 -esa -ea -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_getCharStringU,_putCharStringU compiler.intrinsics.string.TestStringUTF16IntrinsicRangeChecks
*/
package compiler.intrinsics.string;
import java.lang.reflect.Field;
import java.util.Arrays;
public class TestStringUTF16IntrinsicRangeChecks {
public static void main(String[] args) throws Exception {
byte[] val = new byte[2];
byte[] b4 = new byte[4];
char[] c4 = new char[4];
String s4 = new String(c4);
byte[] valHigh = new byte[2];
byte[] valLow = new byte[2];
Helper.putCharSB(valHigh, 0, Character.MIN_HIGH_SURROGATE);
Helper.putCharSB(valLow, 0, Character.MIN_LOW_SURROGATE);
for (int i = 0; i < 1000; ++i) {
getChars((int)1234, -5, -5 + 4, val);
getChars((int)1234, -1, -1 + 4, val);
getChars((int)1234, 0, 0 + 4, val);
getChars((int)1234, 1, 1 + 4, val);
getChars((long)1234, -5, -5 + 4, val);
getChars((long)1234, -1, -1 + 4, val);
getChars((long)1234, 0, 0 + 4, val);
getChars((long)1234, 1, 1 + 4, val);
byte[] val2 = Arrays.copyOf(val, val.length);
putCharSB(val2, -1, '!');
putCharSB(val2, 1, '!');
byte[] val4 = Arrays.copyOf(b4, b4.length);
char[] c2 = new char[2];
String s2 = new String(c2);
putCharsSB(val4, -3, c2, 0, 2);
putCharsSB(val4, -1, c2, 0, 2);
putCharsSB(val4, 0, c4, 0, 4);
putCharsSB(val4, 1, c2, 0, 2);
putCharsSB(val4, -3, s2, 0, 2);
putCharsSB(val4, -1, s2, 0, 2);
putCharsSB(val4, 0, s4, 0, 4);
putCharsSB(val4, 1, s2, 0, 2);
codePointAtSB(valHigh, -1, 1);
codePointAtSB(valHigh, -1, 2);
codePointAtSB(valHigh, 0, 2);
codePointAtSB(valHigh, 1, 2);
codePointBeforeSB(valLow, 0);
codePointBeforeSB(valLow, -1);
codePointBeforeSB(valLow, 2);
if (Helper.codePointCountSB(valHigh, 0, 1) != 1) {
throw new AssertionError("codePointCountSB");
}
if (Helper.codePointCountSB(valLow, 0, 1) != 1) {
throw new AssertionError("codePointCountSB");
}
codePointCountSB(valHigh, -1, 0);
codePointCountSB(valHigh, -1, 2);
codePointCountSB(valHigh, 0, 2);
charAt(val, -1);
charAt(val, 1);
contentEquals(b4, val, -1);
contentEquals(b4, val, 2);
contentEquals(val, s4, 2);
contentEquals(val, s4, -1);
StringBuilder sb = new StringBuilder();
sb.append((String)null).append(true).append(false);
if (!sb.toString().equals("nulltruefalse")) {
throw new AssertionError("append");
}
putCharsAt(val2, -1, '1', '2', '3', '4');
putCharsAt(val2, 0, '1', '2', '3', '4');
putCharsAt(val2, 2, '1', '2', '3', '4');
putCharsAt(val2, -1, '1', '2', '3', '4', '5');
putCharsAt(val2, 0, '1', '2', '3', '4', '5');
putCharsAt(val2, 2, '1', '2', '3', '4', '5');
reverse(valHigh, -1);
reverse(valHigh, 2);
reverse(valLow, -1);
reverse(valLow, 2);
byte[] d4 = new byte[4];
inflate(b4, 0, d4, -1, 2);
inflate(b4, 0, d4, 3, 2);
inflate(b4, 0, d4, 4, 1);
byte[] b0 = new byte[0];
byte[] b1 = new byte[1];
byte[] b2 = new byte[2];
byte[] t1 = new byte[] {1};
byte[] t2 = new byte[] {1, 2};
byte[] t4 = new byte[] {1, 2, 3, 4};
indexOf(b1, 1, t2, 1, 0);
indexOf(b2, 1, t1, 1, 0);
indexOf(b2, 2, t2, 1, 0);
indexOf(b2, 1, t2, 2, 0);
indexOf(b2, -1, t2, 1, 0);
indexOf(b2, 1, t2, -1, 0);
indexOf(b2, 1, t2, 1, 1);
indexOfLatin1(b1, 1, t1, 1, 0);
indexOfLatin1(b2, 2, t1, 1, 0);
indexOfLatin1(b2, 1, b0, 1, 0);
indexOfLatin1(b2, 1, t1, 2, 0);
indexOfLatin1(b2, -1, t1, 1, 0);
indexOfLatin1(b2, 2, t1, 1, 0);
indexOfLatin1(b2, 1, t1, -1, 0);
indexOfLatin1(b2, 1, t1, 2, 0);
lastIndexOf(b1, t2, 1, 0);
lastIndexOf(b2, t4, 2, 0);
lastIndexOf(b2, t2, 1, 0);
lastIndexOf(b2, t2, 1, 1);
lastIndexOfLatin1(b1, t1, 1, 0);
lastIndexOfLatin1(b2, t2, 2, 0);
lastIndexOfLatin1(b2, t1, 1, 0);
lastIndexOfLatin1(b2, t1, 1, 1);
}
}
static void getChars(int i, int begin, int end, byte[] value) {
try {
Helper.getChars(i, begin, end, value);
throw new AssertionError("getChars");
} catch (IndexOutOfBoundsException io) {
}
}
static void getChars(long l, int begin, int end, byte[] value) {
try {
Helper.getChars(l, begin, end, value);
throw new AssertionError("getChars");
} catch (IndexOutOfBoundsException io) {
}
}
static void putCharSB(byte[] val, int index, int c) {
try {
Helper.putCharSB(val, index, c);
throw new AssertionError("putCharSB");
} catch (IndexOutOfBoundsException io) {
}
}
static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) {
try {
Helper.putCharsSB(val, index, ca, off, end);
throw new AssertionError("putCharsSB");
} catch (IndexOutOfBoundsException io) {
}
}
static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) {
try {
Helper.putCharsSB(val, index, s, off, end);
throw new AssertionError("putCharsSB");
} catch (IndexOutOfBoundsException io) {
}
}
static void codePointAtSB(byte[] val, int index, int end) {
try {
Helper.codePointAtSB(val, index, end);
throw new AssertionError("codePointAtSB");
} catch (IndexOutOfBoundsException io) {
}
}
static void codePointBeforeSB(byte[] val, int index) {
try {
Helper.codePointBeforeSB(val, index);
throw new AssertionError("codePointBeforeSB");
} catch (IndexOutOfBoundsException io) {
}
}
static void codePointCountSB(byte[] val, int beginIndex, int endIndex) {
try {
Helper.codePointCountSB(val, beginIndex, endIndex);
throw new AssertionError("codePointCountSB");
} catch (IndexOutOfBoundsException io) {
}
}
static void charAt(byte[] v, int index) {
try {
Helper.charAt(v, index);
throw new AssertionError("charAt");
} catch (IndexOutOfBoundsException io) {
}
}
static void contentEquals(byte[] v1, byte[] v2, int len) {
try {
Helper.contentEquals(v1, v2, len);
throw new AssertionError("contentEquals");
} catch (IndexOutOfBoundsException io) {
}
}
static void contentEquals(byte[] v, CharSequence cs, int len) {
try {
Helper.contentEquals(v, cs, len);
throw new AssertionError("contentEquals");
} catch (IndexOutOfBoundsException io) {
}
}
static void putCharsAt(byte[] v, int i, char c1, char c2, char c3, char c4) {
try {
Helper.putCharsAt(v, i, c1, c2, c3, c4);
throw new AssertionError("putCharsAt");
} catch (IndexOutOfBoundsException io) {
}
}
static void putCharsAt(byte[] v, int i, char c1, char c2, char c3, char c4, char c5) {
try {
Helper.putCharsAt(v, i, c1, c2, c3, c4, c5);
throw new AssertionError("putCharsAt");
} catch (IndexOutOfBoundsException io) {
}
}
static void reverse(byte[] v, int len) {
try {
Helper.reverse(v, len);
throw new AssertionError("reverse");
} catch (IndexOutOfBoundsException io) {
}
}
static void inflate(byte[] v1, int o1, byte[] v2, int o2, int len) {
try {
Helper.inflate(v1, o1, v2, o2, len);
throw new AssertionError("inflate");
} catch (IndexOutOfBoundsException io) {
}
}
static void indexOf(byte[] v1, int l1, byte[] v2, int l2, int from) {
try {
if (Helper.indexOf(v1, l1, v2, l2, from) != -1) {
throw new AssertionError("indexOf");
}
} catch (IndexOutOfBoundsException io) {
}
}
static void lastIndexOf(byte[] v1, byte[] v2, int l2, int from) {
try {
if (Helper.lastIndexOf(v1, v2, l2, from) != -1) {
throw new AssertionError("lastIndexOf");
}
} catch (IndexOutOfBoundsException io) {
}
}
static void indexOfLatin1(byte[] v1, int l1, byte[] v2, int l2, int from) {
try {
if (Helper.indexOfLatin1(v1, l1, v2, l2, from) != -1) {
throw new AssertionError("indexOfLatin1");
}
} catch (IndexOutOfBoundsException io) {
}
}
static void lastIndexOfLatin1(byte[] v1, byte[] v2, int l2, int from) {
try {
if (Helper.lastIndexOfLatin1(v1, v2, l2, from) != -1) {
throw new AssertionError("lastIndexOfLatin1");
}
} catch (IndexOutOfBoundsException io) {
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -73,4 +73,84 @@ public class Helper {
StringUTF16.getChars(value, srcBegin, srcEnd, dst, dstBegin);
return dst;
}
public static void putCharSB(byte[] val, int index, int c) {
StringUTF16.putCharSB(val, index, c);
}
public static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) {
StringUTF16.putCharsSB(val, index, ca, off, end);
}
public static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) {
StringUTF16.putCharsSB(val, index, s, off, end);
}
public static int codePointAtSB(byte[] val, int index, int end) {
return StringUTF16.codePointAtSB(val, index, end);
}
public static int codePointBeforeSB(byte[] val, int index) {
return StringUTF16.codePointBeforeSB(val, index);
}
public static int codePointCountSB(byte[] val, int beginIndex, int endIndex) {
return StringUTF16.codePointCountSB(val, beginIndex, endIndex);
}
public static int getChars(int i, int begin, int end, byte[] value) {
return StringUTF16.getChars(i, begin, end, value);
}
public static int getChars(long l, int begin, int end, byte[] value) {
return StringUTF16.getChars(l, begin, end, value);
}
public static boolean contentEquals(byte[] v1, byte[] v2, int len) {
return StringUTF16.contentEquals(v1, v2, len);
}
public static boolean contentEquals(byte[] value, CharSequence cs, int len) {
return StringUTF16.contentEquals(value, cs, len);
}
public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4) {
return StringUTF16.putCharsAt(value, i, c1, c2, c3, c4);
}
public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4, char c5) {
return StringUTF16.putCharsAt(value, i, c1, c2, c3, c4, c5);
}
public static char charAt(byte[] value, int index) {
return StringUTF16.charAt(value, index);
}
public static void reverse(byte[] value, int count) {
StringUTF16.reverse(value, count);
}
public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
StringUTF16.inflate(src, srcOff, dst, dstOff, len);
}
public static int indexOf(byte[] src, int srcCount,
byte[] tgt, int tgtCount, int fromIndex) {
return StringUTF16.indexOf(src, srcCount, tgt, tgtCount, fromIndex);
}
public static int indexOfLatin1(byte[] src, int srcCount,
byte[] tgt, int tgtCount, int fromIndex) {
return StringUTF16.indexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex);
}
public static int lastIndexOf(byte[] src, byte[] tgt, int tgtCount, int fromIndex) {
int srcCount = StringUTF16.length(src); // ignored
return StringUTF16.lastIndexOf(src, srcCount, tgt, tgtCount, fromIndex);
}
public static int lastIndexOfLatin1(byte[] src, byte[] tgt, int tgtCount, int fromIndex) {
int srcCount = StringUTF16.length(src); // ignored
return StringUTF16.lastIndexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -67,7 +67,7 @@ public class Testlibadimalloc {
// Start the process, get the pid and then wait for the test to finish
Process process = builder.start();
long pid = process.getPid();
long pid = process.pid();
int retval = process.waitFor();
// make sure the SEGVOverflow test crashed

View File

@ -80,7 +80,7 @@ public class AttachSetGetFlag {
try {
waitForReady(target);
int pid = (int)target.getPid();
int pid = (int)target.pid();
HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString());
@ -116,7 +116,7 @@ public class AttachSetGetFlag {
try {
waitForReady(target);
int pid = (int)target.getPid();
int pid = (int)target.pid();
HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString());

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -60,7 +60,7 @@ public class SADebugDTest {
return;
}
long ourPid = ProcessHandle.current().getPid();
long ourPid = ProcessHandle.current().pid();
// The string we are expecting in the debugd ouput
String golden = String.format(GOLDEN, ourPid);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -78,7 +78,7 @@ public class DaemonThreadTest {
thread.start();
// Run jstack tool and collect the output
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
ToolResults results = jstackTool.measure();
// Analyze the jstack output for the correct thread type

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -96,7 +96,7 @@ public class SpreadLockTest {
debuggee.start();
// Collect output from the jstack tool
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
ToolResults results1 = jstackTool.measure();
// Go to method b()

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -61,7 +61,7 @@ public class ThreadNamesTest {
thread.start();
// Run jstack tool and collect the output
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
ToolResults results = jstackTool.measure();
// Analyze the jstack output for the strange thread name

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -95,7 +95,7 @@ public class TraveledLockTest {
debuggee.start();
// Collect output from the jstack tool
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
ToolResults results1 = jstackTool.measure();
// Go to method b()

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -105,7 +105,7 @@ public class WaitNotifyThreadTest {
waitThread.start();
// Collect output from the jstack tool
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
ToolResults results = jstackTool.measure();
// Analyze the jstack output for the patterns needed

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -38,7 +38,7 @@ public class GcCapacityTest {
public static void main(String[] args) throws Exception {
// We will be running "jstat -gc" tool
JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().getPid());
JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().pid());
// Run once and get the results asserting that they are reasonable
JstatGcCapacityResults measurement1 = jstatGcTool.measure();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -41,7 +41,7 @@ public class GcCauseTest01 {
public static void main(String[] args) throws Exception {
// We will be running "jstat -gc" tool
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid());
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid());
// Run once and get the results asserting that they are reasonable
JstatGcCauseResults measurement1 = jstatGcTool.measure();

View File

@ -38,6 +38,6 @@ import utils.*;
public class GcCauseTest02 {
public static void main(String[] args) throws Exception {
new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().getPid())).run();
new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().pid())).run();
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -41,7 +41,7 @@ public class GcCauseTest03 {
public static void main(String[] args) throws Exception {
// We will be running "jstat -gc" tool
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid());
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid());
System.gc();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -40,7 +40,7 @@ public class GcNewTest {
public static void main(String[] args) throws Exception {
// We will be running "jstat -gc" tool
JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().getPid());
JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().pid());
// Run once and get the results asserting that they are reasonable
JstatGcNewResults measurement1 = jstatGcTool.measure();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -44,7 +44,7 @@ public class GcTest01 {
public static void main(String[] args) throws Exception {
// We will be running "jstat -gc" tool
JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().getPid());
JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().pid());
// Run once and get the results asserting that they are reasonable
JstatGcResults measurement1 = jstatGcTool.measure();

View File

@ -38,6 +38,6 @@ import utils.*;
public class GcTest02 {
public static void main(String[] args) throws Exception {
new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().getPid())).run();
new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().pid())).run();
}
}

View File

@ -409,3 +409,4 @@ f6bf027e88e9a4dd19f721001a7af00157af42c4 jdk-9+162
50171f8c47961710cbf87aead6f03fa431d8d240 jdk-9+163
6dea581453d7c0e767e3169cfec8b423a381e71d jdk-9+164
a7942c3b1e59495dbf51dc7c41aab355fcd253d7 jdk-9+165
5d2b48f1f0a322aca719b49ff02ab421705bffc7 jdk-9+166

View File

@ -24,3 +24,5 @@ JIS_X_0208
JIS_X_0212
JIS_X_0208_Solaris
JIS_X_0212_Solaris
MS932
SJIS # SJIS must go together with MS932 to support sun.nio.cs.map

View File

@ -95,9 +95,3 @@ Java_sun_nio_ch_EPoll_epollWait(JNIEnv *env, jclass c,
}
return res;
}
JNIEXPORT void JNICALL
Java_sun_nio_ch_EPoll_close0(JNIEnv *env, jclass c, jint epfd) {
int res;
RESTARTABLE(close(epfd), res);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -42,10 +42,10 @@ import jdk.internal.HotSpotIntrinsicCandidate;
* @author Andreas Sterbenz
* @since 1.4.2
*/
final class CounterMode extends FeedbackCipher {
class CounterMode extends FeedbackCipher {
// current counter value
private final byte[] counter;
final byte[] counter;
// encrypted bytes of the previous counter value
private final byte[] encryptedCounter;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2017 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,52 +29,43 @@
package com.sun.crypto.provider;
import java.security.*;
import javax.crypto.*;
import javax.crypto.IllegalBlockSizeException;
import static com.sun.crypto.provider.AESConstants.AES_BLOCK_SIZE;
/**
* This class represents the GCTR function defined in NIST 800-38D
* under section 6.5. It needs to be constructed w/ an initialized
* cipher object, and initial counter block(ICB). Given an input X
* of arbitrary length, it processes and returns an output which has
* the same length as X. The invariants of this class are:
*
* (1) The length of intialCounterBlk (and also of its clones, e.g.,
* fields counter and counterSave) is equal to AES_BLOCK_SIZE.
*
* (2) After construction, the field counter never becomes null, it
* always contains a byte array of length AES_BLOCK_SIZE.
* under section 6.5. With a given cipher object and initial counter
* block, a counter mode operation is performed. Blocksize is limited
* to 16 bytes.
*
* If any invariant is broken, failures can occur because the
* AESCrypt.encryptBlock method can be intrinsified on the HotSpot VM
* (see JDK-8067648 for details).
*
* The counter mode operations can be intrinsified and parallelized
* by using CounterMode.implCrypt() if HotSpot VM supports it on the
* architecture.
*
* <p>This function is used in the implementation of GCM mode.
*
* @since 1.8
*/
final class GCTR {
final class GCTR extends CounterMode {
// these fields should not change after the object has been constructed
private final SymmetricCipher aes;
private final byte[] icb;
// the current counter value
private byte[] counter;
// needed for save/restore calls
private byte[] counterSave = null;
// NOTE: cipher should already be initialized
GCTR(SymmetricCipher cipher, byte[] initialCounterBlk) {
this.aes = cipher;
super(cipher);
if (initialCounterBlk.length != AES_BLOCK_SIZE) {
throw new RuntimeException("length of initial counter block (" + initialCounterBlk.length +
") not equal to AES_BLOCK_SIZE (" + AES_BLOCK_SIZE + ")");
}
this.icb = initialCounterBlk;
this.counter = icb.clone();
iv = initialCounterBlk;
reset();
}
@Override
String getFeedback() {
return "GCTR";
}
// input must be multiples of 128-bit blocks when calling update
@ -89,23 +80,11 @@ final class GCTR {
throw new RuntimeException("output buffer too small");
}
byte[] encryptedCntr = new byte[AES_BLOCK_SIZE];
int numOfCompleteBlocks = inLen / AES_BLOCK_SIZE;
for (int i = 0; i < numOfCompleteBlocks; i++) {
aes.encryptBlock(counter, 0, encryptedCntr, 0);
for (int n = 0; n < AES_BLOCK_SIZE; n++) {
int index = (i * AES_BLOCK_SIZE + n);
out[outOfs + index] =
(byte) ((in[inOfs + index] ^ encryptedCntr[n]));
}
GaloisCounterMode.increment32(counter);
}
return inLen;
return encrypt(in, inOfs, inLen, out, outOfs);
}
// input can be arbitrary size when calling doFinal
protected int doFinal(byte[] in, int inOfs, int inLen, byte[] out,
int doFinal(byte[] in, int inOfs, int inLen, byte[] out,
int outOfs) throws IllegalBlockSizeException {
try {
if (inLen < 0) {
@ -118,7 +97,7 @@ final class GCTR {
if (lastBlockSize != 0) {
// do the last partial block
byte[] encryptedCntr = new byte[AES_BLOCK_SIZE];
aes.encryptBlock(counter, 0, encryptedCntr, 0);
embeddedCipher.encryptBlock(counter, 0, encryptedCntr, 0);
for (int n = 0; n < lastBlockSize; n++) {
out[outOfs + completeBlkLen + n] =
(byte) ((in[inOfs + completeBlkLen + n] ^
@ -131,28 +110,4 @@ final class GCTR {
}
return inLen;
}
/**
* Resets the content of this object to when it's first constructed.
*/
void reset() {
System.arraycopy(icb, 0, counter, 0, icb.length);
counterSave = null;
}
/**
* Save the current content of this object.
*/
void save() {
this.counterSave = this.counter.clone();
}
/**
* Restores the content of this object to the previous saved one.
*/
void restore() {
if (this.counterSave != null) {
this.counter = this.counterSave;
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -209,6 +209,10 @@ public final class FilePermission extends Permission implements Serializable {
private static final Path here = builtInFS.getPath(
GetPropertyAction.privilegedGetProperty("user.dir"));
private static final Path EMPTY_PATH = builtInFS.getPath("");
private static final Path DASH_PATH = builtInFS.getPath("-");
private static final Path DOTDOT_PATH = builtInFS.getPath("..");
/**
* A private constructor that clones some and updates some,
* always with a different name.
@ -341,7 +345,7 @@ public final class FilePermission extends Permission implements Serializable {
.normalize();
// lastName should always be non-null now
Path lastName = npath.getFileName();
if (lastName != null && lastName.toString().equals("-")) {
if (lastName != null && lastName.equals(DASH_PATH)) {
directory = true;
recursive = !rememberStar;
npath = npath.getParent();
@ -679,23 +683,76 @@ public final class FilePermission extends Permission implements Serializable {
* @return the depth in between
*/
private static int containsPath(Path p1, Path p2) {
Path p;
try {
p = p2.relativize(p1).normalize();
if (p.getName(0).toString().isEmpty()) {
return 0;
} else {
for (Path item: p) {
String s = item.toString();
if (!s.equals("..")) {
return -1;
}
}
return p.getNameCount();
}
} catch (IllegalArgumentException iae) {
// Two paths must have the same root. For example,
// there is no contains relation between any two of
// "/x", "x", "C:/x", "C:x", and "//host/share/x".
if (!Objects.equals(p1.getRoot(), p2.getRoot())) {
return -1;
}
// Empty path (i.e. "." or "") is a strange beast,
// because its getNameCount()==1 but getName(0) is null.
// It's better to deal with it separately.
if (p1.equals(EMPTY_PATH)) {
if (p2.equals(EMPTY_PATH)) {
return 0;
} else if (p2.getName(0).equals(DOTDOT_PATH)) {
// "." contains p2 iif p2 has no "..". Since a
// a normalized path can only have 0 or more
// ".." at the beginning. We only need to look
// at the head.
return -1;
} else {
// and the distance is p2's name count. i.e.
// 3 between "." and "a/b/c".
return p2.getNameCount();
}
} else if (p2.equals(EMPTY_PATH)) {
int c1 = p1.getNameCount();
if (!p1.getName(c1 - 1).equals(DOTDOT_PATH)) {
// "." is inside p1 iif p1 is 1 or more "..".
// For the same reason above, we only need to
// look at the tail.
return -1;
}
// and the distance is the count of ".."
return c1;
}
// Good. No more empty paths.
// Common heads are removed
int c1 = p1.getNameCount();
int c2 = p2.getNameCount();
int n = Math.min(c1, c2);
int i = 0;
while (i < n) {
if (!p1.getName(i).equals(p2.getName(i)))
break;
i++;
}
// for p1 containing p2, p1 must be 0-or-more "..",
// and p2 cannot have "..". For the same reason, we only
// check tail of p1 and head of p2.
if (i < c1 && !p1.getName(c1 - 1).equals(DOTDOT_PATH)) {
return -1;
}
if (i < c2 && p2.getName(i).equals(DOTDOT_PATH)) {
return -1;
}
// and the distance is the name counts added (after removing
// the common heads).
// For example: p1 = "../../..", p2 = "../a".
// After removing the common heads, they become "../.." and "a",
// and the distance is (3-1)+(2-1) = 3.
return c1 - i + c2 - i;
}
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -307,6 +307,8 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
* sequence.
*/
public int codePointAt(int index) {
int count = this.count;
byte[] value = this.value;
checkIndex(index, count);
if (isLatin1()) {
return value[index] & 0xff;
@ -560,11 +562,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
val[count++] = 'l';
val[count++] = 'l';
} else {
checkOffset(count + 4, val.length >> 1);
StringUTF16.putChar(val, count++, 'n');
StringUTF16.putChar(val, count++, 'u');
StringUTF16.putChar(val, count++, 'l');
StringUTF16.putChar(val, count++, 'l');
count = StringUTF16.putCharsAt(val, count, 'n', 'u', 'l', 'l');
}
this.count = count;
return this;
@ -695,18 +693,9 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
}
} else {
if (b) {
checkOffset(count + 4, val.length >> 1);
StringUTF16.putChar(val, count++, 't');
StringUTF16.putChar(val, count++, 'r');
StringUTF16.putChar(val, count++, 'u');
StringUTF16.putChar(val, count++, 'e');
count = StringUTF16.putCharsAt(val, count, 't', 'r', 'u', 'e');
} else {
checkOffset(count + 5, val.length >> 1);
StringUTF16.putChar(val, count++, 'f');
StringUTF16.putChar(val, count++, 'a');
StringUTF16.putChar(val, count++, 'l');
StringUTF16.putChar(val, count++, 's');
StringUTF16.putChar(val, count++, 'e');
count = StringUTF16.putCharsAt(val, count, 'f', 'a', 'l', 's', 'e');
}
}
this.count = count;
@ -755,16 +744,15 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
* @return a reference to this object.
*/
public AbstractStringBuilder append(int i) {
int count = this.count;
int spaceNeeded = count + Integer.stringSize(i);
ensureCapacityInternal(spaceNeeded);
if (isLatin1()) {
Integer.getChars(i, spaceNeeded, value);
} else {
byte[] val = this.value;
checkOffset(spaceNeeded, val.length >> 1);
Integer.getCharsUTF16(i, spaceNeeded, val);
StringUTF16.getChars(i, count, spaceNeeded, value);
}
count = spaceNeeded;
this.count = spaceNeeded;
return this;
}
@ -781,16 +769,15 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
* @return a reference to this object.
*/
public AbstractStringBuilder append(long l) {
int count = this.count;
int spaceNeeded = count + Long.stringSize(l);
ensureCapacityInternal(spaceNeeded);
if (isLatin1()) {
Long.getChars(l, spaceNeeded, value);
} else {
byte[] val = this.value;
checkOffset(spaceNeeded, val.length >> 1);
Long.getCharsUTF16(l, spaceNeeded, val);
StringUTF16.getChars(l, count, spaceNeeded, value);
}
count = spaceNeeded;
this.count = spaceNeeded;
return this;
}
@ -843,6 +830,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
* greater than {@code end}.
*/
public AbstractStringBuilder delete(int start, int end) {
int count = this.count;
if (end > count) {
end = count;
}
@ -850,7 +838,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
int len = end - start;
if (len > 0) {
shift(end, -len);
count -= len;
this.count = count - len;
}
return this;
}
@ -925,6 +913,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
* greater than {@code end}.
*/
public AbstractStringBuilder replace(int start, int end, String str) {
int count = this.count;
if (end > count) {
end = count;
}
@ -933,7 +922,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
int newCount = count + len - (end - start);
ensureCapacityInternal(newCount);
shift(end, newCount - count);
count = newCount;
this.count = newCount;
putStringAt(start, str);
return this;
}
@ -1500,40 +1489,11 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
val[k] = cj;
}
} else {
checkOffset(count, val.length >> 1);
boolean hasSurrogates = false;
for (int j = (n-1) >> 1; j >= 0; j--) {
int k = n - j;
char cj = StringUTF16.getChar(val, j);
char ck = StringUTF16.getChar(val, k);
StringUTF16.putChar(val, j, ck);
StringUTF16.putChar(val, k, cj);
if (Character.isSurrogate(cj) ||
Character.isSurrogate(ck)) {
hasSurrogates = true;
}
}
if (hasSurrogates) {
reverseAllValidSurrogatePairs(val, count);
}
StringUTF16.reverse(val, count);
}
return this;
}
/** Outlined helper method for reverse() */
private void reverseAllValidSurrogatePairs(byte[] val, int count) {
for (int i = 0; i < count - 1; i++) {
char c2 = StringUTF16.getChar(val, i);
if (Character.isLowSurrogate(c2)) {
char c1 = StringUTF16.getChar(val, i + 1);
if (Character.isHighSurrogate(c1)) {
StringUTF16.putChar(val, i++, c1);
StringUTF16.putChar(val, i, c2);
}
}
}
}
/**
* Returns a string representing the data in this sequence.
* A new {@code String} object is allocated and initialized to
@ -1682,6 +1642,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
}
private final void appendChars(char[] s, int off, int end) {
int count = this.count;
if (isLatin1()) {
byte[] val = this.value;
for (int i = off, j = count; i < end; i++) {
@ -1689,17 +1650,17 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
if (StringLatin1.canEncode(c)) {
val[j++] = (byte)c;
} else {
count = j;
this.count = count = j;
inflate();
StringUTF16.putCharsSB(this.value, j, s, i, end);
count += end - i;
this.count = count + end - i;
return;
}
}
} else {
StringUTF16.putCharsSB(this.value, count, s, off, end);
}
count += end - off;
this.count = count + end - off;
}
private final void appendChars(CharSequence s, int off, int end) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2016, 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
@ -386,7 +386,7 @@ public final class Integer extends Number implements Comparable<Integer> {
}
/** byte[]/UTF16 version */
static void formatUnsignedIntUTF16(int val, int shift, byte[] buf, int offset, int len) {
private static void formatUnsignedIntUTF16(int val, int shift, byte[] buf, int offset, int len) {
int charPos = offset + len;
int radix = 1 << shift;
int mask = radix - 1;
@ -442,7 +442,7 @@ public final class Integer extends Number implements Comparable<Integer> {
return new String(buf, LATIN1);
} else {
byte[] buf = new byte[size * 2];
getCharsUTF16(i, size, buf);
StringUTF16.getChars(i, size, buf);
return new String(buf, UTF16);
}
}
@ -516,49 +516,6 @@ public final class Integer extends Number implements Comparable<Integer> {
return charPos;
}
/**
* This is a variant of {@link #getChars(int, int, byte[])}, but for
* UTF-16 coder.
*
* @param i value to convert
* @param index next index, after the least significant digit
* @param buf target buffer, UTF16-coded.
* @return index of the most significant digit or minus sign, if present
*/
static int getCharsUTF16(int i, int index, byte[] buf) {
int q, r;
int charPos = index;
boolean negative = (i < 0);
if (!negative) {
i = -i;
}
// Get 2 digits/iteration using ints
while (i <= -100) {
q = i / 100;
r = (q * 100) - i;
i = q;
StringUTF16.putChar(buf, --charPos, DigitOnes[r]);
StringUTF16.putChar(buf, --charPos, DigitTens[r]);
}
// We know there are at most two digits left at this point.
q = i / 10;
r = (q * 10) - i;
StringUTF16.putChar(buf, --charPos, '0' + r);
// Whatever left is the remaining digit.
if (q < 0) {
StringUTF16.putChar(buf, --charPos, '0' - q);
}
if (negative) {
StringUTF16.putChar(buf, --charPos, '-');
}
return charPos;
}
// Left here for compatibility reasons, see JDK-8143900.
static final int [] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999,
99999999, 999999999, Integer.MAX_VALUE };

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2016, 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
@ -414,7 +414,7 @@ public final class Long extends Number implements Comparable<Long> {
}
/** byte[]/UTF16 version */
static void formatUnsignedLong0UTF16(long val, int shift, byte[] buf, int offset, int len) {
private static void formatUnsignedLong0UTF16(long val, int shift, byte[] buf, int offset, int len) {
int charPos = offset + len;
int radix = 1 << shift;
int mask = radix - 1;
@ -475,7 +475,7 @@ public final class Long extends Number implements Comparable<Long> {
return new String(buf, LATIN1);
} else {
byte[] buf = new byte[size * 2];
getCharsUTF16(i, size, buf);
StringUTF16.getChars(i, size, buf);
return new String(buf, UTF16);
}
}
@ -561,61 +561,6 @@ public final class Long extends Number implements Comparable<Long> {
return charPos;
}
/**
* This is a variant of {@link #getChars(long, int, byte[])}, but for
* UTF-16 coder.
*
* @param i value to convert
* @param index next index, after the least significant digit
* @param buf target buffer, UTF16-coded.
* @return index of the most significant digit or minus sign, if present
*/
static int getCharsUTF16(long i, int index, byte[] buf) {
long q;
int r;
int charPos = index;
boolean negative = (i < 0);
if (!negative) {
i = -i;
}
// Get 2 digits/iteration using longs until quotient fits into an int
while (i <= Integer.MIN_VALUE) {
q = i / 100;
r = (int)((q * 100) - i);
i = q;
StringUTF16.putChar(buf, --charPos, Integer.DigitOnes[r]);
StringUTF16.putChar(buf, --charPos, Integer.DigitTens[r]);
}
// Get 2 digits/iteration using ints
int q2;
int i2 = (int)i;
while (i2 <= -100) {
q2 = i2 / 100;
r = (q2 * 100) - i2;
i2 = q2;
StringUTF16.putChar(buf, --charPos, Integer.DigitOnes[r]);
StringUTF16.putChar(buf, --charPos, Integer.DigitTens[r]);
}
// We know there are at most two digits left at this point.
q2 = i2 / 10;
r = (q2 * 10) - i2;
StringUTF16.putChar(buf, --charPos, '0' + r);
// Whatever left is the remaining digit.
if (q2 < 0) {
StringUTF16.putChar(buf, --charPos, '0' - q2);
}
if (negative) {
StringUTF16.putChar(buf, --charPos, '-');
}
return charPos;
}
/**
* Returns the string representation size for a given long value.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -80,10 +80,10 @@ import java.util.stream.Stream;
*
* <p>Subclasses of Process should override the {@link #onExit()} and
* {@link #toHandle()} methods to provide a fully functional Process including the
* {@link #getPid() process id},
* {@link #info() information about the process},
* {@link #children() direct children}, and
* {@link #descendants() direct children plus descendants of those children} of the process.
* {@linkplain #pid() process id},
* {@linkplain #info() information about the process},
* {@linkplain #children() direct children}, and
* {@linkplain #descendants() direct children plus descendants of those children} of the process.
* Delegating to the underlying Process or ProcessHandle is typically
* easiest and most efficient.
*
@ -237,14 +237,14 @@ public abstract class Process {
/**
* Kills the process.
* Whether the process represented by this {@code Process} object is
* {@link #supportsNormalTermination normally terminated} or not is
* {@linkplain #supportsNormalTermination normally terminated} or not is
* implementation dependent.
* Forcible process destruction is defined as the immediate termination of a
* process, whereas normal termination allows the process to shut down cleanly.
* If the process is not alive, no action is taken.
* <p>
* The {@link java.util.concurrent.CompletableFuture} from {@link #onExit} is
* {@link java.util.concurrent.CompletableFuture#complete completed}
* {@linkplain java.util.concurrent.CompletableFuture#complete completed}
* when the process has terminated.
*/
public abstract void destroy();
@ -257,7 +257,7 @@ public abstract class Process {
* If the process is not alive, no action is taken.
* <p>
* The {@link java.util.concurrent.CompletableFuture} from {@link #onExit} is
* {@link java.util.concurrent.CompletableFuture#complete completed}
* {@linkplain java.util.concurrent.CompletableFuture#complete completed}
* when the process has terminated.
* <p>
* Invoking this method on {@code Process} objects returned by
@ -335,15 +335,15 @@ public abstract class Process {
*
* @implSpec
* The implementation of this method returns the process id as:
* {@link #toHandle toHandle().getPid()}.
* {@link #toHandle toHandle().pid()}.
*
* @return the native process id of the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @since 9
*/
public long getPid() {
return toHandle().getPid();
public long pid() {
return toHandle().pid();
}
/**
@ -357,9 +357,9 @@ public abstract class Process {
* <p>
* Calling {@code onExit().get()} waits for the process to terminate and returns
* the Process. The future can be used to check if the process is
* {@link java.util.concurrent.CompletableFuture#isDone done} or to
* {@link java.util.concurrent.CompletableFuture#get() wait} for it to terminate.
* {@link java.util.concurrent.CompletableFuture#cancel(boolean) Cancelling}
* {@linkplain java.util.concurrent.CompletableFuture#isDone done} or to
* {@linkplain java.util.concurrent.CompletableFuture#get() wait} for it to terminate.
* {@linkplain java.util.concurrent.CompletableFuture#cancel(boolean) Cancelling}
* the CompletableFuture does not affect the Process.
* <p>
* Processes returned from {@link ProcessBuilder#start} override the
@ -389,7 +389,7 @@ public abstract class Process {
* {@code waitFor} is interrupted, the thread's interrupt status is preserved.
* <p>
* When {@link #waitFor()} returns successfully the CompletableFuture is
* {@link java.util.concurrent.CompletableFuture#complete completed} regardless
* {@linkplain java.util.concurrent.CompletableFuture#complete completed} regardless
* of the exit status of the process.
*
* This implementation may consume a lot of memory for thread stacks if a
@ -463,7 +463,7 @@ public abstract class Process {
* This implementation throws an instance of
* {@link java.lang.UnsupportedOperationException} and performs no other action.
* Subclasses should override this method to provide a ProcessHandle for the
* process. The methods {@link #getPid}, {@link #info}, {@link #children},
* process. The methods {@link #pid}, {@link #info}, {@link #children},
* and {@link #descendants}, unless overridden, operate on the ProcessHandle.
*
* @return Returns a ProcessHandle for the Process
@ -500,10 +500,10 @@ public abstract class Process {
/**
* Returns a snapshot of the direct children of the process.
* The parent of a direct child process is the process.
* Typically, a process that is {@link #isAlive not alive} has no children.
* Typically, a process that is {@linkplain #isAlive not alive} has no children.
* <p>
* <em>Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
* There is no guarantee that a process is {@linkplain #isAlive alive}.
* </em>
*
* @implSpec
@ -526,10 +526,10 @@ public abstract class Process {
* Returns a snapshot of the descendants of the process.
* The descendants of a process are the children of the process
* plus the descendants of those children, recursively.
* Typically, a process that is {@link #isAlive not alive} has no children.
* Typically, a process that is {@linkplain #isAlive not alive} has no children.
* <p>
* <em>Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
* There is no guarantee that a process is {@linkplain #isAlive alive}.
* </em>
*
* @implSpec

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -104,7 +104,7 @@ public interface ProcessHandle extends Comparable<ProcessHandle> {
* @throws UnsupportedOperationException if the implementation
* does not support this operation
*/
long getPid();
long pid();
/**
* Returns an {@code Optional<ProcessHandle>} for an existing native process.
@ -383,7 +383,7 @@ public interface ProcessHandle extends Comparable<ProcessHandle> {
/**
* Returns a hash code value for this ProcessHandle.
* The hashcode value follows the general contract for {@link Object#hashCode()}.
* The value is a function of the {@link #getPid getPid()} value and
* The value is a function of the {@link #pid pid()} value and
* may be a function of additional information to uniquely identify the process.
* If two ProcessHandles are equal according to the {@link #equals(Object) equals}
* method, then calling the hashCode method on each of the two objects

View File

@ -35,11 +35,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import java.util.stream.Stream;
@ -176,7 +172,7 @@ final class ProcessHandleImpl implements ProcessHandle {
throw new IllegalStateException("onExit for current process not allowed");
}
return ProcessHandleImpl.completion(getPid(), false)
return ProcessHandleImpl.completion(pid(), false)
.handleAsync((exitStatus, unusedThrowable) -> this);
}
@ -259,7 +255,7 @@ final class ProcessHandleImpl implements ProcessHandle {
* @return the native process ID
*/
@Override
public long getPid() {
public long pid() {
return pid;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2016, 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
@ -1064,11 +1064,7 @@ public final class String
if (!isLatin1()) { // utf16 str and latin1 abs can never be "equal"
return false;
}
for (int i = 0; i < len; i++) {
if ((char)(v1[i] & 0xff) != StringUTF16.getChar(v2, i)) {
return false;
}
}
return StringUTF16.contentEquals(v1, v2, len);
}
return true;
}
@ -1120,10 +1116,8 @@ public final class String
}
}
} else {
for (int i = 0; i < n; i++) {
if (StringUTF16.getChar(val, i) != cs.charAt(i)) {
return false;
}
if (!StringUTF16.contentEquals(val, cs, n)) {
return false;
}
}
return true;
@ -1734,6 +1728,9 @@ public final class String
if (tgtCount == 0) {
return fromIndex;
}
if (tgtCount > srcCount) {
return -1;
}
if (srcCoder == tgtCoder) {
return srcCoder == LATIN1
? StringLatin1.indexOf(src, srcCount, tgt, tgtCount, fromIndex)
@ -1792,7 +1789,7 @@ public final class String
* is the string being searched for.
*
* @param src the characters being searched.
* @param srcCoder coder handles the mapping between bytes/chars
* @param srcCoder coder handles the mapping between bytes/chars
* @param srcCount count of the source string.
* @param tgt the characters being searched for.
* @param fromIndex the index to begin searching from.
@ -1807,12 +1804,12 @@ public final class String
* consistency, don't check for null str.
*/
int rightIndex = srcCount - tgtCount;
if (fromIndex < 0) {
return -1;
}
if (fromIndex > rightIndex) {
fromIndex = rightIndex;
}
if (fromIndex < 0) {
return -1;
}
/* Empty string always matches. */
if (tgtCount == 0) {
return fromIndex;
@ -1825,31 +1822,8 @@ public final class String
if (srcCoder == LATIN1) { // && tgtCoder == UTF16
return -1;
}
// srcCoder == UTF16 && tgtCoder == LATIN1
int min = tgtCount - 1;
int i = min + fromIndex;
int strLastIndex = tgtCount - 1;
char strLastChar = (char)(tgt[strLastIndex] & 0xff);
startSearchForLastChar:
while (true) {
while (i >= min && StringUTF16.getChar(src, i) != strLastChar) {
i--;
}
if (i < min) {
return -1;
}
int j = i - 1;
int start = j - strLastIndex;
int k = strLastIndex - 1;
while (j > start) {
if (StringUTF16.getChar(src, j--) != (tgt[k--] & 0xff)) {
i--;
continue startSearchForLastChar;
}
}
return start + 1;
}
// srcCoder == UTF16 && tgtCoder == LATIN1
return StringUTF16.lastIndexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex);
}
/**
@ -3078,7 +3052,8 @@ public final class String
*/
static void checkIndex(int index, int length) {
if (index < 0 || index >= length) {
throw new StringIndexOutOfBoundsException("index " + index);
throw new StringIndexOutOfBoundsException("index " + index +
",length " + length);
}
}
@ -3116,7 +3091,7 @@ public final class String
* If {@code begin} is negative, {@code begin} is greater than
* {@code end}, or {@code end} is greater than {@code length}.
*/
private static void checkBoundsBeginEnd(int begin, int end, int length) {
static void checkBoundsBeginEnd(int begin, int end, int length) {
if (begin < 0 || begin > end || end > length) {
throw new StringIndexOutOfBoundsException(
"begin " + begin + ", end " + end + ", length " + length);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -293,7 +293,7 @@ final class StringConcatHelper {
if (coder == String.LATIN1) {
return Integer.getChars(value, index, buf);
} else {
return Integer.getCharsUTF16(value, index, buf);
return StringUTF16.getChars(value, index, buf);
}
}
@ -311,7 +311,7 @@ final class StringConcatHelper {
if (coder == String.LATIN1) {
return Long.getChars(value, index, buf);
} else {
return Long.getCharsUTF16(value, index, buf);
return StringUTF16.getChars(value, index, buf);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,6 @@ import jdk.internal.HotSpotIntrinsicCandidate;
import static java.lang.String.LATIN1;
import static java.lang.String.UTF16;
import static java.lang.String.checkOffset;
import static java.lang.String.checkBoundsOffCount;
final class StringLatin1 {
@ -566,11 +565,7 @@ final class StringLatin1 {
// inflatedCopy byte[] -> byte[]
@HotSpotIntrinsicCandidate
public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
// We need a range check here because 'putChar' has no checks
checkBoundsOffCount(dstOff << 1, len << 1, dst.length);
for (int i = 0; i < len; i++) {
StringUTF16.putChar(dst, dstOff++, src[srcOff++] & 0xff);
}
StringUTF16.inflate(src, srcOff, dst, dstOff, len);
}
static class CharsSpliterator implements Spliterator.OfInt {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, 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
@ -30,12 +30,11 @@ import java.util.Locale;
import java.util.Spliterator;
import java.util.function.IntConsumer;
import jdk.internal.HotSpotIntrinsicCandidate;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.annotation.DontInline;
import static java.lang.String.UTF16;
import static java.lang.String.LATIN1;
import static java.lang.String.checkIndex;
import static java.lang.String.checkOffset;
import static java.lang.String.checkBoundsOffCount;
final class StringUTF16 {
@ -51,33 +50,37 @@ final class StringUTF16 {
}
@HotSpotIntrinsicCandidate
public static void putChar(byte[] val, int index, int c) {
// intrinsic performs no bounds checks
static void putChar(byte[] val, int index, int c) {
assert index >= 0 && index < length(val) : "Trusted caller missed bounds check";
index <<= 1;
val[index++] = (byte)(c >> HI_BYTE_SHIFT);
val[index] = (byte)(c >> LO_BYTE_SHIFT);
}
@HotSpotIntrinsicCandidate
public static char getChar(byte[] val, int index) {
// intrinsic performs no bounds checks
static char getChar(byte[] val, int index) {
assert index >= 0 && index < length(val) : "Trusted caller missed bounds check";
index <<= 1;
return (char)(((val[index++] & 0xff) << HI_BYTE_SHIFT) |
((val[index] & 0xff) << LO_BYTE_SHIFT));
}
public static char charAt(byte[] value, int index) {
if (index < 0 || index >= value.length >> 1) {
throw new StringIndexOutOfBoundsException(index);
}
return getChar(value, index);
}
public static int length(byte[] value) {
return value.length >> 1;
}
public static int codePointAt(byte[] value, int index, int end) {
private static int codePointAt(byte[] value, int index, int end, boolean checked) {
assert index < end;
if (checked) {
checkIndex(index, value);
}
char c1 = getChar(value, index);
if (Character.isHighSurrogate(c1) && ++index < end) {
if (checked) {
checkIndex(index, value);
}
char c2 = getChar(value, index);
if (Character.isLowSurrogate(c2)) {
return Character.toCodePoint(c1, c2);
@ -86,10 +89,22 @@ final class StringUTF16 {
return c1;
}
public static int codePointBefore(byte[] value, int index) {
char c2 = getChar(value, --index);
public static int codePointAt(byte[] value, int index, int end) {
return codePointAt(value, index, end, false /* unchecked */);
}
private static int codePointBefore(byte[] value, int index, boolean checked) {
--index;
if (checked) {
checkIndex(index, value);
}
char c2 = getChar(value, index);
if (Character.isLowSurrogate(c2) && index > 0) {
char c1 = getChar(value, --index);
--index;
if (checked) {
checkIndex(index, value);
}
char c1 = getChar(value, index);
if (Character.isHighSurrogate(c1)) {
return Character.toCodePoint(c1, c2);
}
@ -97,11 +112,19 @@ final class StringUTF16 {
return c2;
}
public static int codePointCount(byte[] value, int beginIndex, int endIndex) {
public static int codePointBefore(byte[] value, int index) {
return codePointBefore(value, index, false /* unchecked */);
}
private static int codePointCount(byte[] value, int beginIndex, int endIndex, boolean checked) {
assert beginIndex <= endIndex;
int count = endIndex - beginIndex;
for (int i = beginIndex; i < endIndex; ) {
int i = beginIndex;
if (checked && i < endIndex) {
checkBoundsBeginEnd(i, endIndex, value);
}
for (; i < endIndex - 1; ) {
if (Character.isHighSurrogate(getChar(value, i++)) &&
i < endIndex &&
Character.isLowSurrogate(getChar(value, i))) {
count--;
i++;
@ -110,6 +133,10 @@ final class StringUTF16 {
return count;
}
public static int codePointCount(byte[] value, int beginIndex, int endIndex) {
return codePointCount(value, beginIndex, endIndex, false /* unchecked */);
}
public static char[] toChars(byte[] value) {
char[] dst = new char[value.length >> 1];
getChars(value, 0, dst.length, dst, 0);
@ -162,7 +189,7 @@ final class StringUTF16 {
@HotSpotIntrinsicCandidate
public static int compress(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
// We need a range check here because 'getChar' has no checks
checkBoundsOffCount(srcOff << 1, len << 1, src.length);
checkBoundsOffCount(srcOff, len, src);
for (int i = 0; i < len; i++) {
char c = getChar(src, srcOff);
if (c > 0xFF) {
@ -212,7 +239,7 @@ final class StringUTF16 {
public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
// We need a range check here because 'getChar' has no checks
if (srcBegin < srcEnd) {
checkBoundsOffCount(srcBegin << 1, (srcEnd - srcBegin) << 1, value.length);
checkBoundsOffCount(srcBegin, srcEnd - srcBegin, value);
}
for (int i = srcBegin; i < srcEnd; i++) {
dst[dstBegin++] = getChar(value, i);
@ -319,14 +346,25 @@ final class StringUTF16 {
if (str.length == 0) {
return 0;
}
if (value.length == 0) {
if (value.length < str.length) {
return -1;
}
return indexOf(value, length(value), str, length(str), 0);
return indexOfUnsafe(value, length(value), str, length(str), 0);
}
@HotSpotIntrinsicCandidate
public static int indexOf(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) {
checkBoundsBeginEnd(fromIndex, valueCount, value);
checkBoundsBeginEnd(0, strCount, str);
return indexOfUnsafe(value, valueCount, str, strCount, fromIndex);
}
private static int indexOfUnsafe(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) {
assert fromIndex >= 0;
assert strCount > 0;
assert strCount <= length(str);
assert valueCount >= strCount;
char first = getChar(str, 0);
int max = (valueCount - strCount);
for (int i = fromIndex; i <= max; i++) {
@ -348,6 +386,7 @@ final class StringUTF16 {
return -1;
}
/**
* Handles indexOf Latin1 substring in UTF16 string.
*/
@ -356,14 +395,24 @@ final class StringUTF16 {
if (str.length == 0) {
return 0;
}
if (value.length == 0) {
if (length(value) < str.length) {
return -1;
}
return indexOfLatin1(value, length(value), str, str.length, 0);
return indexOfLatin1Unsafe(value, length(value), str, str.length, 0);
}
@HotSpotIntrinsicCandidate
public static int indexOfLatin1(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) {
checkBoundsBeginEnd(fromIndex, srcCount, src);
String.checkBoundsBeginEnd(0, tgtCount, tgt.length);
return indexOfLatin1Unsafe(src, srcCount, tgt, tgtCount, fromIndex);
}
public static int indexOfLatin1Unsafe(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) {
assert fromIndex >= 0;
assert tgtCount > 0;
assert tgtCount <= tgt.length;
assert srcCount >= tgtCount;
char first = (char)(tgt[0] & 0xff);
int max = (srcCount - tgtCount);
for (int i = fromIndex; i <= max; i++) {
@ -389,6 +438,11 @@ final class StringUTF16 {
@HotSpotIntrinsicCandidate
private static int indexOfChar(byte[] value, int ch, int fromIndex, int max) {
checkBoundsBeginEnd(fromIndex, max, value);
return indexOfCharUnsafe(value, ch, fromIndex, max);
}
private static int indexOfCharUnsafe(byte[] value, int ch, int fromIndex, int max) {
for (int i = fromIndex; i < max; i++) {
if (getChar(value, i) == ch) {
return i;
@ -404,6 +458,7 @@ final class StringUTF16 {
if (Character.isValidCodePoint(ch)) {
final char hi = Character.highSurrogate(ch);
final char lo = Character.lowSurrogate(ch);
checkBoundsBeginEnd(fromIndex, max, value);
for (int i = fromIndex; i < max - 1; i++) {
if (getChar(value, i) == hi && getChar(value, i + 1 ) == lo) {
return i;
@ -413,13 +468,21 @@ final class StringUTF16 {
return -1;
}
// srcCoder == UTF16 && tgtCoder == UTF16
public static int lastIndexOf(byte[] src, int srcCount,
byte[] tgt, int tgtCount, int fromIndex) {
assert fromIndex >= 0;
assert tgtCount > 0;
assert tgtCount <= length(tgt);
int min = tgtCount - 1;
int i = min + fromIndex;
int strLastIndex = tgtCount - 1;
checkIndex(strLastIndex, tgt);
char strLastChar = getChar(tgt, strLastIndex);
checkIndex(i, src);
startSearchForLastChar:
while (true) {
while (i >= min && getChar(src, i) != strLastChar) {
@ -509,6 +572,9 @@ final class StringUTF16 {
public static boolean regionMatchesCI(byte[] value, int toffset,
byte[] other, int ooffset, int len) {
int last = toffset + len;
assert toffset >= 0 && ooffset >= 0;
assert ooffset + len <= length(other);
assert last <= length(value);
while (toffset < last) {
char c1 = getChar(value, toffset++);
char c2 = getChar(other, ooffset++);
@ -599,6 +665,8 @@ final class StringUTF16 {
private static String toLowerCaseEx(String str, byte[] value,
byte[] result, int first, Locale locale,
boolean localeDependent) {
assert(result.length == value.length);
assert(first >= 0);
int resultOffset = first;
int length = value.length >> 1;
int srcCount;
@ -633,6 +701,8 @@ final class StringUTF16 {
System.arraycopy(result, 0, result2, 0, resultOffset << 1);
result = result2;
}
assert resultOffset >= 0;
assert resultOffset + mapLen <= length(result);
for (int x = 0; x < mapLen; ++x) {
putChar(result, resultOffset++, lowerCharArray[x]);
}
@ -697,6 +767,8 @@ final class StringUTF16 {
byte[] result, int first,
Locale locale, boolean localeDependent)
{
assert(result.length == value.length);
assert(first >= 0);
int resultOffset = first;
int length = value.length >> 1;
int srcCount;
@ -733,10 +805,12 @@ final class StringUTF16 {
byte[] result2 = newBytesFor((result.length >> 1) + mapLen - srcCount);
System.arraycopy(result, 0, result2, 0, resultOffset << 1);
result = result2;
}
for (int x = 0; x < mapLen; ++x) {
}
assert resultOffset >= 0;
assert resultOffset + mapLen <= length(result);
for (int x = 0; x < mapLen; ++x) {
putChar(result, resultOffset++, upperCharArray[x]);
}
}
}
}
return newString(result, 0, resultOffset);
@ -757,7 +831,7 @@ final class StringUTF16 {
null;
}
public static void putChars(byte[] val, int index, char[] str, int off, int end) {
private static void putChars(byte[] val, int index, char[] str, int off, int end) {
while (off < end) {
putChar(val, index++, str[off++]);
}
@ -927,35 +1001,172 @@ final class StringUTF16 {
////////////////////////////////////////////////////////////////
public static void putCharSB(byte[] val, int index, int c) {
checkIndex(index, val.length >> 1);
checkIndex(index, val);
putChar(val, index, c);
}
public static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) {
checkOffset(index + end - off, val.length >> 1);
checkBoundsBeginEnd(index, index + end - off, val);
putChars(val, index, ca, off, end);
}
public static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) {
checkOffset(index + end - off, val.length >> 1);
checkBoundsBeginEnd(index, index + end - off, val);
for (int i = off; i < end; i++) {
putChar(val, index++, s.charAt(i));
}
}
public static int codePointAtSB(byte[] val, int index, int end) {
checkOffset(end, val.length >> 1);
return codePointAt(val, index, end);
return codePointAt(val, index, end, true /* checked */);
}
public static int codePointBeforeSB(byte[] val, int index) {
checkOffset(index, val.length >> 1);
return codePointBefore(val, index);
return codePointBefore(val, index, true /* checked */);
}
public static int codePointCountSB(byte[] val, int beginIndex, int endIndex) {
checkOffset(endIndex, val.length >> 1);
return codePointCount(val, beginIndex, endIndex);
return codePointCount(val, beginIndex, endIndex, true /* checked */);
}
public static int getChars(int i, int begin, int end, byte[] value) {
checkBoundsBeginEnd(begin, end, value);
int pos = getChars(i, end, value);
assert begin == pos;
return pos;
}
public static int getChars(long l, int begin, int end, byte[] value) {
checkBoundsBeginEnd(begin, end, value);
int pos = getChars(l, end, value);
assert begin == pos;
return pos;
}
public static boolean contentEquals(byte[] v1, byte[] v2, int len) {
checkBoundsOffCount(0, len, v2);
for (int i = 0; i < len; i++) {
if ((char)(v1[i] & 0xff) != getChar(v2, i)) {
return false;
}
}
return true;
}
public static boolean contentEquals(byte[] value, CharSequence cs, int len) {
checkOffset(len, value);
for (int i = 0; i < len; i++) {
if (getChar(value, i) != cs.charAt(i)) {
return false;
}
}
return true;
}
public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4) {
int end = i + 4;
checkBoundsBeginEnd(i, end, value);
putChar(value, i++, c1);
putChar(value, i++, c2);
putChar(value, i++, c3);
putChar(value, i++, c4);
assert(i == end);
return end;
}
public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4, char c5) {
int end = i + 5;
checkBoundsBeginEnd(i, end, value);
putChar(value, i++, c1);
putChar(value, i++, c2);
putChar(value, i++, c3);
putChar(value, i++, c4);
putChar(value, i++, c5);
assert(i == end);
return end;
}
public static char charAt(byte[] value, int index) {
checkIndex(index, value);
return getChar(value, index);
}
public static void reverse(byte[] val, int count) {
checkOffset(count, val);
int n = count - 1;
boolean hasSurrogates = false;
for (int j = (n-1) >> 1; j >= 0; j--) {
int k = n - j;
char cj = getChar(val, j);
char ck = getChar(val, k);
putChar(val, j, ck);
putChar(val, k, cj);
if (Character.isSurrogate(cj) ||
Character.isSurrogate(ck)) {
hasSurrogates = true;
}
}
if (hasSurrogates) {
reverseAllValidSurrogatePairs(val, count);
}
}
/** Outlined helper method for reverse() */
private static void reverseAllValidSurrogatePairs(byte[] val, int count) {
for (int i = 0; i < count - 1; i++) {
char c2 = getChar(val, i);
if (Character.isLowSurrogate(c2)) {
char c1 = getChar(val, i + 1);
if (Character.isHighSurrogate(c1)) {
putChar(val, i++, c1);
putChar(val, i, c2);
}
}
}
}
// inflatedCopy byte[] -> byte[]
public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
// We need a range check here because 'putChar' has no checks
checkBoundsOffCount(dstOff, len, dst);
for (int i = 0; i < len; i++) {
putChar(dst, dstOff++, src[srcOff++] & 0xff);
}
}
// srcCoder == UTF16 && tgtCoder == LATIN1
public static int lastIndexOfLatin1(byte[] src, int srcCount,
byte[] tgt, int tgtCount, int fromIndex) {
assert fromIndex >= 0;
assert tgtCount > 0;
assert tgtCount <= tgt.length;
int min = tgtCount - 1;
int i = min + fromIndex;
int strLastIndex = tgtCount - 1;
char strLastChar = (char)(tgt[strLastIndex] & 0xff);
checkIndex(i, src);
startSearchForLastChar:
while (true) {
while (i >= min && getChar(src, i) != strLastChar) {
i--;
}
if (i < min) {
return -1;
}
int j = i - 1;
int start = j - strLastIndex;
int k = strLastIndex - 1;
while (j > start) {
if (getChar(src, j--) != (tgt[k--] & 0xff)) {
i--;
continue startSearchForLastChar;
}
}
return start + 1;
}
}
////////////////////////////////////////////////////////////////
@ -975,4 +1186,123 @@ final class StringUTF16 {
}
static final int MAX_LENGTH = Integer.MAX_VALUE >> 1;
// Used by trusted callers. Assumes all necessary bounds checks have
// been done by the caller.
/**
* This is a variant of {@link Integer#getChars(int, int, byte[])}, but for
* UTF-16 coder.
*
* @param i value to convert
* @param index next index, after the least significant digit
* @param buf target buffer, UTF16-coded.
* @return index of the most significant digit or minus sign, if present
*/
static int getChars(int i, int index, byte[] buf) {
int q, r;
int charPos = index;
boolean negative = (i < 0);
if (!negative) {
i = -i;
}
// Get 2 digits/iteration using ints
while (i <= -100) {
q = i / 100;
r = (q * 100) - i;
i = q;
putChar(buf, --charPos, Integer.DigitOnes[r]);
putChar(buf, --charPos, Integer.DigitTens[r]);
}
// We know there are at most two digits left at this point.
q = i / 10;
r = (q * 10) - i;
putChar(buf, --charPos, '0' + r);
// Whatever left is the remaining digit.
if (q < 0) {
putChar(buf, --charPos, '0' - q);
}
if (negative) {
putChar(buf, --charPos, '-');
}
return charPos;
}
/**
* This is a variant of {@link Long#getChars(long, int, byte[])}, but for
* UTF-16 coder.
*
* @param i value to convert
* @param index next index, after the least significant digit
* @param buf target buffer, UTF16-coded.
* @return index of the most significant digit or minus sign, if present
*/
static int getChars(long i, int index, byte[] buf) {
long q;
int r;
int charPos = index;
boolean negative = (i < 0);
if (!negative) {
i = -i;
}
// Get 2 digits/iteration using longs until quotient fits into an int
while (i <= Integer.MIN_VALUE) {
q = i / 100;
r = (int)((q * 100) - i);
i = q;
putChar(buf, --charPos, Integer.DigitOnes[r]);
putChar(buf, --charPos, Integer.DigitTens[r]);
}
// Get 2 digits/iteration using ints
int q2;
int i2 = (int)i;
while (i2 <= -100) {
q2 = i2 / 100;
r = (q2 * 100) - i2;
i2 = q2;
putChar(buf, --charPos, Integer.DigitOnes[r]);
putChar(buf, --charPos, Integer.DigitTens[r]);
}
// We know there are at most two digits left at this point.
q2 = i2 / 10;
r = (q2 * 10) - i2;
putChar(buf, --charPos, '0' + r);
// Whatever left is the remaining digit.
if (q2 < 0) {
putChar(buf, --charPos, '0' - q2);
}
if (negative) {
putChar(buf, --charPos, '-');
}
return charPos;
}
// End of trusted methods.
public static void checkIndex(int off, byte[] val) {
String.checkIndex(off, length(val));
}
public static void checkOffset(int off, byte[] val) {
String.checkOffset(off, length(val));
}
public static void checkBoundsBeginEnd(int begin, int end, byte[] val) {
String.checkBoundsBeginEnd(begin, end, length(val));
}
public static void checkBoundsOffCount(int offset, int count, byte[] val) {
String.checkBoundsOffCount(offset, count, length(val));
}
}

View File

@ -1766,6 +1766,7 @@ public final class System {
* @since 1.1
*/
@Deprecated(since="1.2", forRemoval=true)
@SuppressWarnings("removal")
public static void runFinalizersOnExit(boolean value) {
Runtime.runFinalizersOnExit(value);
}

View File

@ -385,7 +385,7 @@ public final class ValueRange implements Serializable {
}
if (obj instanceof ValueRange) {
ValueRange other = (ValueRange) obj;
return minSmallest == other.minSmallest && minLargest == other.minLargest &&
return minSmallest == other.minSmallest && minLargest == other.minLargest &&
maxSmallest == other.maxSmallest && maxLargest == other.maxLargest;
}
return false;
@ -398,8 +398,9 @@ public final class ValueRange implements Serializable {
*/
@Override
public int hashCode() {
long hash = minSmallest + minLargest << 16 + minLargest >> 48 + maxSmallest << 32 +
maxSmallest >> 32 + maxLargest << 48 + maxLargest >> 16;
long hash = minSmallest + (minLargest << 16) + (minLargest >> 48) +
(maxSmallest << 32) + (maxSmallest >> 32) + (maxLargest << 48) +
(maxLargest >> 16);
return (int) (hash ^ (hash >>> 32));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -617,7 +617,7 @@ final class ProcessImpl extends Process {
}
@Override
public long getPid() {
public long pid() {
return pid;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -523,7 +523,7 @@ final class ProcessImpl extends Process {
@Override
public CompletableFuture<Process> onExit() {
return ProcessHandleImpl.completion(getPid(), false)
return ProcessHandleImpl.completion(pid(), false)
.handleAsync((exitStatus, unusedThrowable) -> this);
}
@ -550,8 +550,8 @@ final class ProcessImpl extends Process {
private static native void terminateProcess(long handle);
@Override
public long getPid() {
return processHandle.getPid();
public long pid() {
return processHandle.pid();
}
private static native int getProcessId0(long handle);
@ -572,7 +572,7 @@ final class ProcessImpl extends Process {
@Override
public String toString() {
int exitCode = getExitCodeProcess(handle);
return new StringBuilder("Process[pid=").append(getPid())
return new StringBuilder("Process[pid=").append(pid())
.append(", exitValue=").append(exitCode == STILL_ACTIVE ? "\"not exited\"" : exitCode)
.append("]").toString();
}

View File

@ -211,6 +211,9 @@ public class DataFlavor implements Externalizable, Cloneable {
* representationClass = java.awt.Image
* mimeType = "image/x-java-image"
* </pre>
* Will be {@code null} if {@code java.awt.Image} is not visible, the
* {@code java.desktop} module is not loaded, or the {@code java.desktop}
* module is not in the run-time image.
*/
public static final DataFlavor imageFlavor = createConstant("image/x-java-image; class=java.awt.Image", "Image");

View File

@ -78,7 +78,7 @@ public final class JRSUIConstants {
return "THUMB_START";
} else if (hit == WINDOW_TITLE_BAR_HEIGHT) {
return "WINDOW_TITLE_BAR_HEIGHT";
} else if (hit == THUMB_START) {
} else if (hit == ANIMATION_FRAME) {
return "ANIMATION_FRAME";
}
return getClass().getSimpleName();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,24 @@ import java.awt.Image;
import java.awt.PopupMenu;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.desktop.*;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.AppForegroundListener;
import java.awt.desktop.AppHiddenListener;
import java.awt.desktop.AppReopenedListener;
import java.awt.desktop.OpenFilesEvent;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.OpenURIEvent;
import java.awt.desktop.OpenURIHandler;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesEvent;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.QuitResponse;
import java.awt.desktop.QuitStrategy;
import java.awt.desktop.ScreenSleepListener;
import java.awt.desktop.SystemEventListener;
import java.awt.desktop.SystemSleepListener;
import java.awt.desktop.UserSessionListener;
import java.beans.Beans;
import javax.swing.JMenuBar;
@ -108,10 +125,10 @@ public class Application {
*
* @see AppForegroundListener
* @see AppHiddenListener
* @see AppReOpenedListener
* @see AppScreenSleepListener
* @see AppSystemSleepListener
* @see AppUserSessionListener
* @see AppReopenedListener
* @see ScreenSleepListener
* @see SystemSleepListener
* @see UserSessionListener
*
* @param listener
* @since Java for Mac OS X 10.6 Update 3
@ -126,10 +143,10 @@ public class Application {
*
* @see AppForegroundListener
* @see AppHiddenListener
* @see AppReOpenedListener
* @see AppScreenSleepListener
* @see AppSystemSleepListener
* @see AppUserSessionListener
* @see AppReopenedListener
* @see ScreenSleepListener
* @see SystemSleepListener
* @see UserSessionListener
*
* @param listener
* @since Java for Mac OS X 10.6 Update 3
@ -144,7 +161,7 @@ public class Application {
*
* Setting the {@link AboutHandler} to {@code null} reverts it to the default Cocoa About window.
*
* @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout()} message
* @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout} message
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
@ -167,7 +184,7 @@ public class Application {
/**
* Installs the handler which is notified when the application is asked to open a list of files.
* The {@link OpenFilesHandler#openFiles(AppEvent.OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* The {@link OpenFilesHandler#openFiles(OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
*
* @param openFileHandler
@ -180,7 +197,7 @@ public class Application {
/**
* Installs the handler which is notified when the application is asked to print a list of files.
* The {@link PrintFilesHandler#printFiles(AppEvent.PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* The {@link PrintFilesHandler#printFiles(PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
*
* @param printFileHandler
@ -193,10 +210,10 @@ public class Application {
/**
* Installs the handler which is notified when the application is asked to open a URL.
* The {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleURLTypes} array present in it's Info.plist.
* The {@link OpenURIHandler#openURI(OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleURLTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleURLTypes} key to your app's Info.plist.
*
* Setting the handler to {@code null} causes all {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be enqueued until another handler is set.
* Setting the handler to {@code null} causes all {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be enqueued until another handler is set.
*
* @param openURIHandler
* @since Java for Mac OS X 10.6 Update 3

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,26 @@
package com.apple.eawt;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.AppForegroundListener;
import java.awt.desktop.AppHiddenListener;
import java.awt.desktop.AppReopenedListener;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.OpenURIHandler;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.ScreenSleepListener;
import java.awt.desktop.SystemEventListener;
import java.awt.desktop.SystemSleepListener;
import java.awt.desktop.UserSessionListener;
/**
* An abstract adapter class for receiving {@code ApplicationEvents}.
*
* ApplicationEvents are deprecated. Use individual app event listeners or handlers instead.
*
* @see Application#addAppEventListener(AppEventListener)
* @see Application#addAppEventListener(SystemEventListener)
*
* @see AboutHandler
* @see PreferencesHandler
@ -39,14 +53,14 @@ package com.apple.eawt;
* @see PrintFilesHandler
* @see QuitHandler
*
* @see AppReOpenedListener
* @see AppReopenedListener
* @see AppForegroundListener
* @see AppHiddenListener
* @see UserSessionListener
* @see ScreenSleepListener
* @see SystemSleepListener
*
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}.
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReopenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}.
* @since 1.4
*/
@SuppressWarnings("deprecation")

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,18 @@
package com.apple.eawt;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.AppReopenedListener;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitHandler;
import java.util.EventObject;
/**
* The class of events sent to the deprecated ApplicationListener callbacks.
*
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReopenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}
* @since 1.4
*/
@Deprecated

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,25 @@
package com.apple.eawt;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.AppForegroundListener;
import java.awt.desktop.AppHiddenListener;
import java.awt.desktop.AppReopenedListener;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.OpenURIHandler;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.ScreenSleepListener;
import java.awt.desktop.SystemEventListener;
import java.awt.desktop.SystemSleepListener;
import java.awt.desktop.UserSessionListener;
import java.util.EventListener;
/**
* ApplicationEvents are deprecated. Use individual AppEvent listeners or handlers instead.
*
* @see Application#addAppEventListener(AppEventListener)
* @see Application#addAppEventListener(SystemEventListener)
*
* @see AboutHandler
* @see PreferencesHandler
@ -39,7 +52,7 @@ import java.util.EventListener;
* @see PrintFilesHandler
* @see QuitHandler
*
* @see AppReOpenedListener
* @see AppReopenedListener
* @see AppForegroundListener
* @see AppHiddenListener
* @see UserSessionListener
@ -47,7 +60,7 @@ import java.util.EventListener;
* @see SystemSleepListener
*
* @since 1.4
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReopenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}
*/
@SuppressWarnings("deprecation")
@Deprecated
@ -146,7 +159,7 @@ public interface ApplicationListener extends EventListener {
* event is sent from another application, include that code as part of this handler.
*
* @param event the Reopen Application event
* @deprecated use {@link AppReOpenedListener}
* @deprecated use {@link AppReopenedListener}
*/
@Deprecated
public void handleReOpenApplication(ApplicationEvent event);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,15 @@
package com.apple.eawt;
import java.awt.Window;
import com.apple.eawt.event.FullScreenEvent;
/**
* Abstract adapter class for receiving fullscreen events. This class is provided
* as a convenience for creating listeners.
*
* Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(javax.swing.RootPaneContainer, FullScreenListener)}
* Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(Window, FullScreenListener)}
* will receive all entering/entered/exiting/exited full screen events.
*
* @see FullScreenUtilities

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -37,25 +37,25 @@ import java.util.EventListener;
public interface FullScreenListener extends EventListener {
/**
* Invoked when a window has started to enter full screen.
* @param event containing the specific window entering full screen.
* @param e containing the specific window entering full screen.
*/
public void windowEnteringFullScreen(final FullScreenEvent e);
/**
* Invoked when a window has fully entered full screen.
* @param event containing the specific window which has entered full screen.
* @param e containing the specific window which has entered full screen.
*/
public void windowEnteredFullScreen(final FullScreenEvent e);
/**
* Invoked when a window has started to exit full screen.
* @param event containing the specific window exiting full screen.
* @param e containing the specific window exiting full screen.
*/
public void windowExitingFullScreen(final FullScreenEvent e);
/**
* Invoked when a window has fully exited full screen.
* @param event containing the specific window which has exited full screen.
* @param e containing the specific window which has exited full screen.
*/
public void windowExitedFullScreen(final FullScreenEvent e);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -36,7 +36,7 @@ import com.apple.eawt.event.GestureUtilities;
/**
* Utility class perform animated full screen actions to top-level {@link Window}s.
*
* This class manages the relationship between {@link Windows}s and the {@link FullScreenListener}s
* This class manages the relationship between {@link Window}s and the {@link FullScreenListener}s
* attached to them. It's design is similar to the Java SE 6u10 {@link com.sun.awt.AWTUtilities}
* class which adds additional functionality to AWT Windows, without adding new API to the
* {@link java.awt.Window} class.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,11 +25,14 @@
package com.apple.eawt;
import java.awt.desktop.QuitEvent;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.QuitResponse;
import java.awt.desktop.QuitStrategy;
/**
* Used to respond to a request to quit the application.
* The QuitResponse may be used after the {@link QuitHandler#handleQuitRequestWith(AppEvent.QuitEvent, MacQuitResponse)} method has returned, and may be used from any thread.
* The QuitResponse may be used after the {@link QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse)} method has returned, and may be used from any thread.
*
* @see Application#setQuitHandler(QuitHandler)
* @see QuitHandler

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -29,7 +29,7 @@ package com.apple.eawt.event;
* Abstract adapter class for receiving gesture events. This class is provided
* as a convenience for creating listeners.
*
* Subclasses registered with {@link GestureUtilities#addGestureListenerTo()}
* Subclasses registered with {@link GestureUtilities#addGestureListenerTo}
* will receive all phase, magnification, rotation, and swipe events.
*
* @see GestureUtilities

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -26,6 +26,7 @@
package com.apple.eawt.event;
import java.awt.*;
import java.awt.event.InputEvent;
/**
* Abstract event all gestures inherit from.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -39,13 +39,13 @@ package com.apple.eawt.event;
public interface GesturePhaseListener extends GestureListener {
/**
* Invoked when the user has started a continuous gesture.
* @param event representing the start of a continuous gesture.
* @param e representing the start of a continuous gesture.
*/
public void gestureBegan(final GesturePhaseEvent e);
/**
* Invoked when the user has stopped a continuous gesture.
* @param event representing the end of a continuous gesture.
* @param e representing the end of a continuous gesture.
*/
public void gestureEnded(final GesturePhaseEvent e);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -37,7 +37,7 @@ package com.apple.eawt.event;
public interface MagnificationListener extends GestureListener {
/**
* Invoked when a magnification gesture is performed by the user.
* @param event containing the scale of the magnification.
* @param e containing the scale of the magnification.
*/
public void magnify(final MagnificationEvent e);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -37,7 +37,7 @@ package com.apple.eawt.event;
public interface RotationListener extends GestureListener {
/**
* Invoked when a rotation gesture is performed by the user.
* @param event containing an abstract measure of rotation.
* @param e containing an abstract measure of rotation.
*/
public void rotate(final RotationEvent e);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -38,25 +38,25 @@ package com.apple.eawt.event;
public interface SwipeListener extends GestureListener {
/**
* Invoked when an upwards swipe gesture is performed by the user.
* @param event representing the occurrence of a swipe.
* @param e representing the occurrence of a swipe.
*/
public void swipedUp(final SwipeEvent e);
/**
* Invoked when a downward swipe gesture is performed by the user.
* @param event representing the occurrence of a swipe.
* @param e representing the occurrence of a swipe.
*/
public void swipedDown(final SwipeEvent e);
/**
* Invoked when a leftward swipe gesture is performed by the user.
* @param event representing the occurrence of a swipe.
* @param e representing the occurrence of a swipe.
*/
public void swipedLeft(final SwipeEvent e);
/**
* Invoked when a rightward swipe gesture is performed by the user.
* @param event representing the occurrence of a swipe.
* @param e representing the occurrence of a swipe.
*/
public void swipedRight(final SwipeEvent e);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, 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
@ -3732,7 +3732,6 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
* <p>
* This should be used if the ActionMap can be shared.
*
* @param c JComponent to install the ActionMap on.
* @param loaderClass Class object that gets loadActionMap invoked
* on.
* @param defaultsKey Key to use to defaults table to check for

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, 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
@ -39,7 +39,7 @@ class ScreenMenuPropertyListener implements PropertyChangeListener {
/**
* This method gets called when a bound property is changed.
* @param evt A PropertyChangeEvent object describing the event source
* @param e A PropertyChangeEvent object describing the event source
* and the property that has changed.
*/
public void propertyChange(final PropertyChangeEvent e) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -232,6 +232,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private volatile boolean isInFullScreen;
private volatile boolean isIconifyAnimationActive;
private volatile boolean isZoomed;
private Window target;
private LWWindowPeer peer;
@ -506,7 +507,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private boolean isMaximized() {
return undecorated ? this.normalBounds != null
: CWrapper.NSWindow.isZoomed(getNSWindowPtr());
: isZoomed;
}
private void maximize() {
@ -974,6 +975,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
protected void deliverMoveResizeEvent(int x, int y, int width, int height,
boolean byUser) {
isZoomed = CWrapper.NSWindow.isZoomed(getNSWindowPtr());
checkZoom();
final Rectangle oldB = nativeBounds;

View File

@ -376,7 +376,7 @@ static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobj
static JNF_MEMBER_CACHE(jm_getMaxPage, sjc_CPrinterJob, "getMaxPageAttrib", "()I");
static JNF_MEMBER_CACHE(jm_getSelectAttrib, sjc_CPrinterJob, "getSelectAttrib", "()I");
static JNF_MEMBER_CACHE(jm_getNumberOfPages, jc_Pageable, "getNumberOfPages", "()I");
static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormatFromAttributes", "()Ljava/awt/print/PageFormat;");
static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormat", "(I)Ljava/awt/print/PageFormat;");
NSMutableDictionary* printingDictionary = [dst dictionary];
@ -412,7 +412,7 @@ static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobj
[printingDictionary setObject:[NSNumber numberWithInteger:fromPage] forKey:NSPrintFirstPage];
[printingDictionary setObject:[NSNumber numberWithInteger:toPage] forKey:NSPrintLastPage];
jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat);
jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat, (jint)0);
if (page != NULL) {
javaPageFormatToNSPrintInfo(env, NULL, page, dst);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2009, 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
@ -27,6 +27,8 @@ package com.sun.awt;
import java.awt.*;
import javax.swing.JRootPane;
import sun.awt.AWTAccessor;
import sun.awt.SunToolkit;
@ -323,7 +325,7 @@ public final class AWTUtilities {
* is thrown.
* <p>If the window is a {@code Frame} or a {@code Dialog}, the window must
* be undecorated prior to enabling the per-pixel translucency effect (see
* {@link Frame#setUndecorated()} and/or {@link Dialog#setUndecorated()}).
* {@link Frame#setUndecorated} and/or {@link Dialog#setUndecorated}).
* If the window becomes decorated through a subsequent call to the
* corresponding {@code setUndecorated()} method, the per-pixel
* translucency effect will be disabled and the opaque property reset to
@ -431,7 +433,7 @@ public final class AWTUtilities {
* </ul>
* <p>
* The most common example when the 'mixing-cutout' shape is needed is a
* glass pane component. The {@link JRootPane#setGlassPane()} method
* glass pane component. The {@link JRootPane#setGlassPane} method
* automatically sets the <i>empty-shape</i> as the 'mixing-cutout' shape
* for the given glass pane component. If a developer needs some other
* 'mixing-cutout' shape for the glass pane (which is rare), this must be

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2009, 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
@ -59,7 +59,7 @@ public final class SecurityWarning {
*
* The returned value is not valid until the peer has been created. Before
* invoking this method a developer must call the {@link Window#pack()},
* {@link Window#setVisible()}, or some other method that creates the peer.
* {@link Window#setVisible}, or some other method that creates the peer.
*
* @param window the window to get the security warning size for
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -84,10 +84,8 @@ public class PaletteBuilder {
* is unable to create approximation of {@code src}
* and {@code canCreatePalette} returns {@code false}.
*
* @see createIndexColorModel
*
* @see canCreatePalette
*
* @see #createIndexColorModel
* @see #canCreatePalette
*/
public static RenderedImage createIndexedImage(RenderedImage src) {
PaletteBuilder pb = new PaletteBuilder(src);
@ -107,10 +105,8 @@ public class PaletteBuilder {
* is unable to create approximation of {@code img}
* and {@code canCreatePalette} returns {@code false}.
*
* @see createIndexedImage
*
* @see canCreatePalette
*
* @see #createIndexedImage
* @see #canCreatePalette
*/
public static IndexColorModel createIndexColorModel(RenderedImage img) {
PaletteBuilder pb = new PaletteBuilder(img);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -41,7 +41,7 @@ public class SingleTileRenderedImage extends SimpleRenderedImage {
* and a ColorModel.
*
* @param ras A Raster that will define tile (0, 0) of the image.
* @param cm A ColorModel that will serve as the image's
* @param colorModel A ColorModel that will serve as the image's
* ColorModel.
*/
public SingleTileRenderedImage(Raster ras, ColorModel colorModel) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -729,7 +729,8 @@ public class GIFImageWriter extends ImageWriter {
/**
* Writes any extension blocks, the Image Descriptor, and the image data
*
* @param iioimage The image and image metadata.
* @param image The image.
* @param imageMetadata The image metadata.
* @param param The write parameters.
* @param globalColorTable The Global Color Table.
* @param sourceBounds The source region.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2014, 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
@ -99,7 +99,7 @@ public class JPEGMetadata extends IIOMetadata implements Cloneable {
* of the list if it is present, and any JFXX or APP2ICC marker
* segments are subordinate to the JFIF marker segment. This
* list is package visible so that the writer can access it.
* @see #MarkerSegment
* @see MarkerSegment
*/
List<MarkerSegment> markerSequence = new ArrayList<>();

View File

@ -74,13 +74,13 @@ public abstract class TIFFBaseJPEGCompressor extends TIFFCompressor {
/**
* ImageWriteParam for JPEG writer.
* May be initialized by {@link #initJPEGWriter()}.
* May be initialized by {@link #initJPEGWriter}.
*/
protected JPEGImageWriteParam JPEGParam = null;
/**
* The JPEG writer.
* May be initialized by {@link #initJPEGWriter()}.
* May be initialized by {@link #initJPEGWriter}.
*/
protected ImageWriter JPEGWriter = null;
@ -95,7 +95,7 @@ public abstract class TIFFBaseJPEGCompressor extends TIFFCompressor {
* Stream metadata equivalent to a tables-only stream such as in
* the {@code JPEGTables}. Default value is {@code null}.
* This should be set by any subclass which sets
* {@link writeAbbreviatedStream} to {@code true}.
* {@link #writeAbbreviatedStream} to {@code true}.
*/
protected IIOMetadata JPEGStreamMetadata = null;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -1322,7 +1322,7 @@ public abstract class TIFFDecompressor {
* Sets the index of the planar configuration band to be decoded. This value
* is ignored for chunky (interleaved) images.
*
* @param the index of the planar band to decode
* @param planarBand the index of the planar band to decode
*/
public void setPlanarBand(int planarBand) { this.planarBand = planarBand; }
@ -2069,7 +2069,7 @@ public abstract class TIFFDecompressor {
* <p> The default implementation calls {@code decodeRaw(byte[] b,
* ...)} and copies the resulting data into {@code f}.
*
* @param f a {@code double} array to be written.
* @param d a {@code double} array to be written.
* @param dstOffset the starting offset in {@code f} to be
* written.
* @param bitsPerPixel the number of bits for each pixel.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -58,8 +58,6 @@ import com.sun.imageio.plugins.common.I18N;
*
* The encoding process may clip, subsample using the parameters
* specified in the {@code ImageWriteParam}.
*
* @see com.sun.media.imageio.plugins.WBMPImageWriteParam
*/
public class WBMPImageWriter extends ImageWriter {
/** The output stream to write into */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -138,9 +138,9 @@ public class GTKColorType extends ColorType {
* arguments to scale.
*
* @param color Color to alter
* @param hFactory Amount to scale the hue
* @param hFactor Amount to scale the hue
* @param lFactor Amount to scale the lightness
* @param sFactory Amount to sacle saturation
* @param sFactor Amount to sacle saturation
* @return newly created color
*/
static Color adjustColor(Color color, float hFactor, float lFactor,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -82,7 +82,7 @@ class GTKGraphicsUtils extends SynthGraphicsUtils {
* render the text as html nor will it offset by the insets of the
* component.
*
* @param ss SynthContext
* @param context SynthContext
* @param g Graphics used to render string in.
* @param text Text to render
* @param bounds Bounds of the text to be drawn.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -319,7 +319,7 @@ class GTKStyle extends SynthStyle implements GTKConstants {
* insets will be placed in it, otherwise a new Insets object will be
* created and returned.
*
* @param context SynthContext identifying requestor
* @param state SynthContext identifying requestor
* @param insets Where to place Insets
* @return Insets.
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,7 +89,6 @@ public class MotifGraphicsUtils implements SwingConstants
* <b>drawStringInRect()</b> does not clip to the rectangle, but instead
* uses this rectangle and the desired justification to compute the point
* at which to begin drawing the text.
* @see #drawString
*/
public static void drawStringInRect(Graphics g, String aString, int x, int y,
int width, int height, int justification) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -127,7 +127,7 @@ class XPStyle {
*
* @param part a <code>Part</code>
* @param state a <code>String</code>
* @param attributeKey a <code>String</code>
* @param prop a <code>String</code>
* @return a <code>String</code> or null if key is not found
* in the current style
*
@ -172,7 +172,6 @@ class XPStyle {
/** Get a named <code>Dimension</code> value from the current style
*
* @param key a <code>String</code>
* @return a <code>Dimension</code> or null if key is not found
* in the current style
*
@ -189,7 +188,6 @@ class XPStyle {
/** Get a named <code>Point</code> (e.g. a location or an offset) value
* from the current style
*
* @param key a <code>String</code>
* @return a <code>Point</code> or null if key is not found
* in the current style
*
@ -205,7 +203,6 @@ class XPStyle {
/** Get a named <code>Insets</code> value from the current style
*
* @param key a <code>String</code>
* @return an <code>Insets</code> object or null if key is not found
* in the current style
*
@ -223,7 +220,6 @@ class XPStyle {
/** Get a named <code>Color</code> value from the current style
*
* @param part a <code>Part</code>
* @return a <code>Color</code> or null if key is not found
* in the current style
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -90,7 +90,7 @@ abstract class AbstractMixer extends AbstractLine implements Mixer {
/**
* Constructs a new AbstractMixer.
* @param mixer the mixer with which this line is associated
* @param mixerInfo the mixer with which this line is associated
* @param controls set of supported controls
*/
protected AbstractMixer(Mixer.Info mixerInfo,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 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
@ -27,6 +27,7 @@ package com.sun.media.sound;
import java.util.Map;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Synthesizer;
import javax.sound.sampled.AudioFormat;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -163,7 +163,6 @@ abstract class SunFileReader extends AudioFileReader {
* rllong
* Protected helper method to read 64 bits and changing the order of
* each bytes.
* @param DataInputStream
* @return 32 bits swapped value.
* @exception IOException
*/
@ -187,7 +186,6 @@ abstract class SunFileReader extends AudioFileReader {
/**
* big2little
* Protected helper method to swap the order of bytes in a 32 bit int
* @param int
* @return 32 bits swapped value
*/
final int big2little(int i) {
@ -207,7 +205,6 @@ abstract class SunFileReader extends AudioFileReader {
/**
* rlshort
* Protected helper method to read 16 bits value. Swap high with low byte.
* @param DataInputStream
* @return the swapped value.
* @exception IOException
*/
@ -229,7 +226,6 @@ abstract class SunFileReader extends AudioFileReader {
/**
* big2little
* Protected helper method to swap the order of bytes in a 16 bit short
* @param int
* @return 16 bits swapped value
*/
final short big2littleShort(short i) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -69,7 +69,6 @@ abstract class SunFileWriter extends AudioFileWriter {
* rllong
* Protected helper method to read 64 bits and changing the order of
* each bytes.
* @param DataInputStream
* @return 32 bits swapped value.
* @exception IOException
*/
@ -93,7 +92,6 @@ abstract class SunFileWriter extends AudioFileWriter {
/**
* big2little
* Protected helper method to swap the order of bytes in a 32 bit int
* @param int
* @return 32 bits swapped value
*/
final int big2little(int i) {
@ -113,7 +111,6 @@ abstract class SunFileWriter extends AudioFileWriter {
/**
* rlshort
* Protected helper method to read 16 bits value. Swap high with low byte.
* @param DataInputStream
* @return the swapped value.
* @exception IOException
*/
@ -135,7 +132,6 @@ abstract class SunFileWriter extends AudioFileWriter {
/**
* big2little
* Protected helper method to swap the order of bytes in a 16 bit short
* @param int
* @return 16 bits swapped value
*/
final short big2littleShort(short i) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -54,7 +54,7 @@ public final class Toolkit {
/**
* Swaps bytes.
* @throws ArrayOutOfBoundsException if len is not a multiple of 2.
* @throws ArrayIndexOutOfBoundsException if len is not a multiple of 2.
*/
static void getByteSwapped(byte[] b, int off, int len) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -58,6 +58,7 @@ import java.security.AccessControlContext;
import javax.accessibility.*;
import java.applet.Applet;
import javax.swing.JComponent;
import javax.swing.JRootPane;
import sun.awt.ComponentFactory;
import sun.security.action.GetPropertyAction;
@ -6232,7 +6233,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
/**
* Indicates whether a class or its superclasses override coalesceEvents.
* Must be called with lock on coalesceMap and privileged.
* @see checkCoalescing
* @see #checkCoalescing
*/
private static boolean isCoalesceEventsOverriden(Class<?> clazz) {
assert Thread.holdsLock(coalesceMap);
@ -10406,7 +10407,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* </ul>
* <p>
* The most common example when the 'mixing-cutout' shape is needed is a
* glass pane component. The {@link JRootPane#setGlassPane()} method
* glass pane component. The {@link JRootPane#setGlassPane} method
* automatically sets the <i>empty-shape</i> as the 'mixing-cutout' shape
* for the given glass pane component. If a developer needs some other
* 'mixing-cutout' shape for the glass pane (which is rare), this must be

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -25,9 +25,12 @@
package java.awt;
import java.awt.desktop.AboutEvent;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.OpenURIEvent;
import java.awt.desktop.OpenURIHandler;
import java.awt.desktop.PreferencesEvent;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitHandler;
@ -42,8 +45,9 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import sun.awt.SunToolkit;
import javax.swing.JMenuBar;
import sun.awt.SunToolkit;
import sun.security.util.SecurityConstants;
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -41,6 +41,7 @@ import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
import java.text.AttributedCharacterIterator.Attribute;
import java.text.CharacterIterator;
import java.util.EventListener;
import java.util.Hashtable;
import java.util.Locale;
import java.util.Map;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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,7 +29,9 @@ import java.awt.event.KeyEvent;
import java.awt.peer.MenuPeer;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Enumeration;
import java.util.EventListener;
import java.util.Vector;
import javax.accessibility.Accessible;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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,7 +29,9 @@ import java.awt.event.KeyEvent;
import java.awt.peer.MenuBarPeer;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Enumeration;
import java.util.EventListener;
import java.util.Vector;
import javax.accessibility.Accessible;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,10 @@
package java.awt;
import java.awt.image.Raster;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.image.ColorModel;
import java.awt.image.Raster;
/**
* The {@code PaintContext} interface defines the encapsulated

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -25,15 +25,17 @@
package java.awt;
import java.util.Vector;
import java.awt.event.ActionListener;
import java.awt.peer.SystemTrayPeer;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
import sun.awt.HeadlessToolkit;
import java.util.Vector;
import sun.awt.AWTAccessor;
import sun.awt.AWTPermissions;
import sun.awt.AppContext;
import sun.awt.HeadlessToolkit;
import sun.awt.SunToolkit;
/**
* The {@code SystemTray} class represents the system tray for a

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -451,7 +451,7 @@ public abstract class Toolkit {
*
* @param s the error message
* @param e the original exception
* @throws the new AWTError including the cause (the original exception)
* @throws AWTError the new AWTError including the cause (the original exception)
*/
private static void newAWTError(Throwable e, String s) {
AWTError newAWTError = new AWTError(s);

View File

@ -1081,7 +1081,7 @@ public class ICC_Profile implements Serializable {
* when loading this profile.
* If deferring is enabled, then the deferred activation
* code will take care of access privileges.
* @see activateDeferredProfile()
* @see #activateDeferredProfile()
*/
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
if (!ProfileDeferralMgr.deferring) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,6 @@ public class FilesEvent extends AppEvent {
/**
* Constructs a {@code FilesEvent}
* @param files files
* @param searchTerm searchTerm
*/
FilesEvent(final List<File> files) {
this.files = files;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -47,7 +47,7 @@ class CharArrayIterator implements CharacterIterator {
* Sets the position to getBeginIndex() and returns the character at that
* position.
* @return the first character in the text, or DONE if the text is empty
* @see getBeginIndex
* @see #getBeginIndex
*/
public char first() {
@ -59,7 +59,7 @@ class CharArrayIterator implements CharacterIterator {
* Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty)
* and returns the character at that position.
* @return the last character in the text, or DONE if the text is empty
* @see getEndIndex
* @see #getEndIndex
*/
public char last() {
@ -76,7 +76,7 @@ class CharArrayIterator implements CharacterIterator {
* Gets the character at the current position (as returned by getIndex()).
* @return the character at the current position or DONE if the current
* position is off the end of the text.
* @see getIndex
* @see #getIndex
*/
public char current() {

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