Merge
This commit is contained in:
commit
26159f7c2d
@ -426,3 +426,5 @@ b94be69cbb1d2943b886bf2d458745756df146e4 jdk-10+9
|
||||
4c12464a907db4656c1033f56fa49cba643ac629 jdk-9+171
|
||||
6558c37afe832582238d338578d598f30c6fdd75 jdk-10+10
|
||||
2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172
|
||||
6b750cdb823a029a25ff2e560302cc2d28a86cb6 jdk-10+11
|
||||
88d7fd969e7df0e07a53b201cfd29393ca33ede9 jdk-9+173
|
||||
|
@ -387,7 +387,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().match('SPARC-.7')) {
|
||||
if (cpu_brand.trim().match('SPARC-.[78]')) {
|
||||
boot_jdk_revision = "8u20";
|
||||
boot_jdk_subdirpart = "1.8.0_20";
|
||||
}
|
||||
|
@ -586,3 +586,5 @@ f5ded0cf954c770deeecb80f2ba1ba6a05cd979b jdk-10+8
|
||||
d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171
|
||||
c6cd3ec8d46b034e57c86399380ffcf7f25706e4 jdk-10+10
|
||||
1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172
|
||||
7f14e550f1e8abea41c223e5fdad2261e99ba929 jdk-10+11
|
||||
e64b1cb48d6e7703928a9d1da106fc27f8cb65fd jdk-9+173
|
||||
|
@ -139,7 +139,7 @@ void metadata_Relocation::pd_fix_value(address x) {
|
||||
#ifdef AARCH64
|
||||
#ifdef COMPILER2
|
||||
NativeMovConstReg* ni = nativeMovConstReg_at(addr());
|
||||
if (ni->is_movz()) {
|
||||
if (ni->is_mov_slow()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "opto/arraycopynode.hpp"
|
||||
#include "opto/graphKit.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
|
||||
ArrayCopyNode::ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard)
|
||||
: CallNode(arraycopy_type(), NULL, TypeRawPtr::BOTTOM),
|
||||
@ -631,42 +632,76 @@ bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
|
||||
return CallNode::may_modify_arraycopy_helper(dest_t, t_oop, phase);
|
||||
}
|
||||
|
||||
bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac) {
|
||||
if (n->Opcode() == Op_StoreCM ||
|
||||
n->Opcode() == Op_StoreB) {
|
||||
// Ignore card mark stores
|
||||
n = n->in(MemNode::Memory);
|
||||
}
|
||||
|
||||
if (n->is_Proj()) {
|
||||
n = n->in(0);
|
||||
if (n->is_Call() && n->as_Call()->may_modify(t_oop, phase)) {
|
||||
if (n->isa_ArrayCopy() != NULL) {
|
||||
ac = n->as_ArrayCopy();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call) {
|
||||
if (n != NULL &&
|
||||
n->is_Call() &&
|
||||
n->as_Call()->may_modify(t_oop, phase) &&
|
||||
(n->as_Call()->is_ArrayCopy() || n->as_Call()->is_call_to_arraycopystub())) {
|
||||
call = n->as_Call();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) {
|
||||
Node* mem = mb->in(TypeFunc::Memory);
|
||||
|
||||
if (mem->is_MergeMem()) {
|
||||
Node* n = mem->as_MergeMem()->memory_at(Compile::AliasIdxRaw);
|
||||
if (may_modify_helper(t_oop, n, phase, ac)) {
|
||||
return true;
|
||||
} else if (n->is_Phi()) {
|
||||
for (uint i = 1; i < n->req(); i++) {
|
||||
if (n->in(i) != NULL) {
|
||||
if (may_modify_helper(t_oop, n->in(i), phase, ac)) {
|
||||
return true;
|
||||
static Node* step_over_gc_barrier(Node* c) {
|
||||
if (UseG1GC && !GraphKit::use_ReduceInitialCardMarks() &&
|
||||
c != NULL && c->is_Region() && c->req() == 3) {
|
||||
for (uint i = 1; i < c->req(); i++) {
|
||||
if (c->in(i) != NULL && c->in(i)->is_Region() &&
|
||||
c->in(i)->req() == 3) {
|
||||
Node* r = c->in(i);
|
||||
for (uint j = 1; j < r->req(); j++) {
|
||||
if (r->in(j) != NULL && r->in(j)->is_Proj() &&
|
||||
r->in(j)->in(0) != NULL &&
|
||||
r->in(j)->in(0)->Opcode() == Op_CallLeaf &&
|
||||
r->in(j)->in(0)->as_Call()->entry_point() == CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post)) {
|
||||
Node* call = r->in(j)->in(0);
|
||||
c = c->in(i == 1 ? 2 : 1);
|
||||
if (c != NULL) {
|
||||
c = c->in(0);
|
||||
if (c != NULL) {
|
||||
c = c->in(0);
|
||||
assert(call->in(0) == NULL ||
|
||||
call->in(0)->in(0) == NULL ||
|
||||
call->in(0)->in(0)->in(0) == NULL ||
|
||||
call->in(0)->in(0)->in(0)->in(0) == NULL ||
|
||||
call->in(0)->in(0)->in(0)->in(0)->in(0) == NULL ||
|
||||
c == call->in(0)->in(0)->in(0)->in(0)->in(0), "bad barrier shape");
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) {
|
||||
|
||||
Node* c = mb->in(0);
|
||||
|
||||
// step over g1 gc barrier if we're at a clone with ReduceInitialCardMarks off
|
||||
c = step_over_gc_barrier(c);
|
||||
|
||||
CallNode* call = NULL;
|
||||
if (c != NULL && c->is_Region()) {
|
||||
for (uint i = 1; i < c->req(); i++) {
|
||||
if (c->in(i) != NULL) {
|
||||
Node* n = c->in(i)->in(0);
|
||||
if (may_modify_helper(t_oop, n, phase, call)) {
|
||||
ac = call->isa_ArrayCopy();
|
||||
assert(c == mb->in(0), "only for clone");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (may_modify_helper(t_oop, c->in(0), phase, call)) {
|
||||
ac = call->isa_ArrayCopy();
|
||||
assert(c == mb->in(0) || (ac != NULL && ac->is_clonebasic() && !GraphKit::use_ReduceInitialCardMarks()), "only for clone");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -677,37 +712,77 @@ bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTra
|
||||
// between offset_lo and offset_hi
|
||||
// if must_modify is true, return true if the copy is guaranteed to
|
||||
// write between offset_lo and offset_hi
|
||||
bool ArrayCopyNode::modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) {
|
||||
bool ArrayCopyNode::modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const {
|
||||
assert(_kind == ArrayCopy || _kind == CopyOf || _kind == CopyOfRange, "only for real array copies");
|
||||
|
||||
Node* dest = in(ArrayCopyNode::Dest);
|
||||
Node* src_pos = in(ArrayCopyNode::SrcPos);
|
||||
Node* dest_pos = in(ArrayCopyNode::DestPos);
|
||||
Node* len = in(ArrayCopyNode::Length);
|
||||
Node* dest = in(Dest);
|
||||
Node* dest_pos = in(DestPos);
|
||||
Node* len = in(Length);
|
||||
|
||||
const TypeInt *dest_pos_t = phase->type(dest_pos)->isa_int();
|
||||
const TypeInt *len_t = phase->type(len)->isa_int();
|
||||
const TypeAryPtr* ary_t = phase->type(dest)->isa_aryptr();
|
||||
|
||||
if (dest_pos_t != NULL && len_t != NULL && ary_t != NULL) {
|
||||
BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
|
||||
uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
|
||||
uint elemsize = type2aelembytes(ary_elem);
|
||||
if (dest_pos_t == NULL || len_t == NULL || ary_t == NULL) {
|
||||
return !must_modify;
|
||||
}
|
||||
|
||||
jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
|
||||
jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
|
||||
jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
|
||||
jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
|
||||
BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
|
||||
uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
|
||||
uint elemsize = type2aelembytes(ary_elem);
|
||||
|
||||
if (must_modify) {
|
||||
if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) {
|
||||
return true;
|
||||
}
|
||||
jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
|
||||
jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
|
||||
jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
|
||||
jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
|
||||
|
||||
if (must_modify) {
|
||||
if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// We try to replace a load from the destination of an arraycopy with
|
||||
// a load from the source so the arraycopy has a chance to be
|
||||
// eliminated. It's only valid if the arraycopy doesn't change the
|
||||
// element that would be loaded from the source array.
|
||||
bool ArrayCopyNode::can_replace_dest_load_with_src_load(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase) const {
|
||||
assert(_kind == ArrayCopy || _kind == CopyOf || _kind == CopyOfRange, "only for real array copies");
|
||||
|
||||
Node* src = in(Src);
|
||||
Node* dest = in(Dest);
|
||||
|
||||
// Check whether, assuming source and destination are the same
|
||||
// array, the arraycopy modifies the element from the source we
|
||||
// would load.
|
||||
if ((src != dest && in(SrcPos) == in(DestPos)) || !modifies(offset_lo, offset_hi, phase, false)) {
|
||||
// if not the transformation is legal
|
||||
return true;
|
||||
}
|
||||
|
||||
AllocateNode* src_alloc = AllocateNode::Ideal_allocation(src, phase);
|
||||
AllocateNode* dest_alloc = AllocateNode::Ideal_allocation(dest, phase);
|
||||
|
||||
// Check whether source and destination can be proved to be
|
||||
// different arrays
|
||||
const TypeOopPtr* t_src = phase->type(src)->isa_oopptr();
|
||||
const TypeOopPtr* t_dest = phase->type(dest)->isa_oopptr();
|
||||
|
||||
if (t_src != NULL && t_dest != NULL &&
|
||||
(t_src->is_known_instance() || t_dest->is_known_instance()) &&
|
||||
t_src->instance_id() != t_dest->instance_id()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (MemNode::detect_ptr_independence(src->uncast(), src_alloc, dest->uncast(), dest_alloc, phase)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ private:
|
||||
BasicType copy_type, const Type* value_type, int count);
|
||||
bool finish_transform(PhaseGVN *phase, bool can_reshape,
|
||||
Node* ctl, Node *mem);
|
||||
static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac);
|
||||
static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call);
|
||||
|
||||
public:
|
||||
|
||||
@ -167,7 +167,8 @@ public:
|
||||
bool has_negative_length_guard() const { return _has_negative_length_guard; }
|
||||
|
||||
static bool may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac);
|
||||
bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify);
|
||||
bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const;
|
||||
bool can_replace_dest_load_with_src_load(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase) const;
|
||||
|
||||
#ifndef PRODUCT
|
||||
virtual void dump_spec(outputStream *st) const;
|
||||
|
@ -1860,6 +1860,9 @@ void IdealLoopTree::dump_head( ) const {
|
||||
if (_required_safept != NULL && _required_safept->size() > 0) {
|
||||
tty->print(" req={"); _required_safept->dump_simple(); tty->print(" }");
|
||||
}
|
||||
if (Verbose) {
|
||||
tty->print(" body={"); _body.dump_simple(); tty->print(" }");
|
||||
}
|
||||
tty->cr();
|
||||
}
|
||||
|
||||
|
@ -913,7 +913,11 @@ Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
|
||||
|
||||
if (n->is_ConstraintCast()) {
|
||||
Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this);
|
||||
if (dom_cast != NULL) {
|
||||
// ConstraintCastNode::dominating_cast() uses node control input to determine domination.
|
||||
// Node control inputs don't necessarily agree with loop control info (due to
|
||||
// transformations happened in between), thus additional dominance check is needed
|
||||
// to keep loop info valid.
|
||||
if (dom_cast != NULL && is_dominator(get_ctrl(dom_cast), get_ctrl(n))) {
|
||||
_igvn.replace_node(n, dom_cast);
|
||||
return dom_cast;
|
||||
}
|
||||
|
@ -1047,7 +1047,9 @@ void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
|
||||
// opportunities for allocation elimination
|
||||
Node* src = ac->in(ArrayCopyNode::Src);
|
||||
ac->replace_edge(src, top());
|
||||
if (src->outcnt() == 0) {
|
||||
// src can be top at this point if src and dest of the
|
||||
// arraycopy were the same
|
||||
if (src->outcnt() == 0 && !src->is_top()) {
|
||||
_igvn.remove_dead_node(src);
|
||||
}
|
||||
|
||||
|
@ -718,6 +718,15 @@ Node* PhaseMacroExpand::generate_arraycopy(ArrayCopyNode *ac, AllocateArrayNode*
|
||||
_igvn.replace_node(_ioproj_fallthrough, *io);
|
||||
_igvn.replace_node(_fallthroughcatchproj, *ctrl);
|
||||
|
||||
#ifdef ASSERT
|
||||
const TypeOopPtr* dest_t = _igvn.type(dest)->is_oopptr();
|
||||
if (dest_t->is_known_instance()) {
|
||||
ArrayCopyNode* ac = NULL;
|
||||
assert(ArrayCopyNode::may_modify(dest_t, (*ctrl)->in(0)->as_MemBar(), &_igvn, ac), "dependency on arraycopy lost");
|
||||
assert(ac == NULL, "no arraycopy anymore");
|
||||
}
|
||||
#endif
|
||||
|
||||
return out_mem;
|
||||
}
|
||||
|
||||
@ -1139,8 +1148,25 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
|
||||
const TypeAryPtr* top_src = src_type->isa_aryptr();
|
||||
const TypeAryPtr* top_dest = dest_type->isa_aryptr();
|
||||
|
||||
if (top_src == NULL || top_src->klass() == NULL ||
|
||||
top_dest == NULL || top_dest->klass() == NULL) {
|
||||
BasicType src_elem = T_CONFLICT;
|
||||
BasicType dest_elem = T_CONFLICT;
|
||||
|
||||
if (top_dest != NULL && top_dest->klass() != NULL) {
|
||||
dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
|
||||
}
|
||||
if (top_src != NULL && top_src->klass() != NULL) {
|
||||
src_elem = top_src->klass()->as_array_klass()->element_type()->basic_type();
|
||||
}
|
||||
if (src_elem == T_ARRAY) src_elem = T_OBJECT;
|
||||
if (dest_elem == T_ARRAY) dest_elem = T_OBJECT;
|
||||
|
||||
if (ac->is_arraycopy_validated() &&
|
||||
dest_elem != T_CONFLICT &&
|
||||
src_elem == T_CONFLICT) {
|
||||
src_elem = dest_elem;
|
||||
}
|
||||
|
||||
if (src_elem == T_CONFLICT || dest_elem == T_CONFLICT) {
|
||||
// Conservatively insert a memory barrier on all memory slices.
|
||||
// Do not let writes into the source float below the arraycopy.
|
||||
{
|
||||
@ -1169,13 +1195,11 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!ac->is_arraycopy_validated() || (src_elem == dest_elem && dest_elem != T_VOID), "validated but different basic types");
|
||||
|
||||
// (2) src and dest arrays must have elements of the same BasicType
|
||||
// Figure out the size and type of the elements we will be copying.
|
||||
BasicType src_elem = top_src->klass()->as_array_klass()->element_type()->basic_type();
|
||||
BasicType dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
|
||||
if (src_elem == T_ARRAY) src_elem = T_OBJECT;
|
||||
if (dest_elem == T_ARRAY) dest_elem = T_OBJECT;
|
||||
|
||||
if (src_elem != dest_elem || dest_elem == T_VOID) {
|
||||
// The component types are not the same or are not recognized. Punt.
|
||||
// (But, avoid the native method wrapper to JVM_ArrayCopy.)
|
||||
|
@ -908,10 +908,11 @@ Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseTransform* phase) const {
|
||||
ld->set_req(0, ld_alloc->in(0));
|
||||
}
|
||||
} else {
|
||||
Node* src = ac->in(ArrayCopyNode::Src);
|
||||
Node* addp = in(MemNode::Address)->clone();
|
||||
assert(addp->in(AddPNode::Base) == addp->in(AddPNode::Address), "should be");
|
||||
addp->set_req(AddPNode::Base, ac->in(ArrayCopyNode::Src));
|
||||
addp->set_req(AddPNode::Address, ac->in(ArrayCopyNode::Src));
|
||||
addp->set_req(AddPNode::Base, src);
|
||||
addp->set_req(AddPNode::Address, src);
|
||||
|
||||
const TypeAryPtr* ary_t = phase->type(in(MemNode::Address))->isa_aryptr();
|
||||
BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
|
||||
@ -928,6 +929,12 @@ Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseTransform* phase) const {
|
||||
addp->set_req(AddPNode::Offset, offset);
|
||||
ld->set_req(MemNode::Address, phase->transform(addp));
|
||||
|
||||
const TypeX *ld_offs_t = phase->type(offset)->isa_intptr_t();
|
||||
|
||||
if (!ac->as_ArrayCopy()->can_replace_dest_load_with_src_load(ld_offs_t->_lo, ld_offs_t->_hi, phase)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (in(0) != NULL) {
|
||||
assert(ac->in(0) != NULL, "alloc must have control");
|
||||
ld->set_req(0, ac->in(0));
|
||||
|
File diff suppressed because it is too large
Load Diff
106
hotspot/test/compiler/arraycopy/TestACSameSrcDst.java
Normal file
106
hotspot/test/compiler/arraycopy/TestACSameSrcDst.java
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Red Hat, Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8179678
|
||||
* @summary ArrayCopy with same src and dst can cause incorrect execution or compiler crash
|
||||
*
|
||||
* @run main/othervm -XX:CompileCommand=compileonly,TestACSameSrcDst::test* TestACSameSrcDst
|
||||
*
|
||||
*/
|
||||
|
||||
public class TestACSameSrcDst {
|
||||
|
||||
static int test1(int[] src, int[] dst) {
|
||||
System.arraycopy(src, 5, dst, 0, 10);
|
||||
// this shouldn't be transformed to src[5] because the copy
|
||||
// can modify src[5] if src and dst are the same.
|
||||
return dst[0];
|
||||
}
|
||||
|
||||
static int test2(int[] src) {
|
||||
System.arraycopy(src, 0, src, 0, 10);
|
||||
// same source and destination. If load from destination is
|
||||
// transformed to load of source, the compiler performs that
|
||||
// optimization in an infinite loop.
|
||||
return src[0];
|
||||
}
|
||||
|
||||
static int test3() {
|
||||
int[] src = new int[15];
|
||||
src[5] = 0x42;
|
||||
System.arraycopy(src, 5, src, 0, 10);
|
||||
// That load can't bypass the arraycopy
|
||||
return src[0];
|
||||
}
|
||||
|
||||
static int test4() {
|
||||
int[] src = new int[15];
|
||||
System.arraycopy(src, 0, src, 5, 10);
|
||||
return src[0];
|
||||
}
|
||||
|
||||
// The dst[0] load can't bypass the arraycopy. After ArrayCopyNode
|
||||
// is expanded, C2 looks for a stub call on the control paths of
|
||||
// the array copy subgraph to decide whether the load's memory
|
||||
// input can bypass the arraycopy. This test verifies the case of
|
||||
// a source array that's not declared as an array.
|
||||
static int test5(Object src, int l, boolean flag) {
|
||||
int[] dst = new int[10];
|
||||
if (flag) {
|
||||
dst[0] = 0x42;
|
||||
System.arraycopy(src, 0, dst, 0, l);
|
||||
return dst[0];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
int[] array = new int[15];
|
||||
for (int i = 0; i < 20000; i++) {
|
||||
int res;
|
||||
for (int j = 0; j < array.length; j++) {
|
||||
array[j] = j;
|
||||
}
|
||||
int expected = array[5];
|
||||
res = test1(array, array);
|
||||
if (res != expected) {
|
||||
throw new RuntimeException("bad result: " + res + " != " + expected);
|
||||
}
|
||||
test2(array);
|
||||
res = test3();
|
||||
if (res != 0x42) {
|
||||
throw new RuntimeException("bad result: " + res + " != " + 0x42);
|
||||
}
|
||||
test4();
|
||||
for (int j = 0; j < array.length; j++) {
|
||||
array[j] = j;
|
||||
}
|
||||
res = test5(array, 10, (i%2) == 0);
|
||||
if (res != 0) {
|
||||
throw new RuntimeException("bad result: " + res + " != " + 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -426,3 +426,5 @@ b9409a7daa6c793dd631e52fe6ef79d08a3b337a jdk-10+9
|
||||
29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171
|
||||
df64bd4757d0d130d62a22b8143ba31d3a16ac18 jdk-10+10
|
||||
0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172
|
||||
7c54889c0ec649ee04643e5cace434623d0dc667 jdk-10+11
|
||||
a5506b425f1bf91530d8417b57360e5d89328c0c jdk-9+173
|
||||
|
@ -30,7 +30,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jaotc, \
|
||||
MAIN_CLASS := jdk.tools.jaotc.Main, \
|
||||
JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
|
||||
EXTRA_JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
@ -38,12 +38,13 @@ $(eval $(call SetupBuildLauncher, jaotc, \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
, \
|
||||
JAVA_ARGS := --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
-XX:+UseAOT \
|
||||
-Djvmci.UseProfilingInformation=false \
|
||||
-Dgraal.UseExceptionProbability=false \
|
||||
|
@ -66,7 +66,10 @@ JAVA_MANIFEST := $(JDK_TOPDIR)/src/java.base/windows/native/launcher/java.manife
|
||||
# MAIN_MODULE The module of the main class to launch if different from the
|
||||
# current module
|
||||
# MAIN_CLASS The Java main class to launch
|
||||
# JAVA_ARGS Processed into a -DJAVA_ARGS C flag
|
||||
# JAVA_ARGS Processed into a -DJAVA_ARGS and added to CFLAGS
|
||||
# EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prepended
|
||||
# before JAVA_ARGS to CFLAGS, primarily to allow long string literal
|
||||
# compile time defines exceeding Visual Studio 2013 limitations.
|
||||
# CFLAGS Additional CFLAGS
|
||||
# CFLAGS_windows Additional CFLAGS_windows
|
||||
# LIBS_unix Additional LIBS_unix
|
||||
@ -104,6 +107,11 @@ define SetupBuildLauncherBody
|
||||
endif
|
||||
|
||||
ifneq ($$($1_JAVA_ARGS), )
|
||||
ifneq ($$($1_EXTRA_JAVA_ARGS), )
|
||||
$1_EXTRA_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
|
||||
$$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR)
|
||||
endif
|
||||
$1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
|
||||
$$(addprefix -J, $$($1_JAVA_ARGS)) -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
|
||||
|
@ -132,7 +132,8 @@ TARGETS += $(BUILD_LIBVERIFY)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
|
||||
# Allow a custom makefile to add extra src dirs
|
||||
LIBJAVA_SRC_DIRS += $(call FindSrcDirsForLib, java.base, java)
|
||||
|
||||
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
|
||||
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -549,12 +549,20 @@ class LDMLParseHandler extends AbstractLDMLHandler<Object> {
|
||||
case "decimal":
|
||||
// for FormatData
|
||||
// copy string for later assembly into NumberElements
|
||||
pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/decimal");
|
||||
if (currentContainer.getqName().equals("symbols")) {
|
||||
pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/decimal");
|
||||
} else {
|
||||
pushIgnoredContainer(qName);
|
||||
}
|
||||
break;
|
||||
case "group":
|
||||
// for FormatData
|
||||
// copy string for later assembly into NumberElements
|
||||
pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/group");
|
||||
if (currentContainer.getqName().equals("symbols")) {
|
||||
pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/group");
|
||||
} else {
|
||||
pushIgnoredContainer(qName);
|
||||
}
|
||||
break;
|
||||
case "list":
|
||||
// for FormatData
|
||||
|
203
jdk/make/src/classes/build/tools/jigsaw/ListPackages.java
Normal file
203
jdk/make/src/classes/build/tools/jigsaw/ListPackages.java
Normal file
@ -0,0 +1,203 @@
|
||||
/*
|
||||
* 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.jigsaw;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.lang.module.ModuleFinder;
|
||||
import java.lang.module.ModuleReference;
|
||||
import java.net.URI;
|
||||
import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Run this tool to generate the JDK internal APIs in the previous releases
|
||||
* including platform-specific internal APIs.
|
||||
*/
|
||||
public class ListPackages {
|
||||
// Filter non-interesting JAR files
|
||||
private final static List<String> excludes = Arrays.asList(
|
||||
"deploy.jar",
|
||||
"javaws.jar",
|
||||
"plugin.jar",
|
||||
"cldrdata.jar",
|
||||
"localedata.jar"
|
||||
);
|
||||
private static void usage() {
|
||||
System.out.println("ListPackages [-o <outfile>] [-jdkinternals] <javaHome> [<javaHome>]*");
|
||||
}
|
||||
|
||||
private static final Set<String> EXPORTED_PACKAGES = new HashSet<>();
|
||||
|
||||
public static void main(String... args) throws IOException {
|
||||
List<Path> paths = new ArrayList<>();
|
||||
Path outFile = null;
|
||||
boolean jdkinternals = false;
|
||||
int i=0;
|
||||
while (i < args.length) {
|
||||
String arg = args[i++];
|
||||
if (arg.equals("-o")) {
|
||||
outFile = Paths.get(args[i++]);
|
||||
} else if (arg.equals("-jdkinternals")) {
|
||||
jdkinternals = true;
|
||||
} else {
|
||||
Path p = Paths.get(arg);
|
||||
if (Files.notExists(p))
|
||||
throw new IllegalArgumentException(p + " not exist");
|
||||
paths.add(p);
|
||||
}
|
||||
}
|
||||
if (paths.isEmpty()) {
|
||||
usage();
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
// Get the exported APIs from the current JDK releases
|
||||
Path javaHome = Paths.get(System.getProperty("java.home"));
|
||||
ModuleFinder.ofSystem().findAll()
|
||||
.stream()
|
||||
.map(ModuleReference::descriptor)
|
||||
.filter(md -> !md.name().equals("jdk.unsupported"))
|
||||
.flatMap(md -> md.exports().stream())
|
||||
.filter(exp -> !exp.isQualified())
|
||||
.map(ModuleDescriptor.Exports::source)
|
||||
.forEach(EXPORTED_PACKAGES::add);
|
||||
|
||||
ListPackages listPackages = new ListPackages(paths);
|
||||
Stream<String> pkgs = listPackages.packages().stream();
|
||||
if (jdkinternals) {
|
||||
pkgs = pkgs.filter(pn -> !EXPORTED_PACKAGES.contains(pn));
|
||||
}
|
||||
if (outFile != null) {
|
||||
try (OutputStream out = Files.newOutputStream(outFile);
|
||||
PrintStream pw = new PrintStream(out)) {
|
||||
write(pw, pkgs);
|
||||
}
|
||||
} else {
|
||||
write(System.out, pkgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void write(PrintStream pw, Stream<String> packages) {
|
||||
pw.println("# This file is auto-generated by ListPackages tool on " +
|
||||
LocalDateTime.now().toString());
|
||||
packages.sorted().forEach(pw::println);
|
||||
}
|
||||
|
||||
private final Set<String> packages = new HashSet<>();
|
||||
ListPackages(List<Path> dirs) throws IOException {
|
||||
for (Path p : dirs) {
|
||||
packages.addAll(list(p));
|
||||
}
|
||||
}
|
||||
|
||||
Set<String> packages() {
|
||||
return packages;
|
||||
}
|
||||
|
||||
private Set<String> list(Path javaHome) throws IOException {
|
||||
Path jrt = javaHome.resolve("lib").resolve("modules");
|
||||
Path jre = javaHome.resolve("jre");
|
||||
|
||||
if (Files.exists(jrt)) {
|
||||
return listModularRuntime(javaHome);
|
||||
} else if (Files.exists(jre.resolve("lib").resolve("rt.jar"))) {
|
||||
return listLegacyRuntime(javaHome);
|
||||
}
|
||||
throw new IllegalArgumentException("invalid " + javaHome);
|
||||
}
|
||||
|
||||
private Set<String> listModularRuntime(Path javaHome) throws IOException {
|
||||
Map<String, String> env = new HashMap<>();
|
||||
env.put("java.home", javaHome.toString());
|
||||
FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), env);
|
||||
Path root = fs.getPath("packages");
|
||||
return Files.walk(root, 1)
|
||||
.map(Path::getFileName)
|
||||
.map(Path::toString)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
private Set<String> listLegacyRuntime(Path javaHome) throws IOException {
|
||||
List<Path> dirs = new ArrayList<>();
|
||||
Path jre = javaHome.resolve("jre");
|
||||
Path lib = javaHome.resolve("lib");
|
||||
|
||||
dirs.add(jre.resolve("lib"));
|
||||
dirs.add(jre.resolve("lib").resolve("ext"));
|
||||
dirs.add(lib.resolve("tools.jar"));
|
||||
dirs.add(lib.resolve("jconsole.jar"));
|
||||
Set<String> packages = new HashSet<>();
|
||||
for (Path d : dirs) {
|
||||
Files.find(d, 1, (Path p, BasicFileAttributes attr)
|
||||
-> p.getFileName().toString().endsWith(".jar") &&
|
||||
!excludes.contains(p.getFileName().toString()))
|
||||
.map(ListPackages::walkJarFile)
|
||||
.forEach(packages::addAll);
|
||||
}
|
||||
return packages;
|
||||
}
|
||||
|
||||
static Set<String> walkJarFile(Path jarfile) {
|
||||
try (JarFile jf = new JarFile(jarfile.toFile())) {
|
||||
return jf.stream()
|
||||
.map(JarEntry::getName)
|
||||
.filter(n -> n.endsWith(".class"))
|
||||
.map(ListPackages::toPackage)
|
||||
.collect(Collectors.toSet());
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
static String toPackage(String name) {
|
||||
int i = name.lastIndexOf('/');
|
||||
if (i < 0) {
|
||||
System.err.format("Warning: unnamed package %s%n", name);
|
||||
}
|
||||
return i >= 0 ? name.substring(0, i).replace("/", ".") : "";
|
||||
}
|
||||
}
|
@ -403,6 +403,7 @@ import java.lang.module.ModuleFinder;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class RuntimePermission extends BasicPermission {
|
||||
|
@ -1092,13 +1092,24 @@ class LambdaForm {
|
||||
final MemberName member;
|
||||
private @Stable MethodHandle resolvedHandle;
|
||||
@Stable MethodHandle invoker;
|
||||
private final MethodHandleImpl.Intrinsic intrinsicName;
|
||||
|
||||
NamedFunction(MethodHandle resolvedHandle) {
|
||||
this(resolvedHandle.internalMemberName(), resolvedHandle);
|
||||
this(resolvedHandle.internalMemberName(), resolvedHandle, MethodHandleImpl.Intrinsic.NONE);
|
||||
}
|
||||
NamedFunction(MethodHandle resolvedHandle, MethodHandleImpl.Intrinsic intrinsic) {
|
||||
this(resolvedHandle.internalMemberName(), resolvedHandle, intrinsic);
|
||||
}
|
||||
NamedFunction(MemberName member, MethodHandle resolvedHandle) {
|
||||
this(member, resolvedHandle, MethodHandleImpl.Intrinsic.NONE);
|
||||
}
|
||||
NamedFunction(MemberName member, MethodHandle resolvedHandle, MethodHandleImpl.Intrinsic intrinsic) {
|
||||
this.member = member;
|
||||
this.resolvedHandle = resolvedHandle;
|
||||
this.intrinsicName = intrinsic;
|
||||
assert(resolvedHandle == null ||
|
||||
resolvedHandle.intrinsicName() == MethodHandleImpl.Intrinsic.NONE ||
|
||||
resolvedHandle.intrinsicName() == intrinsic) : resolvedHandle.intrinsicName() + " != " + intrinsic;
|
||||
// The following assert is almost always correct, but will fail for corner cases, such as PrivateInvokeTest.
|
||||
//assert(!isInvokeBasic(member));
|
||||
}
|
||||
@ -1111,6 +1122,7 @@ class LambdaForm {
|
||||
// necessary to pass BigArityTest
|
||||
this.member = Invokers.invokeBasicMethod(basicInvokerType);
|
||||
}
|
||||
this.intrinsicName = MethodHandleImpl.Intrinsic.NONE;
|
||||
assert(isInvokeBasic(member));
|
||||
}
|
||||
|
||||
@ -1263,8 +1275,7 @@ class LambdaForm {
|
||||
}
|
||||
|
||||
public MethodHandleImpl.Intrinsic intrinsicName() {
|
||||
return resolvedHandle == null ? MethodHandleImpl.Intrinsic.NONE
|
||||
: resolvedHandle.intrinsicName();
|
||||
return intrinsicName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1741,15 +1752,15 @@ class LambdaForm {
|
||||
Name[] idNames = new Name[] { argument(0, L_TYPE), argument(1, type) };
|
||||
idForm = new LambdaForm(2, idNames, 1, Kind.IDENTITY);
|
||||
idForm.compileToBytecode();
|
||||
idFun = new NamedFunction(idMem, MethodHandleImpl.makeIntrinsic(
|
||||
idMem.getInvocationType(), idForm, MethodHandleImpl.Intrinsic.IDENTITY));
|
||||
idFun = new NamedFunction(idMem, SimpleMethodHandle.make(idMem.getInvocationType(), idForm),
|
||||
MethodHandleImpl.Intrinsic.IDENTITY);
|
||||
|
||||
Object zeValue = Wrapper.forBasicType(btChar).zero();
|
||||
Name[] zeNames = new Name[] { argument(0, L_TYPE), new Name(idFun, zeValue) };
|
||||
zeForm = new LambdaForm(1, zeNames, 1, Kind.ZERO);
|
||||
zeForm.compileToBytecode();
|
||||
zeFun = new NamedFunction(zeMem, MethodHandleImpl.makeIntrinsic(
|
||||
zeMem.getInvocationType(), zeForm, MethodHandleImpl.Intrinsic.ZERO));
|
||||
zeFun = new NamedFunction(zeMem, SimpleMethodHandle.make(zeMem.getInvocationType(), zeForm),
|
||||
MethodHandleImpl.Intrinsic.ZERO);
|
||||
}
|
||||
|
||||
LF_zero[ord] = zeForm;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, 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
|
||||
@ -541,7 +541,7 @@ class LambdaFormEditor {
|
||||
// adjust the arguments
|
||||
MethodHandle aload = MethodHandles.arrayElementGetter(erasedArrayType);
|
||||
for (int i = 0; i < arrayLength; i++) {
|
||||
Name loadArgument = new Name(aload, spreadParam, i);
|
||||
Name loadArgument = new Name(new NamedFunction(aload, Intrinsic.ARRAY_LOAD), spreadParam, i);
|
||||
buf.insertExpression(exprPos + i, loadArgument);
|
||||
buf.replaceParameterByCopy(pos + i, exprPos + i);
|
||||
}
|
||||
@ -604,7 +604,8 @@ class LambdaFormEditor {
|
||||
for (int i = 0; i < collectorArity; i++) {
|
||||
newParams[i] = new Name(pos + i, argType);
|
||||
}
|
||||
Name callCombiner = new Name(arrayCollector, (Object[]) /*...*/ newParams);
|
||||
Name callCombiner = new Name(new NamedFunction(arrayCollector, Intrinsic.NEW_ARRAY),
|
||||
(Object[]) /*...*/ newParams);
|
||||
|
||||
// insert the new expression
|
||||
int exprPos = lambdaForm.arity();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -592,7 +592,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
names[nameCursor++] = new Name(getFunction(NF_checkSpreadArgument), array, spreadArgCount);
|
||||
for (int j = 0; j < spreadArgCount; i++, j++) {
|
||||
indexes[i] = nameCursor;
|
||||
names[nameCursor++] = new Name(aload, array, j);
|
||||
names[nameCursor++] = new Name(new NamedFunction(aload, Intrinsic.ARRAY_LOAD), array, j);
|
||||
}
|
||||
} else if (i < indexes.length) {
|
||||
indexes[i] = argIndex;
|
||||
@ -937,7 +937,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
names[PROFILE] = new Name(getFunction(NF_profileBoolean), names[CALL_TEST], names[GET_COUNTERS]);
|
||||
}
|
||||
// call selectAlternative
|
||||
names[SELECT_ALT] = new Name(getConstantHandle(MH_selectAlternative), names[TEST], names[GET_TARGET], names[GET_FALLBACK]);
|
||||
names[SELECT_ALT] = new Name(new NamedFunction(getConstantHandle(MH_selectAlternative), Intrinsic.SELECT_ALTERNATIVE), names[TEST], names[GET_TARGET], names[GET_FALLBACK]);
|
||||
|
||||
// call target or fallback
|
||||
invokeArgs[0] = names[SELECT_ALT];
|
||||
@ -1008,7 +1008,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
Object[] args = new Object[invokeBasic.type().parameterCount()];
|
||||
args[0] = names[GET_COLLECT_ARGS];
|
||||
System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT-ARG_BASE);
|
||||
names[BOXED_ARGS] = new Name(makeIntrinsic(invokeBasic, Intrinsic.GUARD_WITH_CATCH), args);
|
||||
names[BOXED_ARGS] = new Name(new NamedFunction(invokeBasic, Intrinsic.GUARD_WITH_CATCH), args);
|
||||
|
||||
// t_{i+1}:L=MethodHandleImpl.guardWithCatch(target:L,exType:L,catcher:L,t_{i}:L);
|
||||
Object[] gwcArgs = new Object[] {names[GET_TARGET], names[GET_CLASS], names[GET_CATCHER], names[BOXED_ARGS]};
|
||||
@ -1896,7 +1896,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
Object[] args = new Object[invokeBasic.type().parameterCount()];
|
||||
args[0] = names[GET_COLLECT_ARGS];
|
||||
System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT - ARG_BASE);
|
||||
names[BOXED_ARGS] = new Name(makeIntrinsic(invokeBasic, Intrinsic.LOOP), args);
|
||||
names[BOXED_ARGS] = new Name(new NamedFunction(invokeBasic, Intrinsic.LOOP), args);
|
||||
|
||||
// t_{i+1}:L=MethodHandleImpl.loop(localTypes:L,clauses:L,t_{i}:L);
|
||||
Object[] lArgs =
|
||||
@ -2133,7 +2133,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
Object[] args = new Object[invokeBasic.type().parameterCount()];
|
||||
args[0] = names[GET_COLLECT_ARGS];
|
||||
System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT-ARG_BASE);
|
||||
names[BOXED_ARGS] = new Name(makeIntrinsic(invokeBasic, Intrinsic.TRY_FINALLY), args);
|
||||
names[BOXED_ARGS] = new Name(new NamedFunction(invokeBasic, Intrinsic.TRY_FINALLY), args);
|
||||
|
||||
// t_{i+1}:L=MethodHandleImpl.tryFinally(target:L,exType:L,catcher:L,t_{i}:L);
|
||||
Object[] tfArgs = new Object[] {names[GET_TARGET], names[GET_CLEANUP], names[BOXED_ARGS]};
|
||||
@ -2225,9 +2225,8 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "fillNewTypedArray",
|
||||
MethodType.methodType(Object[].class, Object[].class, Integer.class, Object[].class));
|
||||
case MH_selectAlternative:
|
||||
return makeIntrinsic(IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative",
|
||||
MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class)),
|
||||
Intrinsic.SELECT_ALTERNATIVE);
|
||||
return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative",
|
||||
MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class));
|
||||
case MH_countedLoopPred:
|
||||
return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "countedLoopPredicate",
|
||||
MethodType.methodType(boolean.class, int.class, int.class));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,13 +44,13 @@
|
||||
* </li>
|
||||
* </ul>
|
||||
*
|
||||
* <h1><a name="jvm_mods"></a>Summary of relevant Java Virtual Machine changes</h1>
|
||||
* <h1><a id="jvm_mods"></a>Summary of relevant Java Virtual Machine changes</h1>
|
||||
* The following low-level information summarizes relevant parts of the
|
||||
* Java Virtual Machine specification. For full details, please see the
|
||||
* current version of that specification.
|
||||
*
|
||||
* Each occurrence of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
|
||||
* <h2><a name="indyinsn"></a>{@code invokedynamic} instructions</h2>
|
||||
* <h2><a id="indyinsn"></a>{@code invokedynamic} instructions</h2>
|
||||
* A dynamic call site is originally in an unlinked state. In this state, there is
|
||||
* no target method for the call site to invoke.
|
||||
* <p>
|
||||
@ -77,7 +77,8 @@
|
||||
* <p>
|
||||
* The bootstrap method is invoked on at least three values:
|
||||
* <ul>
|
||||
* <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em> in which dynamic call site occurs </li>
|
||||
* <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em>
|
||||
* in which dynamic call site occurs </li>
|
||||
* <li>a {@code String}, the method name mentioned in the call site </li>
|
||||
* <li>a {@code MethodType}, the resolved type descriptor of the call </li>
|
||||
* <li>optionally, between 1 and 251 additional static arguments taken from the constant pool </li>
|
||||
@ -165,17 +166,27 @@
|
||||
* Given these rules, here are examples of legal bootstrap method declarations,
|
||||
* given various numbers {@code N} of extra arguments.
|
||||
* The first rows (marked {@code *}) will work for any number of extra arguments.
|
||||
* <table border=1 cellpadding=5 summary="Static argument types">
|
||||
* <tr><th>N</th><th>sample bootstrap method</th></tr>
|
||||
* <tr><td>*</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
|
||||
* <tr><td>*</td><td><code>CallSite bootstrap(Object... args)</code></td></tr>
|
||||
* <tr><td>*</td><td><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
|
||||
* <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
|
||||
* <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
|
||||
* <tr><td>1</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
|
||||
* <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
|
||||
* <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
|
||||
* <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
|
||||
* <table class="plain">
|
||||
* <caption style="display:none">Static argument types</caption>
|
||||
* <tr><th>N</th><th>Sample bootstrap method</th></tr>
|
||||
* <tr><td>*</td>
|
||||
* <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
|
||||
* <tr><td>*</td><td>
|
||||
* <code>CallSite bootstrap(Object... args)</code></td></tr>
|
||||
* <tr><td>*</td><td>
|
||||
* <code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
|
||||
* <tr><td>0</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
|
||||
* <tr><td>0</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
|
||||
* <tr><td>1</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
|
||||
* <tr><td>2</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
|
||||
* <tr><td>2</td><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
|
||||
* <tr><td>2</td>
|
||||
* <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
|
||||
* </table>
|
||||
* The last example assumes that the extra arguments are of type
|
||||
* {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.
|
||||
|
@ -27,7 +27,7 @@
|
||||
* Classes to support module descriptors and creating configurations of modules
|
||||
* by means of resolution and service binding.
|
||||
*
|
||||
* <h2><a name="resolution">Resolution</a></h2>
|
||||
* <h2><a id="resolution">Resolution</a></h2>
|
||||
*
|
||||
* <p> Resolution is the process of computing the transitive closure of a set
|
||||
* of root modules over a set of observable modules by resolving the
|
||||
@ -97,7 +97,7 @@
|
||||
* resolved so that it reads all other modules in the resulting configuration and
|
||||
* all modules in parent configurations. </p>
|
||||
*
|
||||
* <h2><a name="servicebinding">Service binding</a></h2>
|
||||
* <h2><a id="servicebinding">Service binding</a></h2>
|
||||
*
|
||||
* <p> Service binding is the process of augmenting a graph of resolved modules
|
||||
* from the set of observable modules induced by the service-use dependence
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,7 +57,7 @@
|
||||
* by the {@code throw} statement. Subclasses of {@code Throwable}
|
||||
* represent errors and exceptions.
|
||||
*
|
||||
* <a name="charenc"></a>
|
||||
* <a id="charenc"></a>
|
||||
* <h3>Character Encodings</h3>
|
||||
*
|
||||
* The specification of the {@link java.nio.charset.Charset
|
||||
|
@ -36,6 +36,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
* conversion would occur.
|
||||
*
|
||||
* @author Nakul Saraiya
|
||||
* @since 1.1
|
||||
*/
|
||||
public final
|
||||
class Array {
|
||||
|
@ -59,6 +59,7 @@ import java.util.StringJoiner;
|
||||
*
|
||||
* @author Kenneth Russell
|
||||
* @author Nakul Saraiya
|
||||
* @since 1.1
|
||||
*/
|
||||
public final class Constructor<T> extends Executable {
|
||||
private Class<T> clazz;
|
||||
|
@ -60,6 +60,7 @@ import sun.reflect.annotation.TypeAnnotationParser;
|
||||
*
|
||||
* @author Kenneth Russell
|
||||
* @author Nakul Saraiya
|
||||
* @since 1.1
|
||||
*/
|
||||
public final
|
||||
class Field extends AccessibleObject implements Member {
|
||||
|
@ -38,6 +38,7 @@ package java.lang.reflect;
|
||||
*
|
||||
* @see Method
|
||||
* @see Constructor
|
||||
* @since 1.1
|
||||
*/
|
||||
public class InvocationTargetException extends ReflectiveOperationException {
|
||||
/**
|
||||
|
@ -35,6 +35,7 @@ package java.lang.reflect;
|
||||
* @see Constructor
|
||||
*
|
||||
* @author Nakul Saraiya
|
||||
* @since 1.1
|
||||
*/
|
||||
public
|
||||
interface Member {
|
||||
|
@ -63,6 +63,7 @@ import java.util.StringJoiner;
|
||||
*
|
||||
* @author Kenneth Russell
|
||||
* @author Nakul Saraiya
|
||||
* @since 1.1
|
||||
*/
|
||||
public final class Method extends Executable {
|
||||
private Class<?> clazz;
|
||||
|
@ -43,6 +43,7 @@ import jdk.internal.reflect.ReflectionFactory;
|
||||
*
|
||||
* @author Nakul Saraiya
|
||||
* @author Kenneth Russell
|
||||
* @since 1.1
|
||||
*/
|
||||
public class Modifier {
|
||||
|
||||
|
@ -222,6 +222,7 @@ import java.util.Arrays;
|
||||
* @author Mike Cowlishaw
|
||||
* @author Joseph D. Darcy
|
||||
* @author Sergey V. Kuksenko
|
||||
* @since 1.1
|
||||
*/
|
||||
public class BigDecimal extends Number implements Comparable<BigDecimal> {
|
||||
/**
|
||||
|
@ -75,7 +75,7 @@ import sun.net.util.IPAddressUtil;
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">Description of unicast and multicast address types</caption>
|
||||
* <tbody>
|
||||
* <tr><th valign=top><i>unicast</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>unicast</i></th>
|
||||
* <td>An identifier for a single interface. A packet sent to
|
||||
* a unicast address is delivered to the interface identified by
|
||||
* that address.
|
||||
@ -94,7 +94,7 @@ import sun.net.util.IPAddressUtil;
|
||||
* IP address loops around and becomes IP input on the local
|
||||
* host. This address is often used when testing a
|
||||
* client.</td></tr>
|
||||
* <tr><th valign=top><i>multicast</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>multicast</i></th>
|
||||
* <td>An identifier for a set of interfaces (typically belonging
|
||||
* to different nodes). A packet sent to a multicast address is
|
||||
* delivered to all interfaces identified by that address.</td></tr>
|
||||
|
@ -167,6 +167,7 @@ import java.util.StringTokenizer;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class NetPermission extends BasicPermission {
|
||||
|
@ -40,6 +40,7 @@ import java.lang.annotation.Native;
|
||||
* DatagramSocket and MulticastSocket.
|
||||
*
|
||||
* @author David Brown
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
|
||||
|
@ -142,6 +142,7 @@ import sun.security.util.Debug;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*
|
||||
* @serial exclude
|
||||
*/
|
||||
|
@ -253,32 +253,32 @@ import java.lang.NullPointerException; // for javadoc
|
||||
* which are taken from that specification, are used below to describe these
|
||||
* constraints:
|
||||
*
|
||||
* <blockquote><table>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption>
|
||||
* <tbody>
|
||||
* <tr><th valign=top><i>alpha</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>alpha</i></th>
|
||||
* <td>The US-ASCII alphabetic characters,
|
||||
* {@code 'A'} through {@code 'Z'}
|
||||
* and {@code 'a'} through {@code 'z'}</td></tr>
|
||||
* <tr><th valign=top><i>digit</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>digit</i></th>
|
||||
* <td>The US-ASCII decimal digit characters,
|
||||
* {@code '0'} through {@code '9'}</td></tr>
|
||||
* <tr><th valign=top><i>alphanum</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>alphanum</i></th>
|
||||
* <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
|
||||
* <tr><th valign=top><i>unreserved</i> </th>
|
||||
* <tr><th style="vertical-align:top"><i>unreserved</i> </th>
|
||||
* <td>All <i>alphanum</i> characters together with those in the string
|
||||
* {@code "_-!.~'()*"}</td></tr>
|
||||
* <tr><th valign=top><i>punct</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>punct</i></th>
|
||||
* <td>The characters in the string {@code ",;:$&+="}</td></tr>
|
||||
* <tr><th valign=top><i>reserved</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>reserved</i></th>
|
||||
* <td>All <i>punct</i> characters together with those in the string
|
||||
* {@code "?/[]@"}</td></tr>
|
||||
* <tr><th valign=top><i>escaped</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>escaped</i></th>
|
||||
* <td>Escaped octets, that is, triplets consisting of the percent
|
||||
* character ({@code '%'}) followed by two hexadecimal digits
|
||||
* ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
|
||||
* {@code 'a'}-{@code 'f'})</td></tr>
|
||||
* <tr><th valign=top><i>other</i></th>
|
||||
* <tr><th style="vertical-align:top"><i>other</i></th>
|
||||
* <td>The Unicode characters that are not in the US-ASCII character set,
|
||||
* are not control characters (according to the {@link
|
||||
* java.lang.Character#isISOControl(char) Character.isISOControl}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -22,15 +23,14 @@
|
||||
or visit www.oracle.com if you need additional information or have any
|
||||
questions.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
|
||||
<TITLE>Networking Properties</TITLE>
|
||||
</HEAD>
|
||||
<BODY LANG="en-US" DIR="LTR">
|
||||
<H1 ALIGN=CENTER>Networking Properties</H1>
|
||||
<P ALIGN=LEFT>There are a few standard system properties used to
|
||||
<H1 style="text-align:center">Networking Properties</H1>
|
||||
<P>There are a few standard system properties used to
|
||||
alter the mechanisms and behavior of the various classes of the
|
||||
java.net package. Some are checked only once at startup of the VM,
|
||||
and therefore are best set using the -D option of the java command,
|
||||
@ -39,7 +39,7 @@ the <a href="../../lang/System.html#setProperty(java.lang.String,%20java.lang.St
|
||||
The purpose of this document is to list
|
||||
and detail all of these properties.</P>
|
||||
<P>If there is no special note, a property value is checked every time it is used.</P>
|
||||
<a name="Ipv4IPv6"></a>
|
||||
<a id="Ipv4IPv6"></a>
|
||||
<H2>IPv4 / IPv6</H2>
|
||||
<UL>
|
||||
<LI><P><B>java.net.preferIPv4Stack</B> (default: false)<BR>
|
||||
@ -62,7 +62,7 @@ and detail all of these properties.</P>
|
||||
returned by the operating system.</P>
|
||||
</UL>
|
||||
<P>Both of these properties are checked only once, at startup.</P>
|
||||
<a name="Proxies"></a>
|
||||
<a id="Proxies"></a>
|
||||
<H2>Proxies</H2>
|
||||
<P>A proxy server allows indirect connection to network services and
|
||||
is used mainly for security (to get through firewalls) and
|
||||
@ -155,7 +155,7 @@ of proxies.</P>
|
||||
globally through their user interface). Note that this property is
|
||||
checked only once at startup.</P>
|
||||
</UL>
|
||||
<a name="MiscHTTP"></a>
|
||||
<a id="MiscHTTP"></a>
|
||||
<H2>Misc HTTP properties</H2>
|
||||
<UL>
|
||||
<LI><P><B>http.agent</B> (default: “Java/<version>”)<BR>
|
||||
@ -214,7 +214,7 @@ of proxies.</P>
|
||||
</OL>
|
||||
</UL>
|
||||
<P>All these properties are checked only once at startup.</P>
|
||||
<a name="AddressCache"></a>
|
||||
<a id="AddressCache"></a>
|
||||
<H2>Address Cache</H2>
|
||||
<P>The java.net package, when doing name resolution, uses an address
|
||||
cache for both security and performance reasons. Any address
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, 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
|
||||
@ -28,33 +28,46 @@
|
||||
* performing I/O operations, such as files and sockets; defines selectors, for
|
||||
* multiplexed, non-blocking I/O operations.
|
||||
*
|
||||
* <a name="channels"></a>
|
||||
* <a id="channels"></a>
|
||||
*
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions">
|
||||
* <tr><th align="left">Channels</th><th align="left">Description</th></tr>
|
||||
* <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">Lists channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">Channels</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top"><i>{@link java.nio.channels.Channel}</i></td>
|
||||
* <td>A nexus for I/O operations</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.ReadableByteChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ReadableByteChannel}</i></td>
|
||||
* <td>Can read into a buffer</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.ScatteringByteChannel} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ScatteringByteChannel} </i></td>
|
||||
* <td>Can read into a sequence of buffers</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.WritableByteChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.WritableByteChannel}</i></td>
|
||||
* <td>Can write from a buffer</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.GatheringByteChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.GatheringByteChannel}</i></td>
|
||||
* <td>Can write from a sequence of buffers</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.ByteChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.ByteChannel}</i></td>
|
||||
* <td>Can read/write to/from a buffer</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.SeekableByteChannel}</i></td>
|
||||
* <td>A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.AsynchronousChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.SeekableByteChannel}</i></td>
|
||||
* <td>A {@code ByteChannel} connected to an entity that contains a variable-length
|
||||
* sequence of bytes</td></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.AsynchronousChannel}</i></td>
|
||||
* <td>Supports asynchronous I/O operations.</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
|
||||
* <td>Can read and write bytes asynchronously</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.NetworkChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.NetworkChannel}</i></td>
|
||||
* <td>A channel to a network socket</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.channels.MulticastChannel}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.channels.MulticastChannel}</i></td>
|
||||
* <td>Can join Internet Protocol (IP) multicast groups</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.Channels}</td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Channels}</td>
|
||||
* <td>Utility methods for channel/stream interoperation</td></tr>
|
||||
* </table></blockquote>
|
||||
*
|
||||
@ -109,13 +122,19 @@
|
||||
* be constructed that uses a given charset to encode characters into bytes and
|
||||
* write them to a given writable byte channel.
|
||||
*
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists file channels and their descriptions">
|
||||
* <tr><th align="left">File channels</th><th align="left">Description</th></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.FileChannel}</td>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">
|
||||
* Lists file channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">File channels</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.FileChannel}</td>
|
||||
* <td>Reads, writes, maps, and manipulates files</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.FileLock}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.FileLock}</td>
|
||||
* <td>A lock on a (region of a) file</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.MappedByteBuffer} </td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.MappedByteBuffer} </td>
|
||||
* <td>A direct byte buffer mapped to a region of a file</td></tr>
|
||||
* </table></blockquote>
|
||||
*
|
||||
@ -136,27 +155,35 @@
|
||||
* file channel connected to the same underlying file as the {@link java.io}
|
||||
* class.
|
||||
*
|
||||
* <a name="multiplex"></a>
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions">
|
||||
* <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td>
|
||||
* <a id="multiplex"></a>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">
|
||||
* Lists multiplexed, non-blocking channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">Multiplexed, non-blocking I/O</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectableChannel}</td>
|
||||
* <td>A channel that can be multiplexed</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.channels.DatagramChannel}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.DatagramChannel}</td>
|
||||
* <td>A channel to a datagram-oriented socket</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.channels.Pipe.SinkChannel}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.Pipe.SinkChannel}</td>
|
||||
* <td>The write end of a pipe</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.channels.Pipe.SourceChannel}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.Pipe.SourceChannel}</td>
|
||||
* <td>The read end of a pipe</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.channels.ServerSocketChannel} </td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.ServerSocketChannel} </td>
|
||||
* <td>A channel to a stream-oriented listening socket</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.channels.SocketChannel}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.SocketChannel}</td>
|
||||
* <td>A channel for a stream-oriented connecting socket</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.Selector}</td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Selector}</td>
|
||||
* <td>A multiplexor of selectable channels</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.SelectionKey}</td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.SelectionKey}</td>
|
||||
* <td>A token representing the registration <br> of a channel
|
||||
* with a selector</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.Pipe}</td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.channels.Pipe}</td>
|
||||
* <td>Two channels that form a unidirectional pipe</td></tr>
|
||||
* </table></blockquote>
|
||||
*
|
||||
@ -222,19 +249,27 @@
|
||||
* directly; custom channel classes should extend the appropriate {@link
|
||||
* java.nio.channels.SelectableChannel} subclasses defined in this package.
|
||||
*
|
||||
* <a name="async"></a>
|
||||
* <a id="async"></a>
|
||||
*
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions">
|
||||
* <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">
|
||||
* Lists asynchronous channels and their descriptions</caption>
|
||||
* <tr><th style="text-align:left">
|
||||
* Asynchronous I/O</th><th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousFileChannel}</td>
|
||||
* <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.AsynchronousSocketChannel}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousSocketChannel}</td>
|
||||
* <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.AsynchronousServerSocketChannel} </td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousServerSocketChannel} </td>
|
||||
* <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.CompletionHandler}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.CompletionHandler}</td>
|
||||
* <td>A handler for consuming the result of an asynchronous operation</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.channels.AsynchronousChannelGroup}</td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.channels.AsynchronousChannelGroup}</td>
|
||||
* <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
|
||||
* </table></blockquote>
|
||||
*
|
||||
@ -277,7 +312,6 @@
|
||||
* so that sophisticated users can take advantage of operating-system-specific
|
||||
* asynchronous I/O mechanisms when very high performance is required.
|
||||
*
|
||||
* <hr width="80%">
|
||||
* <p> Unless otherwise noted, passing a {@code null} argument to a constructor
|
||||
* or method in any class or interface in this package will cause a {@link
|
||||
* java.lang.NullPointerException NullPointerException} to be thrown.
|
||||
|
@ -27,17 +27,19 @@
|
||||
* Defines charsets, decoders, and encoders, for translating between
|
||||
* bytes and Unicode characters.
|
||||
*
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Summary of charsets, decoders, and encoders in this package">
|
||||
* <tr><th align="left">Class name</th><th align="left">Description</th></tr>
|
||||
* <tr><td valign=top>{@link java.nio.charset.Charset}</td>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
|
||||
* <tr><th style="text-align:left">Class name</th>
|
||||
* <th style="text-align:left"><th>DescriptiPath
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td>
|
||||
* <td>A named mapping between characters<br>and bytes</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.charset.CharsetDecoder}</td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td>
|
||||
* <td>Decodes bytes into characters</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.charset.CharsetEncoder} </td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td>
|
||||
* <td>Encodes characters into bytes</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.charset.CoderResult} </td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td>
|
||||
* <td>Describes coder results</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.charset.CodingErrorAction} </td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td>
|
||||
* <td>Describes actions to take when<br>coding errors are detected</td></tr>
|
||||
*
|
||||
* </table></blockquote>
|
||||
|
@ -26,25 +26,41 @@
|
||||
/**
|
||||
* Interfaces and classes providing access to file and file system attributes.
|
||||
*
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views">
|
||||
* <tr><th align="left">Attribute views</th><th align="left">Description</th></tr>
|
||||
* <tr><td valign=top><i>{@link java.nio.file.attribute.AttributeView}</i></td>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">Attribute views</caption>
|
||||
* <tr><th style="text-align:left">Attribute views</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td>
|
||||
* <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
|
||||
* <td>Can read or update file attributes</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.BasicFileAttributeView} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.BasicFileAttributeView} </i></td>
|
||||
* <td>Can read or update a basic set of file attributes</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.PosixFileAttributeView} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.PosixFileAttributeView} </i></td>
|
||||
* <td>Can read or update POSIX defined file attributes</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.DosFileAttributeView} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.DosFileAttributeView} </i></td>
|
||||
* <td>Can read or update FAT file attributes</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.FileOwnerAttributeView} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView} </i></td>
|
||||
* <td>Can read or update the owner of a file</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.AclFileAttributeView} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.AclFileAttributeView} </i></td>
|
||||
* <td>Can read or update Access Control Lists</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView} </i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
*
|
||||
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView} </i></td>
|
||||
* <td>Can read or update user-defined file attributes</td></tr>
|
||||
* <tr><td valign=top> <i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* <i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
|
||||
* <td>Can read or update file system attributes</td></tr>
|
||||
* </table></blockquote>
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,7 @@
|
||||
* package is used by service provider implementors wishing to extend the
|
||||
* platform default provider, or to construct other provider implementations. </p>
|
||||
*
|
||||
* <h3><a name="links">Symbolic Links</a></h3>
|
||||
* <h3><a id="links">Symbolic Links</a></h3>
|
||||
* <p> Many operating systems and file systems support for <em>symbolic links</em>.
|
||||
* A symbolic link is a special file that serves as a reference to another file.
|
||||
* For the most part, symbolic links are transparent to applications and
|
||||
@ -45,7 +45,7 @@
|
||||
* that are semantically close but support for these other types of links is
|
||||
* not included in this package. </p>
|
||||
*
|
||||
* <h3><a name="interop">Interoperability</a></h3>
|
||||
* <h3><a id="interop">Interoperability</a></h3>
|
||||
* <p> The {@link java.io.File} class defines the {@link java.io.File#toPath
|
||||
* toPath} method to construct a {@link java.nio.file.Path} by converting
|
||||
* the abstract path represented by the {@code java.io.File} object. The resulting
|
||||
@ -65,7 +65,7 @@
|
||||
* or on some other machine. The exact nature of any such inconsistencies are
|
||||
* system-dependent and are therefore unspecified. </p>
|
||||
*
|
||||
* <h3><a name="integrity">Synchronized I/O File Integrity</a></h3>
|
||||
* <h3><a id="integrity">Synchronized I/O File Integrity</a></h3>
|
||||
* <p> The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
|
||||
* java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
|
||||
* to require that updates to the file are written synchronously to the underlying
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,30 +60,33 @@
|
||||
* the contents of which can be used to extend the platform's default
|
||||
* implementations or to construct alternative implementations.
|
||||
*
|
||||
* <a name="buffers"> </a>
|
||||
* <a id="buffers"> </a>
|
||||
*
|
||||
* <blockquote><table cellspacing=1 cellpadding=0 summary="Description of the various buffers">
|
||||
* <tr><th align="left">Buffers</th><th align="left">Description</th></tr>
|
||||
* <tr><td valign=top>{@link java.nio.Buffer}</td>
|
||||
* <blockquote><table class="borderless">
|
||||
* <caption style="display:none">Description of the various buffers</caption>
|
||||
* <tr><th style="text-align:left">Buffers</th>
|
||||
* <th style="text-align:left">Description</th></tr>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.Buffer}</td>
|
||||
* <td>Position, limit, and capacity;
|
||||
* <br>clear, flip, rewind, and mark/reset</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.ByteBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.ByteBuffer}</td>
|
||||
* <td>Get/put, compact, views; allocate, wrap</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.MappedByteBuffer} </td>
|
||||
* <tr><td style="vertical-align:top">
|
||||
* {@link java.nio.MappedByteBuffer} </td>
|
||||
* <td>A byte buffer mapped to a file</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.CharBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.CharBuffer}</td>
|
||||
* <td>Get/put, compact; allocate, wrap</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.DoubleBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.DoubleBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.FloatBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.FloatBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.IntBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.IntBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.LongBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.LongBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td valign=top> {@link java.nio.ShortBuffer}</td>
|
||||
* <tr><td style="vertical-align:top"> {@link java.nio.ShortBuffer}</td>
|
||||
* <td> ' '</td></tr>
|
||||
* <tr><td valign=top>{@link java.nio.ByteOrder}</td>
|
||||
* <tr><td style="vertical-align:top">{@link java.nio.ByteOrder}</td>
|
||||
* <td>Typesafe enumeration for byte orders</td></tr>
|
||||
* </table></blockquote>
|
||||
*
|
||||
|
@ -74,6 +74,7 @@ import sun.security.util.SecurityConstants;
|
||||
* @see AccessController
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class AccessControlContext {
|
||||
|
@ -38,6 +38,7 @@ package java.security;
|
||||
*
|
||||
* @author Li Gong
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public class AccessControlException extends SecurityException {
|
||||
|
@ -259,6 +259,7 @@ import jdk.internal.reflect.Reflection;
|
||||
*
|
||||
* @author Li Gong
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class AccessController {
|
||||
|
@ -61,11 +61,17 @@ import java.util.Objects;
|
||||
* </ul>
|
||||
*
|
||||
* <P>In case the client does not explicitly initialize the
|
||||
* AlgorithmParameterGenerator
|
||||
* (via a call to an {@code init} method), each provider must supply (and
|
||||
* document) a default initialization. For example, the Sun provider uses a
|
||||
* default modulus prime size of 1024 bits for the generation of DSA
|
||||
* parameters.
|
||||
* AlgorithmParameterGenerator (via a call to an {@code init} method),
|
||||
* each provider must supply (and document) a default initialization.
|
||||
* See the Keysize Restriction sections of the
|
||||
* <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
|
||||
* JDK Providers</a>
|
||||
* document for information on the AlgorithmParameterGenerator defaults
|
||||
* used by JDK providers.
|
||||
* However, note that defaults may vary across different providers.
|
||||
* Additionally, the default value for a provider may change in a future
|
||||
* version. Therefore, it is recommended to explicitly initialize the
|
||||
* AlgorithmParameterGenerator instead of relying on provider-specific defaults.
|
||||
*
|
||||
* <p> Every implementation of the Java platform is required to support the
|
||||
* following standard {@code AlgorithmParameterGenerator} algorithms and
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, 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
|
||||
@ -39,8 +39,15 @@ import java.security.spec.AlgorithmParameterSpec;
|
||||
* <p> In case the client does not explicitly initialize the
|
||||
* AlgorithmParameterGenerator (via a call to an {@code engineInit}
|
||||
* method), each provider must supply (and document) a default initialization.
|
||||
* For example, the Sun provider uses a default modulus prime size of 1024
|
||||
* bits for the generation of DSA parameters.
|
||||
* See the Keysize Restriction sections of the
|
||||
* <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
|
||||
* JDK Providers</a>
|
||||
* document for information on the AlgorithmParameterGenerator defaults
|
||||
* used by JDK providers.
|
||||
* However, note that defaults may vary across different providers.
|
||||
* Additionally, the default value for a provider may change in a future
|
||||
* version. Therefore, it is recommended to explicitly initialize the
|
||||
* AlgorithmParameterGenerator instead of relying on provider-specific defaults.
|
||||
*
|
||||
* @author Jan Luehe
|
||||
*
|
||||
|
@ -51,6 +51,7 @@ import sun.security.util.SecurityConstants;
|
||||
*
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*
|
||||
* @serial exclude
|
||||
*/
|
||||
|
@ -62,6 +62,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public abstract class BasicPermission extends Permission
|
||||
|
@ -56,6 +56,7 @@ import java.util.Date;
|
||||
* the certificate and satisfy itself of its validity.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
* @deprecated A new certificate handling package is created in the Java platform.
|
||||
* This Certificate interface is entirely deprecated and
|
||||
* is here to allow for a smooth transition to the new
|
||||
|
@ -44,6 +44,7 @@ import sun.net.util.URLUtil;
|
||||
*
|
||||
* @author Li Gong
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public class CodeSource implements java.io.Serializable {
|
||||
|
@ -29,6 +29,7 @@ package java.security;
|
||||
* This is the generic Message Digest exception.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
public class DigestException extends GeneralSecurityException {
|
||||
|
||||
|
@ -59,6 +59,7 @@ import java.io.ByteArrayInputStream;
|
||||
* @see DigestOutputStream
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public class DigestInputStream extends FilterInputStream {
|
||||
|
@ -51,6 +51,7 @@ import java.io.ByteArrayOutputStream;
|
||||
* @see DigestInputStream
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.2
|
||||
*/
|
||||
public class DigestOutputStream extends FilterOutputStream {
|
||||
|
||||
|
@ -31,6 +31,7 @@ package java.security;
|
||||
* security-related exception classes that extend from it.
|
||||
*
|
||||
* @author Jan Luehe
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public class GeneralSecurityException extends Exception {
|
||||
|
@ -38,6 +38,7 @@ package java.security;
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @author Li Gong
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public interface Guard {
|
||||
|
@ -44,6 +44,7 @@ package java.security;
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @author Li Gong
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public class GuardedObject implements java.io.Serializable {
|
||||
|
@ -51,6 +51,7 @@ import java.util.*;
|
||||
* @see Principal
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
* @deprecated This class is no longer used. Its functionality has been
|
||||
* replaced by {@code java.security.KeyStore}, the
|
||||
* {@code java.security.cert} package, and
|
||||
|
@ -55,6 +55,7 @@ import java.util.Properties;
|
||||
* @see Key
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*
|
||||
* @deprecated This class is no longer used. Its functionality has been
|
||||
* replaced by {@code java.security.KeyStore}, the
|
||||
|
@ -31,6 +31,7 @@ package java.security;
|
||||
* length, uninitialized, etc).
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class InvalidKeyException extends KeyException {
|
||||
|
@ -31,6 +31,7 @@ package java.security;
|
||||
* to a method.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class InvalidParameterException extends IllegalArgumentException {
|
||||
|
@ -97,6 +97,7 @@ package java.security;
|
||||
* @see Signer
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public interface Key extends java.io.Serializable {
|
||||
|
@ -33,6 +33,7 @@ package java.security;
|
||||
* @see KeyManagementException
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class KeyException extends GeneralSecurityException {
|
||||
|
@ -38,6 +38,7 @@ package java.security;
|
||||
* </ul>
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*
|
||||
* @see Key
|
||||
* @see KeyException
|
||||
|
@ -36,6 +36,7 @@ import java.util.*;
|
||||
* @see PrivateKey
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public final class KeyPair implements java.io.Serializable {
|
||||
|
@ -95,8 +95,15 @@ import sun.security.util.Debug;
|
||||
* <p>In case the client does not explicitly initialize the KeyPairGenerator
|
||||
* (via a call to an {@code initialize} method), each provider must
|
||||
* supply (and document) a default initialization.
|
||||
* For example, the <i>Sun</i> provider uses a default modulus size (keysize)
|
||||
* of 1024 bits for DSA key pairs.
|
||||
* See the Keysize Restriction sections of the
|
||||
* <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
|
||||
* JDK Providers</a>
|
||||
* document for information on the KeyPairGenerator defaults used by
|
||||
* JDK providers.
|
||||
* However, note that defaults may vary across different providers.
|
||||
* Additionally, the default value for a provider may change in a future
|
||||
* version. Therefore, it is recommended to explicitly initialize the
|
||||
* KeyPairGenerator instead of relying on provider-specific defaults.
|
||||
*
|
||||
* <p>Note that this class is abstract and extends from
|
||||
* {@code KeyPairGeneratorSpi} for historical reasons.
|
||||
@ -121,6 +128,7 @@ import sun.security.util.Debug;
|
||||
* other algorithms are supported.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*
|
||||
* @see java.security.spec.AlgorithmParameterSpec
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, 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
|
||||
@ -39,10 +39,18 @@ import java.security.spec.AlgorithmParameterSpec;
|
||||
* <p> In case the client does not explicitly initialize the KeyPairGenerator
|
||||
* (via a call to an {@code initialize} method), each provider must
|
||||
* supply (and document) a default initialization.
|
||||
* For example, the <i>Sun</i> provider uses a default modulus size (keysize)
|
||||
* of 1024 bits.
|
||||
* See the Keysize Restriction sections of the
|
||||
* <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
|
||||
* JDK Providers</a>
|
||||
* document for information on the KeyPairGenerator defaults used by
|
||||
* JDK providers.
|
||||
* However, note that defaults may vary across different providers.
|
||||
* Additionally, the default value for a provider may change in a future
|
||||
* version. Therefore, it is recommended to explicitly initialize the
|
||||
* KeyPairGenerator instead of relying on provider-specific defaults.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.2
|
||||
*
|
||||
*
|
||||
* @see KeyPairGenerator
|
||||
|
@ -96,6 +96,7 @@ import javax.crypto.SecretKey;
|
||||
* other algorithms are supported.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*
|
||||
* @see DigestInputStream
|
||||
* @see DigestOutputStream
|
||||
|
@ -43,6 +43,7 @@ import sun.security.jca.JCAUtil;
|
||||
* <p> Implementations are free to implement the Cloneable interface.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.2
|
||||
*
|
||||
*
|
||||
* @see MessageDigest
|
||||
|
@ -30,6 +30,7 @@ package java.security;
|
||||
* requested but is not available in the environment.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class NoSuchAlgorithmException extends GeneralSecurityException {
|
||||
|
@ -30,6 +30,7 @@ package java.security;
|
||||
* requested but is not available in the environment.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class NoSuchProviderException extends GeneralSecurityException {
|
||||
|
@ -60,6 +60,7 @@ package java.security;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public abstract class Permission implements Guard, java.io.Serializable {
|
||||
|
@ -91,6 +91,7 @@ import java.util.stream.StreamSupport;
|
||||
*
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public abstract class PermissionCollection implements java.io.Serializable {
|
||||
|
@ -75,6 +75,7 @@ import java.io.IOException;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*
|
||||
* @serial exclude
|
||||
*/
|
||||
|
@ -78,6 +78,7 @@ import sun.security.util.SecurityConstants;
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @author Gary Ellison
|
||||
* @since 1.2
|
||||
* @see java.security.Provider
|
||||
* @see java.security.ProtectionDomain
|
||||
* @see java.security.Permission
|
||||
|
@ -35,6 +35,7 @@ import javax.security.auth.Subject;
|
||||
* @see java.security.cert.X509Certificate
|
||||
*
|
||||
* @author Li Gong
|
||||
* @since 1.1
|
||||
*/
|
||||
public interface Principal {
|
||||
|
||||
|
@ -54,6 +54,7 @@ package java.security;
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @author Josh Bloch
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public interface PrivateKey extends Key, javax.security.auth.Destroyable {
|
||||
|
@ -34,6 +34,7 @@ package java.security;
|
||||
* throw checked exceptions must use {@code PrivilegedExceptionAction}
|
||||
* instead.
|
||||
*
|
||||
* @since 1.2
|
||||
* @see AccessController
|
||||
* @see AccessController#doPrivileged(PrivilegedAction)
|
||||
* @see PrivilegedExceptionAction
|
||||
|
@ -43,6 +43,7 @@ package java.security;
|
||||
* <i>cause</i>, and may be accessed via the {@link Throwable#getCause()}
|
||||
* method, as well as the aforementioned "legacy method."
|
||||
*
|
||||
* @since 1.2
|
||||
* @see PrivilegedExceptionAction
|
||||
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
|
||||
* @see AccessController#doPrivileged(PrivilegedExceptionAction,AccessControlContext)
|
||||
|
@ -35,6 +35,7 @@ package java.security;
|
||||
* computations that do not throw
|
||||
* checked exceptions should use {@code PrivilegedAction} instead.
|
||||
*
|
||||
* @since 1.2
|
||||
* @see AccessController
|
||||
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
|
||||
* @see AccessController#doPrivileged(PrivilegedExceptionAction,
|
||||
|
@ -59,6 +59,7 @@ import sun.security.util.SecurityConstants;
|
||||
* @author Li Gong
|
||||
* @author Roland Schemers
|
||||
* @author Gary Ellison
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public class ProtectionDomain {
|
||||
|
@ -102,6 +102,7 @@ import java.util.function.Function;
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @author Andreas Sterbenz
|
||||
* @since 1.1
|
||||
*/
|
||||
public abstract class Provider extends Properties {
|
||||
|
||||
|
@ -32,6 +32,7 @@ package java.security;
|
||||
* throw specialized, provider-specific runtime errors.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
public class ProviderException extends RuntimeException {
|
||||
|
||||
|
@ -34,6 +34,7 @@ package java.security;
|
||||
* See, for example, the DSAPublicKey interface in
|
||||
* {@code java.security.interfaces}.
|
||||
*
|
||||
* @since 1.1
|
||||
* @see Key
|
||||
* @see PrivateKey
|
||||
* @see Certificate
|
||||
|
@ -39,6 +39,7 @@ import sun.security.util.Debug;
|
||||
*
|
||||
* @author Li Gong
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
public class SecureClassLoader extends ClassLoader {
|
||||
/*
|
||||
|
@ -143,6 +143,7 @@ import sun.security.util.Debug;
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @author Josh Bloch
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class SecureRandom extends java.util.Random {
|
||||
|
@ -45,6 +45,7 @@ import sun.security.jca.*;
|
||||
* {@code conf/security/java.security} in the Java installation directory.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public final class Security {
|
||||
|
@ -333,6 +333,7 @@ import java.util.StringTokenizer;
|
||||
*
|
||||
* @author Marianne Mueller
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class SecurityPermission extends BasicPermission {
|
||||
|
@ -113,6 +113,7 @@ import sun.security.jca.GetInstance.Instance;
|
||||
* other algorithms are supported.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -29,6 +29,7 @@ package java.security;
|
||||
* This is the generic Signature exception.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class SignatureException extends GeneralSecurityException {
|
||||
|
@ -44,6 +44,7 @@ import sun.security.jca.JCAUtil;
|
||||
* of a particular signature algorithm.
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.2
|
||||
*
|
||||
*
|
||||
* @see Signature
|
||||
|
@ -114,6 +114,7 @@ import java.io.*;
|
||||
* @see Signature
|
||||
*
|
||||
* @author Li Gong
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class SignedObject implements Serializable {
|
||||
|
@ -38,6 +38,7 @@ import java.io.*;
|
||||
* @see Identity
|
||||
*
|
||||
* @author Benjamin Renaud
|
||||
* @since 1.1
|
||||
*
|
||||
* @deprecated This class is no longer used. Its functionality has been
|
||||
* replaced by {@code java.security.KeyStore}, the
|
||||
|
@ -96,6 +96,7 @@ import java.security.cert.*;
|
||||
*
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public final class UnresolvedPermission extends Permission
|
||||
|
@ -43,6 +43,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
*
|
||||
*
|
||||
* @author Roland Schemers
|
||||
* @since 1.2
|
||||
*
|
||||
* @serial include
|
||||
*/
|
||||
|
@ -82,6 +82,7 @@ import java.security.Principal;
|
||||
* @see java.security.acl.Acl#getPermissions
|
||||
*
|
||||
* @author Satish Dharmaraj
|
||||
* @since 1.1
|
||||
*
|
||||
* @deprecated This package has been replaced by {@code java.security.Policy}
|
||||
* and related classes since 1.2.
|
||||
|
@ -50,6 +50,7 @@ import java.security.Principal;
|
||||
* @see java.security.acl.Acl
|
||||
*
|
||||
* @author Satish Dharmaraj
|
||||
* @since 1.1
|
||||
*
|
||||
* @deprecated This package has been replaced by {@code java.security.Policy}
|
||||
* and related classes since 1.2.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user