This commit is contained in:
J. Duke 2017-07-05 23:39:19 +02:00
commit 26159f7c2d
450 changed files with 4031 additions and 2387 deletions

View File

@ -426,3 +426,5 @@ b94be69cbb1d2943b886bf2d458745756df146e4 jdk-10+9
4c12464a907db4656c1033f56fa49cba643ac629 jdk-9+171 4c12464a907db4656c1033f56fa49cba643ac629 jdk-9+171
6558c37afe832582238d338578d598f30c6fdd75 jdk-10+10 6558c37afe832582238d338578d598f30c6fdd75 jdk-10+10
2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172 2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172
6b750cdb823a029a25ff2e560302cc2d28a86cb6 jdk-10+11
88d7fd969e7df0e07a53b201cfd29393ca33ede9 jdk-9+173

View File

@ -387,7 +387,7 @@ var getJibProfilesCommon = function (input, data) {
// on such hardware. // on such hardware.
if (input.build_cpu == "sparcv9") { if (input.build_cpu == "sparcv9") {
var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\""); 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_revision = "8u20";
boot_jdk_subdirpart = "1.8.0_20"; boot_jdk_subdirpart = "1.8.0_20";
} }

View File

@ -586,3 +586,5 @@ f5ded0cf954c770deeecb80f2ba1ba6a05cd979b jdk-10+8
d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171 d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171
c6cd3ec8d46b034e57c86399380ffcf7f25706e4 jdk-10+10 c6cd3ec8d46b034e57c86399380ffcf7f25706e4 jdk-10+10
1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172 1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172
7f14e550f1e8abea41c223e5fdad2261e99ba929 jdk-10+11
e64b1cb48d6e7703928a9d1da106fc27f8cb65fd jdk-9+173

View File

@ -139,7 +139,7 @@ void metadata_Relocation::pd_fix_value(address x) {
#ifdef AARCH64 #ifdef AARCH64
#ifdef COMPILER2 #ifdef COMPILER2
NativeMovConstReg* ni = nativeMovConstReg_at(addr()); NativeMovConstReg* ni = nativeMovConstReg_at(addr());
if (ni->is_movz()) { if (ni->is_mov_slow()) {
return; return;
} }
#endif #endif

View File

@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "opto/arraycopynode.hpp" #include "opto/arraycopynode.hpp"
#include "opto/graphKit.hpp" #include "opto/graphKit.hpp"
#include "runtime/sharedRuntime.hpp"
ArrayCopyNode::ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard) ArrayCopyNode::ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard)
: CallNode(arraycopy_type(), NULL, TypeRawPtr::BOTTOM), : 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); 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) { bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call) {
if (n->Opcode() == Op_StoreCM || if (n != NULL &&
n->Opcode() == Op_StoreB) { n->is_Call() &&
// Ignore card mark stores n->as_Call()->may_modify(t_oop, phase) &&
n = n->in(MemNode::Memory); (n->as_Call()->is_ArrayCopy() || n->as_Call()->is_call_to_arraycopystub())) {
} call = n->as_Call();
return true;
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;
}
} }
return false; return false;
} }
bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) { static Node* step_over_gc_barrier(Node* c) {
Node* mem = mb->in(TypeFunc::Memory); if (UseG1GC && !GraphKit::use_ReduceInitialCardMarks() &&
c != NULL && c->is_Region() && c->req() == 3) {
if (mem->is_MergeMem()) { for (uint i = 1; i < c->req(); i++) {
Node* n = mem->as_MergeMem()->memory_at(Compile::AliasIdxRaw); if (c->in(i) != NULL && c->in(i)->is_Region() &&
if (may_modify_helper(t_oop, n, phase, ac)) { c->in(i)->req() == 3) {
return true; Node* r = c->in(i);
} else if (n->is_Phi()) { for (uint j = 1; j < r->req(); j++) {
for (uint i = 1; i < n->req(); i++) { if (r->in(j) != NULL && r->in(j)->is_Proj() &&
if (n->in(i) != NULL) { r->in(j)->in(0) != NULL &&
if (may_modify_helper(t_oop, n->in(i), phase, ac)) { r->in(j)->in(0)->Opcode() == Op_CallLeaf &&
return true; 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; return false;
} }
@ -677,37 +712,77 @@ bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTra
// between offset_lo and offset_hi // between offset_lo and offset_hi
// if must_modify is true, return true if the copy is guaranteed to // if must_modify is true, return true if the copy is guaranteed to
// write between offset_lo and offset_hi // 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"); assert(_kind == ArrayCopy || _kind == CopyOf || _kind == CopyOfRange, "only for real array copies");
Node* dest = in(ArrayCopyNode::Dest); Node* dest = in(Dest);
Node* src_pos = in(ArrayCopyNode::SrcPos); Node* dest_pos = in(DestPos);
Node* dest_pos = in(ArrayCopyNode::DestPos); Node* len = in(Length);
Node* len = in(ArrayCopyNode::Length);
const TypeInt *dest_pos_t = phase->type(dest_pos)->isa_int(); const TypeInt *dest_pos_t = phase->type(dest_pos)->isa_int();
const TypeInt *len_t = phase->type(len)->isa_int(); const TypeInt *len_t = phase->type(len)->isa_int();
const TypeAryPtr* ary_t = phase->type(dest)->isa_aryptr(); const TypeAryPtr* ary_t = phase->type(dest)->isa_aryptr();
if (dest_pos_t != NULL && len_t != NULL && ary_t != NULL) { if (dest_pos_t == NULL || len_t == NULL || ary_t == NULL) {
BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type(); return !must_modify;
uint header = arrayOopDesc::base_offset_in_bytes(ary_elem); }
uint elemsize = type2aelembytes(ary_elem);
jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header; BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header; uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header; uint elemsize = type2aelembytes(ary_elem);
jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
if (must_modify) { jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) { jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
return true; jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
} jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
} else {
if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) { if (must_modify) {
return true; 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; 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;
}

View File

@ -108,7 +108,7 @@ private:
BasicType copy_type, const Type* value_type, int count); BasicType copy_type, const Type* value_type, int count);
bool finish_transform(PhaseGVN *phase, bool can_reshape, bool finish_transform(PhaseGVN *phase, bool can_reshape,
Node* ctl, Node *mem); 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: public:
@ -167,7 +167,8 @@ public:
bool has_negative_length_guard() const { return _has_negative_length_guard; } 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); 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 #ifndef PRODUCT
virtual void dump_spec(outputStream *st) const; virtual void dump_spec(outputStream *st) const;

View File

@ -1860,6 +1860,9 @@ void IdealLoopTree::dump_head( ) const {
if (_required_safept != NULL && _required_safept->size() > 0) { if (_required_safept != NULL && _required_safept->size() > 0) {
tty->print(" req={"); _required_safept->dump_simple(); tty->print(" }"); tty->print(" req={"); _required_safept->dump_simple(); tty->print(" }");
} }
if (Verbose) {
tty->print(" body={"); _body.dump_simple(); tty->print(" }");
}
tty->cr(); tty->cr();
} }

View File

@ -913,7 +913,11 @@ Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
if (n->is_ConstraintCast()) { if (n->is_ConstraintCast()) {
Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this); 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); _igvn.replace_node(n, dom_cast);
return dom_cast; return dom_cast;
} }

View File

@ -1047,7 +1047,9 @@ void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
// opportunities for allocation elimination // opportunities for allocation elimination
Node* src = ac->in(ArrayCopyNode::Src); Node* src = ac->in(ArrayCopyNode::Src);
ac->replace_edge(src, top()); 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); _igvn.remove_dead_node(src);
} }

View File

@ -718,6 +718,15 @@ Node* PhaseMacroExpand::generate_arraycopy(ArrayCopyNode *ac, AllocateArrayNode*
_igvn.replace_node(_ioproj_fallthrough, *io); _igvn.replace_node(_ioproj_fallthrough, *io);
_igvn.replace_node(_fallthroughcatchproj, *ctrl); _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; 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_src = src_type->isa_aryptr();
const TypeAryPtr* top_dest = dest_type->isa_aryptr(); const TypeAryPtr* top_dest = dest_type->isa_aryptr();
if (top_src == NULL || top_src->klass() == NULL || BasicType src_elem = T_CONFLICT;
top_dest == NULL || top_dest->klass() == NULL) { 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. // Conservatively insert a memory barrier on all memory slices.
// Do not let writes into the source float below the arraycopy. // Do not let writes into the source float below the arraycopy.
{ {
@ -1169,13 +1195,11 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
} }
return; 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 // (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. // 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) { if (src_elem != dest_elem || dest_elem == T_VOID) {
// The component types are not the same or are not recognized. Punt. // The component types are not the same or are not recognized. Punt.
// (But, avoid the native method wrapper to JVM_ArrayCopy.) // (But, avoid the native method wrapper to JVM_ArrayCopy.)

View File

@ -908,10 +908,11 @@ Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseTransform* phase) const {
ld->set_req(0, ld_alloc->in(0)); ld->set_req(0, ld_alloc->in(0));
} }
} else { } else {
Node* src = ac->in(ArrayCopyNode::Src);
Node* addp = in(MemNode::Address)->clone(); Node* addp = in(MemNode::Address)->clone();
assert(addp->in(AddPNode::Base) == addp->in(AddPNode::Address), "should be"); assert(addp->in(AddPNode::Base) == addp->in(AddPNode::Address), "should be");
addp->set_req(AddPNode::Base, ac->in(ArrayCopyNode::Src)); addp->set_req(AddPNode::Base, src);
addp->set_req(AddPNode::Address, ac->in(ArrayCopyNode::Src)); addp->set_req(AddPNode::Address, src);
const TypeAryPtr* ary_t = phase->type(in(MemNode::Address))->isa_aryptr(); const TypeAryPtr* ary_t = phase->type(in(MemNode::Address))->isa_aryptr();
BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type(); 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); addp->set_req(AddPNode::Offset, offset);
ld->set_req(MemNode::Address, phase->transform(addp)); 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) { if (in(0) != NULL) {
assert(ac->in(0) != NULL, "alloc must have control"); assert(ac->in(0) != NULL, "alloc must have control");
ld->set_req(0, ac->in(0)); ld->set_req(0, ac->in(0));

View File

@ -764,7 +764,7 @@ Agent_OnUnload_L(JavaVM *vm)</example>
An agent creates a <jvmti/> environment An agent creates a <jvmti/> environment
by passing a <jvmti/> version by passing a <jvmti/> version
as the interface ID to the JNI Invocation API function as the interface ID to the JNI Invocation API function
<externallink id="docs/technotes/guides/jni/spec/invocation.html#GetEnv"> <externallink id="jni/invocation.html#getenv">
<code>GetEnv</code></externallink>. <code>GetEnv</code></externallink>.
See <internallink id="jvmtiEnvAccess">Accessing <jvmti/> Functions</internallink> See <internallink id="jvmtiEnvAccess">Accessing <jvmti/> Functions</internallink>
for more details on the creation and use of for more details on the creation and use of
@ -884,7 +884,7 @@ Agent_OnUnload_L(JavaVM *vm)</example>
Modified UTF-8 differs Modified UTF-8 differs
from standard UTF-8 in the representation of supplementary characters from standard UTF-8 in the representation of supplementary characters
and of the null character. See the and of the null character. See the
<externallink id="docs/technotes/guides/jni/spec/types.html#modified_utf_8_strings"> <externallink id="jni/types.html#modified-utf-8-strings">
Modified UTF-8 Strings</externallink> Modified UTF-8 Strings</externallink>
section of the JNI specification for details. section of the JNI specification for details.
</intro> </intro>
@ -914,7 +914,7 @@ Agent_OnUnload_L(JavaVM *vm)</example>
by calling <jvmti/> functions. by calling <jvmti/> functions.
Access to <jvmti/> functions is by use of an interface pointer Access to <jvmti/> functions is by use of an interface pointer
in the same manner as in the same manner as
<externallink id="docs/technotes/guides/jni/spec/design.html">Java <externallink id="jni/design.html">Java
Native Interface (JNI) functions</externallink> are accessed. Native Interface (JNI) functions</externallink> are accessed.
The <jvmti/> interface pointer is called the The <jvmti/> interface pointer is called the
<i>environment pointer</i>. <i>environment pointer</i>.
@ -1006,7 +1006,7 @@ jvmtiEnv *jvmti;
local references--these local references are created local references--these local references are created
during the <jvmti/> call. during the <jvmti/> call.
Local references are a resource that must be managed (see the Local references are a resource that must be managed (see the
<externallink id="docs/technotes/guides/jni/spec/functions.html#local_references"> <externallink id="jni/functions.html#local-references">
JNI Documentation</externallink>). JNI Documentation</externallink>).
When threads return from native code all local references When threads return from native code all local references
are freed. Note that some threads, including typical are freed. Note that some threads, including typical
@ -1042,7 +1042,7 @@ jvmtiEnv *jvmti;
<jvmti/> function. <jvmti/> function.
See the See the
<externallink <externallink
id="docs/technotes/guides/jni/spec/design.html#java_exceptions" id="jni/design.html#java-exceptions"
>Java Exceptions</externallink> >Java Exceptions</externallink>
section of the JNI specification for information on handling exceptions. section of the JNI specification for information on handling exceptions.
</intro> </intro>
@ -2112,7 +2112,7 @@ jvmtiEnv *jvmti;
<p/> <p/>
Upon execution of <code>proc</code>, the new thread will be attached to the Upon execution of <code>proc</code>, the new thread will be attached to the
VM -- see the JNI documentation on VM -- see the JNI documentation on
<externallink id="docs/technotes/guides/jni/spec/invocation.html#attaching_to_the_vm" <externallink id="jni/invocation.html#attaching-to-the-vm"
>Attaching to the VM</externallink>. >Attaching to the VM</externallink>.
</description> </description>
<origin>jvmdiClone</origin> <origin>jvmdiClone</origin>
@ -6931,7 +6931,7 @@ class C2 extends C1 implements I2 {
<synopsis>Get Class Signature</synopsis> <synopsis>Get Class Signature</synopsis>
<description> <description>
For the class indicated by <code>klass</code>, return the For the class indicated by <code>klass</code>, return the
<externallink id="docs/technotes/guides/jni/spec/types.html#type_signatures">JNI <externallink id="jni/types.html#type-signatures">JNI
type signature</externallink> type signature</externallink>
and the generic signature of the class. and the generic signature of the class.
For example, <code>java.util.List</code> is <code>"Ljava/util/List;"</code> For example, <code>java.util.List</code> is <code>"Ljava/util/List;"</code>
@ -8056,7 +8056,7 @@ class C2 extends C1 implements I2 {
<paramlink id="signature_ptr"/>. <paramlink id="signature_ptr"/>.
<p/> <p/>
Field signatures are defined in the Field signatures are defined in the
<externallink id="docs/technotes/guides/jni/spec/jniTOC.html">JNI Specification</externallink> <externallink id="jni/index.html">JNI Specification</externallink>
and are referred to as <code>field descriptors</code> in and are referred to as <code>field descriptors</code> in
<vmspec chapter="4.3.2"/>. <vmspec chapter="4.3.2"/>.
</description> </description>
@ -8253,7 +8253,7 @@ class C2 extends C1 implements I2 {
<code>signature_ptr</code>. <code>signature_ptr</code>.
<p/> <p/>
Method signatures are defined in the Method signatures are defined in the
<externallink id="docs/technotes/guides/jni/spec/jniTOC.html">JNI Specification</externallink> <externallink id="jni/index.html">JNI Specification</externallink>
and are referred to as <code>method descriptors</code> in and are referred to as <code>method descriptors</code> in
<vmspec chapter="4.3.3"/>. <vmspec chapter="4.3.3"/>.
Note this is different Note this is different
@ -9226,7 +9226,7 @@ method(wrapped_foo) -> nativeImplementation(foo)</example>
Provides the ability to intercept and resend Provides the ability to intercept and resend
Java Native Interface (JNI) function calls Java Native Interface (JNI) function calls
by manipulating the JNI function table. by manipulating the JNI function table.
See <externallink id="docs/technotes/guides/jni/spec/functions.html">JNI See <externallink id="jni/functions.html">JNI
Functions</externallink> in the <i>Java Native Interface Specification</i>. Functions</externallink> in the <i>Java Native Interface Specification</i>.
<p/> <p/>
The following example illustrates intercepting the The following example illustrates intercepting the
@ -13814,7 +13814,7 @@ typedef void (JNICALL *jvmtiEventVMInit)
<description> <description>
Typedef for the JNI function table <code>JNINativeInterface</code> Typedef for the JNI function table <code>JNINativeInterface</code>
defined in the defined in the
<externallink id="docs/technotes/guides/jni/spec/functions.html#interface_function_table"> <externallink id="jni/functions.html#interface-function-table">
JNI Specification</externallink>. JNI Specification</externallink>.
The JNI reference implementation defines this with an underscore. The JNI reference implementation defines this with an underscore.
</description> </description>

View 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);
}
}
}
}

View File

@ -426,3 +426,5 @@ b9409a7daa6c793dd631e52fe6ef79d08a3b337a jdk-10+9
29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171 29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171
df64bd4757d0d130d62a22b8143ba31d3a16ac18 jdk-10+10 df64bd4757d0d130d62a22b8143ba31d3a16ac18 jdk-10+10
0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172 0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172
7c54889c0ec649ee04643e5cace434623d0dc667 jdk-10+11
a5506b425f1bf91530d8417b57360e5d89328c0c jdk-9+173

View File

@ -30,7 +30,7 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jaotc, \ $(eval $(call SetupBuildLauncher, jaotc, \
MAIN_CLASS := jdk.tools.jaotc.Main, \ 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.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.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) \ --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.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.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=$(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.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.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.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.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 \ -XX:+UseAOT \
-Djvmci.UseProfilingInformation=false \ -Djvmci.UseProfilingInformation=false \
-Dgraal.UseExceptionProbability=false \ -Dgraal.UseExceptionProbability=false \

View File

@ -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 # MAIN_MODULE The module of the main class to launch if different from the
# current module # current module
# MAIN_CLASS The Java main class to launch # 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 Additional CFLAGS
# CFLAGS_windows Additional CFLAGS_windows # CFLAGS_windows Additional CFLAGS_windows
# LIBS_unix Additional LIBS_unix # LIBS_unix Additional LIBS_unix
@ -104,6 +107,11 @@ define SetupBuildLauncherBody
endif endif
ifneq ($$($1_JAVA_ARGS), ) 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, \ $1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
$$(addprefix -J, $$($1_JAVA_ARGS)) -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS), "$$a"$(COMMA) )) }' $$(addprefix -J, $$($1_JAVA_ARGS)) -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS), "$$a"$(COMMA) )) }'
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR) $1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)

View File

@ -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)) \ LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \ -I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -549,12 +549,20 @@ class LDMLParseHandler extends AbstractLDMLHandler<Object> {
case "decimal": case "decimal":
// for FormatData // for FormatData
// copy string for later assembly into NumberElements // 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; break;
case "group": case "group":
// for FormatData // for FormatData
// copy string for later assembly into NumberElements // 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; break;
case "list": case "list":
// for FormatData // for FormatData

View 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("/", ".") : "";
}
}

View File

@ -403,6 +403,7 @@ import java.lang.module.ModuleFinder;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public final class RuntimePermission extends BasicPermission { public final class RuntimePermission extends BasicPermission {

View File

@ -1092,13 +1092,24 @@ class LambdaForm {
final MemberName member; final MemberName member;
private @Stable MethodHandle resolvedHandle; private @Stable MethodHandle resolvedHandle;
@Stable MethodHandle invoker; @Stable MethodHandle invoker;
private final MethodHandleImpl.Intrinsic intrinsicName;
NamedFunction(MethodHandle resolvedHandle) { 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) { NamedFunction(MemberName member, MethodHandle resolvedHandle) {
this(member, resolvedHandle, MethodHandleImpl.Intrinsic.NONE);
}
NamedFunction(MemberName member, MethodHandle resolvedHandle, MethodHandleImpl.Intrinsic intrinsic) {
this.member = member; this.member = member;
this.resolvedHandle = resolvedHandle; 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. // The following assert is almost always correct, but will fail for corner cases, such as PrivateInvokeTest.
//assert(!isInvokeBasic(member)); //assert(!isInvokeBasic(member));
} }
@ -1111,6 +1122,7 @@ class LambdaForm {
// necessary to pass BigArityTest // necessary to pass BigArityTest
this.member = Invokers.invokeBasicMethod(basicInvokerType); this.member = Invokers.invokeBasicMethod(basicInvokerType);
} }
this.intrinsicName = MethodHandleImpl.Intrinsic.NONE;
assert(isInvokeBasic(member)); assert(isInvokeBasic(member));
} }
@ -1263,8 +1275,7 @@ class LambdaForm {
} }
public MethodHandleImpl.Intrinsic intrinsicName() { public MethodHandleImpl.Intrinsic intrinsicName() {
return resolvedHandle == null ? MethodHandleImpl.Intrinsic.NONE return intrinsicName;
: resolvedHandle.intrinsicName();
} }
} }
@ -1741,15 +1752,15 @@ class LambdaForm {
Name[] idNames = new Name[] { argument(0, L_TYPE), argument(1, type) }; Name[] idNames = new Name[] { argument(0, L_TYPE), argument(1, type) };
idForm = new LambdaForm(2, idNames, 1, Kind.IDENTITY); idForm = new LambdaForm(2, idNames, 1, Kind.IDENTITY);
idForm.compileToBytecode(); idForm.compileToBytecode();
idFun = new NamedFunction(idMem, MethodHandleImpl.makeIntrinsic( idFun = new NamedFunction(idMem, SimpleMethodHandle.make(idMem.getInvocationType(), idForm),
idMem.getInvocationType(), idForm, MethodHandleImpl.Intrinsic.IDENTITY)); MethodHandleImpl.Intrinsic.IDENTITY);
Object zeValue = Wrapper.forBasicType(btChar).zero(); Object zeValue = Wrapper.forBasicType(btChar).zero();
Name[] zeNames = new Name[] { argument(0, L_TYPE), new Name(idFun, zeValue) }; Name[] zeNames = new Name[] { argument(0, L_TYPE), new Name(idFun, zeValue) };
zeForm = new LambdaForm(1, zeNames, 1, Kind.ZERO); zeForm = new LambdaForm(1, zeNames, 1, Kind.ZERO);
zeForm.compileToBytecode(); zeForm.compileToBytecode();
zeFun = new NamedFunction(zeMem, MethodHandleImpl.makeIntrinsic( zeFun = new NamedFunction(zeMem, SimpleMethodHandle.make(zeMem.getInvocationType(), zeForm),
zeMem.getInvocationType(), zeForm, MethodHandleImpl.Intrinsic.ZERO)); MethodHandleImpl.Intrinsic.ZERO);
} }
LF_zero[ord] = zeForm; LF_zero[ord] = zeForm;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -541,7 +541,7 @@ class LambdaFormEditor {
// adjust the arguments // adjust the arguments
MethodHandle aload = MethodHandles.arrayElementGetter(erasedArrayType); MethodHandle aload = MethodHandles.arrayElementGetter(erasedArrayType);
for (int i = 0; i < arrayLength; i++) { 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.insertExpression(exprPos + i, loadArgument);
buf.replaceParameterByCopy(pos + i, exprPos + i); buf.replaceParameterByCopy(pos + i, exprPos + i);
} }
@ -604,7 +604,8 @@ class LambdaFormEditor {
for (int i = 0; i < collectorArity; i++) { for (int i = 0; i < collectorArity; i++) {
newParams[i] = new Name(pos + i, argType); 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 // insert the new expression
int exprPos = lambdaForm.arity(); int exprPos = lambdaForm.arity();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -592,7 +592,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
names[nameCursor++] = new Name(getFunction(NF_checkSpreadArgument), array, spreadArgCount); names[nameCursor++] = new Name(getFunction(NF_checkSpreadArgument), array, spreadArgCount);
for (int j = 0; j < spreadArgCount; i++, j++) { for (int j = 0; j < spreadArgCount; i++, j++) {
indexes[i] = nameCursor; 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) { } else if (i < indexes.length) {
indexes[i] = argIndex; 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]); names[PROFILE] = new Name(getFunction(NF_profileBoolean), names[CALL_TEST], names[GET_COUNTERS]);
} }
// call selectAlternative // 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 // call target or fallback
invokeArgs[0] = names[SELECT_ALT]; invokeArgs[0] = names[SELECT_ALT];
@ -1008,7 +1008,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
Object[] args = new Object[invokeBasic.type().parameterCount()]; Object[] args = new Object[invokeBasic.type().parameterCount()];
args[0] = names[GET_COLLECT_ARGS]; args[0] = names[GET_COLLECT_ARGS];
System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT-ARG_BASE); 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); // 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]}; 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()]; Object[] args = new Object[invokeBasic.type().parameterCount()];
args[0] = names[GET_COLLECT_ARGS]; args[0] = names[GET_COLLECT_ARGS];
System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT - ARG_BASE); 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); // t_{i+1}:L=MethodHandleImpl.loop(localTypes:L,clauses:L,t_{i}:L);
Object[] lArgs = Object[] lArgs =
@ -2133,7 +2133,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
Object[] args = new Object[invokeBasic.type().parameterCount()]; Object[] args = new Object[invokeBasic.type().parameterCount()];
args[0] = names[GET_COLLECT_ARGS]; args[0] = names[GET_COLLECT_ARGS];
System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT-ARG_BASE); 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); // 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]}; 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", return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "fillNewTypedArray",
MethodType.methodType(Object[].class, Object[].class, Integer.class, Object[].class)); MethodType.methodType(Object[].class, Object[].class, Integer.class, Object[].class));
case MH_selectAlternative: case MH_selectAlternative:
return makeIntrinsic(IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative", return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative",
MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class)), MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class));
Intrinsic.SELECT_ALTERNATIVE);
case MH_countedLoopPred: case MH_countedLoopPred:
return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "countedLoopPredicate", return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "countedLoopPredicate",
MethodType.methodType(boolean.class, int.class, int.class)); MethodType.methodType(boolean.class, int.class, int.class));

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,13 +44,13 @@
* </li> * </li>
* </ul> * </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 * The following low-level information summarizes relevant parts of the
* Java Virtual Machine specification. For full details, please see the * Java Virtual Machine specification. For full details, please see the
* current version of that specification. * current version of that specification.
* *
* Each occurrence of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>. * 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 * A dynamic call site is originally in an unlinked state. In this state, there is
* no target method for the call site to invoke. * no target method for the call site to invoke.
* <p> * <p>
@ -77,7 +77,8 @@
* <p> * <p>
* The bootstrap method is invoked on at least three values: * The bootstrap method is invoked on at least three values:
* <ul> * <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 String}, the method name mentioned in the call site </li>
* <li>a {@code MethodType}, the resolved type descriptor of the call </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> * <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 these rules, here are examples of legal bootstrap method declarations,
* given various numbers {@code N} of extra arguments. * given various numbers {@code N} of extra arguments.
* The first rows (marked {@code *}) will work for any number of extra arguments. * The first rows (marked {@code *}) will work for any number of extra arguments.
* <table border=1 cellpadding=5 summary="Static argument types"> * <table class="plain">
* <tr><th>N</th><th>sample bootstrap method</th></tr> * <caption style="display:none">Static argument types</caption>
* <tr><td>*</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr> * <tr><th>N</th><th>Sample bootstrap method</th></tr>
* <tr><td>*</td><td><code>CallSite bootstrap(Object... args)</code></td></tr> * <tr><td>*</td>
* <tr><td>*</td><td><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr> * <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
* <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr> * <tr><td>*</td><td>
* <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr> * <code>CallSite bootstrap(Object... args)</code></td></tr>
* <tr><td>1</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr> * <tr><td>*</td><td>
* <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr> * <code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
* <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr> * <tr><td>0</td><td>
* <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr> * <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> * </table>
* The last example assumes that the extra arguments are of type * The last example assumes that the extra arguments are of type
* {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively. * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.

View File

@ -27,7 +27,7 @@
* Classes to support module descriptors and creating configurations of modules * Classes to support module descriptors and creating configurations of modules
* by means of resolution and service binding. * 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 * <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 * 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 * resolved so that it reads all other modules in the resulting configuration and
* all modules in parent configurations. </p> * 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 * <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 * from the set of observable modules induced by the service-use dependence

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -57,7 +57,7 @@
* by the {@code throw} statement. Subclasses of {@code Throwable} * by the {@code throw} statement. Subclasses of {@code Throwable}
* represent errors and exceptions. * represent errors and exceptions.
* *
* <a name="charenc"></a> * <a id="charenc"></a>
* <h3>Character Encodings</h3> * <h3>Character Encodings</h3>
* *
* The specification of the {@link java.nio.charset.Charset * The specification of the {@link java.nio.charset.Charset

View File

@ -36,6 +36,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
* conversion would occur. * conversion would occur.
* *
* @author Nakul Saraiya * @author Nakul Saraiya
* @since 1.1
*/ */
public final public final
class Array { class Array {

View File

@ -59,6 +59,7 @@ import java.util.StringJoiner;
* *
* @author Kenneth Russell * @author Kenneth Russell
* @author Nakul Saraiya * @author Nakul Saraiya
* @since 1.1
*/ */
public final class Constructor<T> extends Executable { public final class Constructor<T> extends Executable {
private Class<T> clazz; private Class<T> clazz;

View File

@ -60,6 +60,7 @@ import sun.reflect.annotation.TypeAnnotationParser;
* *
* @author Kenneth Russell * @author Kenneth Russell
* @author Nakul Saraiya * @author Nakul Saraiya
* @since 1.1
*/ */
public final public final
class Field extends AccessibleObject implements Member { class Field extends AccessibleObject implements Member {

View File

@ -38,6 +38,7 @@ package java.lang.reflect;
* *
* @see Method * @see Method
* @see Constructor * @see Constructor
* @since 1.1
*/ */
public class InvocationTargetException extends ReflectiveOperationException { public class InvocationTargetException extends ReflectiveOperationException {
/** /**

View File

@ -35,6 +35,7 @@ package java.lang.reflect;
* @see Constructor * @see Constructor
* *
* @author Nakul Saraiya * @author Nakul Saraiya
* @since 1.1
*/ */
public public
interface Member { interface Member {

View File

@ -63,6 +63,7 @@ import java.util.StringJoiner;
* *
* @author Kenneth Russell * @author Kenneth Russell
* @author Nakul Saraiya * @author Nakul Saraiya
* @since 1.1
*/ */
public final class Method extends Executable { public final class Method extends Executable {
private Class<?> clazz; private Class<?> clazz;

View File

@ -43,6 +43,7 @@ import jdk.internal.reflect.ReflectionFactory;
* *
* @author Nakul Saraiya * @author Nakul Saraiya
* @author Kenneth Russell * @author Kenneth Russell
* @since 1.1
*/ */
public class Modifier { public class Modifier {

View File

@ -222,6 +222,7 @@ import java.util.Arrays;
* @author Mike Cowlishaw * @author Mike Cowlishaw
* @author Joseph D. Darcy * @author Joseph D. Darcy
* @author Sergey V. Kuksenko * @author Sergey V. Kuksenko
* @since 1.1
*/ */
public class BigDecimal extends Number implements Comparable<BigDecimal> { public class BigDecimal extends Number implements Comparable<BigDecimal> {
/** /**

View File

@ -75,7 +75,7 @@ import sun.net.util.IPAddressUtil;
* <blockquote><table class="borderless"> * <blockquote><table class="borderless">
* <caption style="display:none">Description of unicast and multicast address types</caption> * <caption style="display:none">Description of unicast and multicast address types</caption>
* <tbody> * <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 * <td>An identifier for a single interface. A packet sent to
* a unicast address is delivered to the interface identified by * a unicast address is delivered to the interface identified by
* that address. * that address.
@ -94,7 +94,7 @@ import sun.net.util.IPAddressUtil;
* IP address loops around and becomes IP input on the local * IP address loops around and becomes IP input on the local
* host. This address is often used when testing a * host. This address is often used when testing a
* client.</td></tr> * client.</td></tr>
* <tr><th 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 * <td>An identifier for a set of interfaces (typically belonging
* to different nodes). A packet sent to a multicast address is * to different nodes). A packet sent to a multicast address is
* delivered to all interfaces identified by that address.</td></tr> * delivered to all interfaces identified by that address.</td></tr>

View File

@ -167,6 +167,7 @@ import java.util.StringTokenizer;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public final class NetPermission extends BasicPermission { public final class NetPermission extends BasicPermission {

View File

@ -40,6 +40,7 @@ import java.lang.annotation.Native;
* DatagramSocket and MulticastSocket. * DatagramSocket and MulticastSocket.
* *
* @author David Brown * @author David Brown
* @since 1.1
*/ */

View File

@ -142,6 +142,7 @@ import sun.security.util.Debug;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
* *
* @serial exclude * @serial exclude
*/ */

View File

@ -253,32 +253,32 @@ import java.lang.NullPointerException; // for javadoc
* which are taken from that specification, are used below to describe these * which are taken from that specification, are used below to describe these
* constraints: * constraints:
* *
* <blockquote><table> * <blockquote><table class="borderless">
* <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption> * <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption>
* <tbody> * <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, * <td>The US-ASCII alphabetic characters,
* {@code 'A'}&nbsp;through&nbsp;{@code 'Z'} * {@code 'A'}&nbsp;through&nbsp;{@code 'Z'}
* and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr> * and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr>
* <tr><th valign=top><i>digit</i></th> * <tr><th style="vertical-align:top"><i>digit</i></th>
* <td>The US-ASCII decimal digit characters, * <td>The US-ASCII decimal digit characters,
* {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr> * {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr>
* <tr><th 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> * <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
* <tr><th valign=top><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th> * <tr><th style="vertical-align:top"><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th>
* <td>All <i>alphanum</i> characters together with those in the string * <td>All <i>alphanum</i> characters together with those in the string
* {@code "_-!.~'()*"}</td></tr> * {@code "_-!.~'()*"}</td></tr>
* <tr><th 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> * <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 * <td>All <i>punct</i> characters together with those in the string
* {@code "?/[]@"}</td></tr> * {@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 * <td>Escaped octets, that is, triplets consisting of the percent
* character ({@code '%'}) followed by two hexadecimal digits * character ({@code '%'}) followed by two hexadecimal digits
* ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and * ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
* {@code 'a'}-{@code 'f'})</td></tr> * {@code 'a'}-{@code 'f'})</td></tr>
* <tr><th 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, * <td>The Unicode characters that are not in the US-ASCII character set,
* are not control characters (according to the {@link * are not control characters (according to the {@link
* java.lang.Character#isISOControl(char) Character.isISOControl} * java.lang.Character#isISOControl(char) Character.isISOControl}

View File

@ -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. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -22,15 +23,14 @@
or visit www.oracle.com if you need additional information or have any or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML> <HTML>
<HEAD> <HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1"> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Networking Properties</TITLE> <TITLE>Networking Properties</TITLE>
</HEAD> </HEAD>
<BODY LANG="en-US" DIR="LTR"> <BODY LANG="en-US" DIR="LTR">
<H1 ALIGN=CENTER>Networking Properties</H1> <H1 style="text-align:center">Networking Properties</H1>
<P ALIGN=LEFT>There are a few standard system properties used to <P>There are a few standard system properties used to
alter the mechanisms and behavior of the various classes of the alter the mechanisms and behavior of the various classes of the
java.net package. Some are checked only once at startup of the VM, java.net package. Some are checked only once at startup of the VM,
and therefore are best set using the -D option of the java command, and therefore are best set using the -D option of the java command,
@ -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 The purpose of this document is to list
and detail all of these properties.</P> and detail all of these properties.</P>
<P>If there is no special note, a property value is checked every time it is used.</P> <P>If there is no special note, a property value is checked every time it is used.</P>
<a name="Ipv4IPv6"></a> <a id="Ipv4IPv6"></a>
<H2>IPv4 / IPv6</H2> <H2>IPv4 / IPv6</H2>
<UL> <UL>
<LI><P><B>java.net.preferIPv4Stack</B> (default: false)<BR> <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> returned by the operating system.</P>
</UL> </UL>
<P>Both of these properties are checked only once, at startup.</P> <P>Both of these properties are checked only once, at startup.</P>
<a name="Proxies"></a> <a id="Proxies"></a>
<H2>Proxies</H2> <H2>Proxies</H2>
<P>A proxy server allows indirect connection to network services and <P>A proxy server allows indirect connection to network services and
is used mainly for security (to get through firewalls) 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 globally through their user interface). Note that this property is
checked only once at startup.</P> checked only once at startup.</P>
</UL> </UL>
<a name="MiscHTTP"></a> <a id="MiscHTTP"></a>
<H2>Misc HTTP properties</H2> <H2>Misc HTTP properties</H2>
<UL> <UL>
<LI><P><B>http.agent</B> (default: &ldquo;Java/&lt;version&gt;&rdquo;)<BR> <LI><P><B>http.agent</B> (default: &ldquo;Java/&lt;version&gt;&rdquo;)<BR>
@ -214,7 +214,7 @@ of proxies.</P>
</OL> </OL>
</UL> </UL>
<P>All these properties are checked only once at startup.</P> <P>All these properties are checked only once at startup.</P>
<a name="AddressCache"></a> <a id="AddressCache"></a>
<H2>Address Cache</H2> <H2>Address Cache</H2>
<P>The java.net package, when doing name resolution, uses an address <P>The java.net package, when doing name resolution, uses an address
cache for both security and performance reasons. Any address cache for both security and performance reasons. Any address

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,33 +28,46 @@
* performing I/O operations, such as files and sockets; defines selectors, for * performing I/O operations, such as files and sockets; defines selectors, for
* multiplexed, non-blocking I/O operations. * 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"> * <blockquote><table class="borderless">
* <tr><th align="left">Channels</th><th align="left">Description</th></tr> * <caption style="display:none">Lists channels and their descriptions</caption>
* <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td> * <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> * <td>A nexus for I/O operations</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td>
* <td>Can read into a buffer</td></tr> * <td>Can read into a buffer</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td>
* <td>Can read into a sequence of&nbsp;buffers</td></tr> * <td>Can read into a sequence of&nbsp;buffers</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td>
* <td>Can write from a buffer</td></tr> * <td>Can write from a buffer</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td>
* <td>Can write from a sequence of&nbsp;buffers</td></tr> * <td>Can write from a sequence of&nbsp;buffers</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td>
* <td>Can read/write to/from a&nbsp;buffer</td></tr> * <td>Can read/write to/from a&nbsp;buffer</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td> * <tr><td style="vertical-align:top">
* <td>A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes</td></tr> * &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</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">
* &nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td>
* <td>Supports asynchronous I/O operations.</td></tr> * <td>Supports asynchronous I/O operations.</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
* <td>Can read and write bytes asynchronously</td></tr> * <td>Can read and write bytes asynchronously</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td>
* <td>A channel to a network socket</td></tr> * <td>A channel to a network socket</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td>
* <td>Can join Internet Protocol (IP) multicast groups</td></tr> * <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> * <td>Utility methods for channel/stream interoperation</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -109,13 +122,19 @@
* be constructed that uses a given charset to encode characters into bytes and * be constructed that uses a given charset to encode characters into bytes and
* write them to a given writable byte channel. * write them to a given writable byte channel.
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists file channels and their descriptions"> * <blockquote><table class="borderless">
* <tr><th align="left">File channels</th><th align="left">Description</th></tr> * <caption style="display:none">
* <tr><td valign=top>{@link java.nio.channels.FileChannel}</td> * 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> * <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> * <td>A lock on a (region of a) file</td></tr>
* <tr><td valign=top>{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td> * <tr><td style="vertical-align:top">
* {@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
* <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr> * <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -136,27 +155,35 @@
* file channel connected to the same underlying file as the {@link java.io} * file channel connected to the same underlying file as the {@link java.io}
* class. * class.
* *
* <a name="multiplex"></a> * <a id="multiplex"></a>
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions"> * <blockquote><table class="borderless">
* <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr> * <caption style="display:none">
* <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td> * 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> * <td>A channel that can be multiplexed</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td>
* <td>A channel to a datagram-oriented socket</td></tr> * <td>A channel to a datagram-oriented socket</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td>
* <td>The write end of a pipe</td></tr> * <td>The write end of a pipe</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td>
* <td>The read end of a pipe</td></tr> * <td>The read end of a pipe</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td>
* <td>A channel to a stream-oriented listening socket</td></tr> * <td>A channel to a stream-oriented listening socket</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td>
* <td>A channel for a stream-oriented connecting socket</td></tr> * <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> * <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 * <td>A token representing the registration <br> of a channel
* with&nbsp;a&nbsp;selector</td></tr> * with&nbsp;a&nbsp;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&nbsp;pipe</td></tr> * <td>Two channels that form a unidirectional&nbsp;pipe</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -222,19 +249,27 @@
* directly; custom channel classes should extend the appropriate {@link * directly; custom channel classes should extend the appropriate {@link
* java.nio.channels.SelectableChannel} subclasses defined in this package. * 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"> * <blockquote><table class="borderless">
* <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr> * <caption style="display:none">
* <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td> * 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> * <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> * <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
* <tr><td valign=top>{@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td> * <tr><td style="vertical-align:top">
* {@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td>
* <td>An asynchronous channel to a stream-oriented listening socket</td></tr> * <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
* <tr><td 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> * <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> * <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -277,7 +312,6 @@
* so that sophisticated users can take advantage of operating-system-specific * so that sophisticated users can take advantage of operating-system-specific
* asynchronous I/O mechanisms when very high performance is required. * 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 * <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 * or method in any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown. * java.lang.NullPointerException NullPointerException} to be thrown.

View File

@ -27,17 +27,19 @@
* Defines charsets, decoders, and encoders, for translating between * Defines charsets, decoders, and encoders, for translating between
* bytes and Unicode characters. * bytes and Unicode characters.
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Summary of charsets, decoders, and encoders in this package"> * <blockquote><table class="borderless">
* <tr><th align="left">Class name</th><th align="left">Description</th></tr> * <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
* <tr><td valign=top>{@link java.nio.charset.Charset}</td> * <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> * <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> * <td>Decodes bytes into characters</td></tr>
* <tr><td valign=top>{@link java.nio.charset.CharsetEncoder}&nbsp;&nbsp;</td> * <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td>
* <td>Encodes characters into bytes</td></tr> * <td>Encodes characters into bytes</td></tr>
* <tr><td valign=top>{@link java.nio.charset.CoderResult}&nbsp;&nbsp;</td> * <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td>
* <td>Describes coder results</td></tr> * <td>Describes coder results</td></tr>
* <tr><td valign=top>{@link java.nio.charset.CodingErrorAction}&nbsp;&nbsp;</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> * <td>Describes actions to take when<br>coding errors are detected</td></tr>
* *
* </table></blockquote> * </table></blockquote>

View File

@ -26,25 +26,41 @@
/** /**
* Interfaces and classes providing access to file and file system attributes. * Interfaces and classes providing access to file and file system attributes.
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views"> * <blockquote><table class="borderless">
* <tr><th align="left">Attribute views</th><th align="left">Description</th></tr> * <caption style="display:none">Attribute views</caption>
* <tr><td valign=top><i>{@link java.nio.file.attribute.AttributeView}</i></td> * <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> * <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
* <td>Can read or update file attributes</td></tr> * <td>Can read or update file attributes</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;
* <i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update a basic set of file attributes</td></tr> * <td>Can read or update a basic set of file attributes</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* <i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update POSIX defined file attributes</td></tr> * <td>Can read or update POSIX defined file attributes</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* <i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update FAT file attributes</td></tr> * <td>Can read or update FAT file attributes</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;
* <i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update the owner of a file</td></tr> * <td>Can read or update the owner of a file</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* <i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update Access Control Lists</td></tr> * <td>Can read or update Access Control Lists</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;
* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update user-defined file attributes</td></tr> * <td>Can read or update user-defined file attributes</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
* <td>Can read or update file system attributes</td></tr> * <td>Can read or update file system attributes</td></tr>
* </table></blockquote> * </table></blockquote>
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,7 +33,7 @@
* package is used by service provider implementors wishing to extend the * package is used by service provider implementors wishing to extend the
* platform default provider, or to construct other provider implementations. </p> * 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>. * <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. * 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 * 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 * that are semantically close but support for these other types of links is
* not included in this package. </p> * 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 * <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 * 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 * 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 * or on some other machine. The exact nature of any such inconsistencies are
* system-dependent and are therefore unspecified. </p> * 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 * <p> The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
* java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file * 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 * to require that updates to the file are written synchronously to the underlying

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -60,30 +60,33 @@
* the contents of which can be used to extend the platform's default * the contents of which can be used to extend the platform's default
* implementations or to construct alternative implementations. * 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"> * <blockquote><table class="borderless">
* <tr><th align="left">Buffers</th><th align="left">Description</th></tr> * <caption style="display:none">Description of the various buffers</caption>
* <tr><td valign=top>{@link java.nio.Buffer}</td> * <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; * <td>Position, limit, and capacity;
* <br>clear, flip, rewind, and mark/reset</td></tr> * <br>clear, flip, rewind, and mark/reset</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td>
* <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr> * <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td> * <tr><td style="vertical-align:top">
* &nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
* <td>A byte buffer mapped to a file</td></tr> * <td>A byte buffer mapped to a file</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.CharBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.CharBuffer}</td>
* <td>Get/put, compact; allocate,&nbsp;wrap</td></tr> * <td>Get/put, compact; allocate,&nbsp;wrap</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.IntBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.IntBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.LongBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.LongBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td> * <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</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&nbsp;byte&nbsp;orders</td></tr> * <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr>
* </table></blockquote> * </table></blockquote>
* *

View File

@ -74,6 +74,7 @@ import sun.security.util.SecurityConstants;
* @see AccessController * @see AccessController
* *
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public final class AccessControlContext { public final class AccessControlContext {

View File

@ -38,6 +38,7 @@ package java.security;
* *
* @author Li Gong * @author Li Gong
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public class AccessControlException extends SecurityException { public class AccessControlException extends SecurityException {

View File

@ -259,6 +259,7 @@ import jdk.internal.reflect.Reflection;
* *
* @author Li Gong * @author Li Gong
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public final class AccessController { public final class AccessController {

View File

@ -61,11 +61,17 @@ import java.util.Objects;
* </ul> * </ul>
* *
* <P>In case the client does not explicitly initialize the * <P>In case the client does not explicitly initialize the
* AlgorithmParameterGenerator * AlgorithmParameterGenerator (via a call to an {@code init} method),
* (via a call to an {@code init} method), each provider must supply (and * each provider must supply (and document) a default initialization.
* document) a default initialization. For example, the Sun provider uses a * See the Keysize Restriction sections of the
* default modulus prime size of 1024 bits for the generation of DSA * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
* parameters. * 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 * <p> Every implementation of the Java platform is required to support the
* following standard {@code AlgorithmParameterGenerator} algorithms and * following standard {@code AlgorithmParameterGenerator} algorithms and

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,8 +39,15 @@ import java.security.spec.AlgorithmParameterSpec;
* <p> In case the client does not explicitly initialize the * <p> In case the client does not explicitly initialize the
* AlgorithmParameterGenerator (via a call to an {@code engineInit} * AlgorithmParameterGenerator (via a call to an {@code engineInit}
* method), each provider must supply (and document) a default initialization. * method), each provider must supply (and document) a default initialization.
* For example, the Sun provider uses a default modulus prime size of 1024 * See the Keysize Restriction sections of the
* bits for the generation of DSA parameters. * <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 * @author Jan Luehe
* *

View File

@ -51,6 +51,7 @@ import sun.security.util.SecurityConstants;
* *
* *
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
* *
* @serial exclude * @serial exclude
*/ */

View File

@ -62,6 +62,7 @@ import java.util.concurrent.ConcurrentHashMap;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public abstract class BasicPermission extends Permission public abstract class BasicPermission extends Permission

View File

@ -56,6 +56,7 @@ import java.util.Date;
* the certificate and satisfy itself of its validity. * the certificate and satisfy itself of its validity.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* @deprecated A new certificate handling package is created in the Java platform. * @deprecated A new certificate handling package is created in the Java platform.
* This Certificate interface is entirely deprecated and * This Certificate interface is entirely deprecated and
* is here to allow for a smooth transition to the new * is here to allow for a smooth transition to the new

View File

@ -44,6 +44,7 @@ import sun.net.util.URLUtil;
* *
* @author Li Gong * @author Li Gong
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public class CodeSource implements java.io.Serializable { public class CodeSource implements java.io.Serializable {

View File

@ -29,6 +29,7 @@ package java.security;
* This is the generic Message Digest exception. * This is the generic Message Digest exception.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class DigestException extends GeneralSecurityException { public class DigestException extends GeneralSecurityException {

View File

@ -59,6 +59,7 @@ import java.io.ByteArrayInputStream;
* @see DigestOutputStream * @see DigestOutputStream
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.2
*/ */
public class DigestInputStream extends FilterInputStream { public class DigestInputStream extends FilterInputStream {

View File

@ -51,6 +51,7 @@ import java.io.ByteArrayOutputStream;
* @see DigestInputStream * @see DigestInputStream
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.2
*/ */
public class DigestOutputStream extends FilterOutputStream { public class DigestOutputStream extends FilterOutputStream {

View File

@ -31,6 +31,7 @@ package java.security;
* security-related exception classes that extend from it. * security-related exception classes that extend from it.
* *
* @author Jan Luehe * @author Jan Luehe
* @since 1.2
*/ */
public class GeneralSecurityException extends Exception { public class GeneralSecurityException extends Exception {

View File

@ -38,6 +38,7 @@ package java.security;
* *
* @author Roland Schemers * @author Roland Schemers
* @author Li Gong * @author Li Gong
* @since 1.2
*/ */
public interface Guard { public interface Guard {

View File

@ -44,6 +44,7 @@ package java.security;
* *
* @author Roland Schemers * @author Roland Schemers
* @author Li Gong * @author Li Gong
* @since 1.2
*/ */
public class GuardedObject implements java.io.Serializable { public class GuardedObject implements java.io.Serializable {

View File

@ -51,6 +51,7 @@ import java.util.*;
* @see Principal * @see Principal
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* @deprecated This class is no longer used. Its functionality has been * @deprecated This class is no longer used. Its functionality has been
* replaced by {@code java.security.KeyStore}, the * replaced by {@code java.security.KeyStore}, the
* {@code java.security.cert} package, and * {@code java.security.cert} package, and

View File

@ -55,6 +55,7 @@ import java.util.Properties;
* @see Key * @see Key
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* *
* @deprecated This class is no longer used. Its functionality has been * @deprecated This class is no longer used. Its functionality has been
* replaced by {@code java.security.KeyStore}, the * replaced by {@code java.security.KeyStore}, the

View File

@ -31,6 +31,7 @@ package java.security;
* length, uninitialized, etc). * length, uninitialized, etc).
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class InvalidKeyException extends KeyException { public class InvalidKeyException extends KeyException {

View File

@ -31,6 +31,7 @@ package java.security;
* to a method. * to a method.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class InvalidParameterException extends IllegalArgumentException { public class InvalidParameterException extends IllegalArgumentException {

View File

@ -97,6 +97,7 @@ package java.security;
* @see Signer * @see Signer
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public interface Key extends java.io.Serializable { public interface Key extends java.io.Serializable {

View File

@ -33,6 +33,7 @@ package java.security;
* @see KeyManagementException * @see KeyManagementException
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class KeyException extends GeneralSecurityException { public class KeyException extends GeneralSecurityException {

View File

@ -38,6 +38,7 @@ package java.security;
* </ul> * </ul>
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* *
* @see Key * @see Key
* @see KeyException * @see KeyException

View File

@ -36,6 +36,7 @@ import java.util.*;
* @see PrivateKey * @see PrivateKey
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public final class KeyPair implements java.io.Serializable { public final class KeyPair implements java.io.Serializable {

View File

@ -95,8 +95,15 @@ import sun.security.util.Debug;
* <p>In case the client does not explicitly initialize the KeyPairGenerator * <p>In case the client does not explicitly initialize the KeyPairGenerator
* (via a call to an {@code initialize} method), each provider must * (via a call to an {@code initialize} method), each provider must
* supply (and document) a default initialization. * supply (and document) a default initialization.
* For example, the <i>Sun</i> provider uses a default modulus size (keysize) * See the Keysize Restriction sections of the
* of 1024 bits for DSA key pairs. * <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 * <p>Note that this class is abstract and extends from
* {@code KeyPairGeneratorSpi} for historical reasons. * {@code KeyPairGeneratorSpi} for historical reasons.
@ -121,6 +128,7 @@ import sun.security.util.Debug;
* other algorithms are supported. * other algorithms are supported.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* *
* @see java.security.spec.AlgorithmParameterSpec * @see java.security.spec.AlgorithmParameterSpec
*/ */

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,10 +39,18 @@ import java.security.spec.AlgorithmParameterSpec;
* <p> In case the client does not explicitly initialize the KeyPairGenerator * <p> In case the client does not explicitly initialize the KeyPairGenerator
* (via a call to an {@code initialize} method), each provider must * (via a call to an {@code initialize} method), each provider must
* supply (and document) a default initialization. * supply (and document) a default initialization.
* For example, the <i>Sun</i> provider uses a default modulus size (keysize) * See the Keysize Restriction sections of the
* of 1024 bits. * <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 * @author Benjamin Renaud
* @since 1.2
* *
* *
* @see KeyPairGenerator * @see KeyPairGenerator

View File

@ -96,6 +96,7 @@ import javax.crypto.SecretKey;
* other algorithms are supported. * other algorithms are supported.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* *
* @see DigestInputStream * @see DigestInputStream
* @see DigestOutputStream * @see DigestOutputStream

View File

@ -43,6 +43,7 @@ import sun.security.jca.JCAUtil;
* <p> Implementations are free to implement the Cloneable interface. * <p> Implementations are free to implement the Cloneable interface.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.2
* *
* *
* @see MessageDigest * @see MessageDigest

View File

@ -30,6 +30,7 @@ package java.security;
* requested but is not available in the environment. * requested but is not available in the environment.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class NoSuchAlgorithmException extends GeneralSecurityException { public class NoSuchAlgorithmException extends GeneralSecurityException {

View File

@ -30,6 +30,7 @@ package java.security;
* requested but is not available in the environment. * requested but is not available in the environment.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class NoSuchProviderException extends GeneralSecurityException { public class NoSuchProviderException extends GeneralSecurityException {

View File

@ -60,6 +60,7 @@ package java.security;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public abstract class Permission implements Guard, java.io.Serializable { public abstract class Permission implements Guard, java.io.Serializable {

View File

@ -91,6 +91,7 @@ import java.util.stream.StreamSupport;
* *
* *
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public abstract class PermissionCollection implements java.io.Serializable { public abstract class PermissionCollection implements java.io.Serializable {

View File

@ -75,6 +75,7 @@ import java.io.IOException;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
* *
* @serial exclude * @serial exclude
*/ */

View File

@ -78,6 +78,7 @@ import sun.security.util.SecurityConstants;
* *
* @author Roland Schemers * @author Roland Schemers
* @author Gary Ellison * @author Gary Ellison
* @since 1.2
* @see java.security.Provider * @see java.security.Provider
* @see java.security.ProtectionDomain * @see java.security.ProtectionDomain
* @see java.security.Permission * @see java.security.Permission

View File

@ -35,6 +35,7 @@ import javax.security.auth.Subject;
* @see java.security.cert.X509Certificate * @see java.security.cert.X509Certificate
* *
* @author Li Gong * @author Li Gong
* @since 1.1
*/ */
public interface Principal { public interface Principal {

View File

@ -54,6 +54,7 @@ package java.security;
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @author Josh Bloch * @author Josh Bloch
* @since 1.1
*/ */
public interface PrivateKey extends Key, javax.security.auth.Destroyable { public interface PrivateKey extends Key, javax.security.auth.Destroyable {

View File

@ -34,6 +34,7 @@ package java.security;
* throw checked exceptions must use {@code PrivilegedExceptionAction} * throw checked exceptions must use {@code PrivilegedExceptionAction}
* instead. * instead.
* *
* @since 1.2
* @see AccessController * @see AccessController
* @see AccessController#doPrivileged(PrivilegedAction) * @see AccessController#doPrivileged(PrivilegedAction)
* @see PrivilegedExceptionAction * @see PrivilegedExceptionAction

View File

@ -43,6 +43,7 @@ package java.security;
* <i>cause</i>, and may be accessed via the {@link Throwable#getCause()} * <i>cause</i>, and may be accessed via the {@link Throwable#getCause()}
* method, as well as the aforementioned "legacy method." * method, as well as the aforementioned "legacy method."
* *
* @since 1.2
* @see PrivilegedExceptionAction * @see PrivilegedExceptionAction
* @see AccessController#doPrivileged(PrivilegedExceptionAction) * @see AccessController#doPrivileged(PrivilegedExceptionAction)
* @see AccessController#doPrivileged(PrivilegedExceptionAction,AccessControlContext) * @see AccessController#doPrivileged(PrivilegedExceptionAction,AccessControlContext)

View File

@ -35,6 +35,7 @@ package java.security;
* computations that do not throw * computations that do not throw
* checked exceptions should use {@code PrivilegedAction} instead. * checked exceptions should use {@code PrivilegedAction} instead.
* *
* @since 1.2
* @see AccessController * @see AccessController
* @see AccessController#doPrivileged(PrivilegedExceptionAction) * @see AccessController#doPrivileged(PrivilegedExceptionAction)
* @see AccessController#doPrivileged(PrivilegedExceptionAction, * @see AccessController#doPrivileged(PrivilegedExceptionAction,

View File

@ -59,6 +59,7 @@ import sun.security.util.SecurityConstants;
* @author Li Gong * @author Li Gong
* @author Roland Schemers * @author Roland Schemers
* @author Gary Ellison * @author Gary Ellison
* @since 1.2
*/ */
public class ProtectionDomain { public class ProtectionDomain {

View File

@ -102,6 +102,7 @@ import java.util.function.Function;
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @author Andreas Sterbenz * @author Andreas Sterbenz
* @since 1.1
*/ */
public abstract class Provider extends Properties { public abstract class Provider extends Properties {

View File

@ -32,6 +32,7 @@ package java.security;
* throw specialized, provider-specific runtime errors. * throw specialized, provider-specific runtime errors.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class ProviderException extends RuntimeException { public class ProviderException extends RuntimeException {

View File

@ -34,6 +34,7 @@ package java.security;
* See, for example, the DSAPublicKey interface in * See, for example, the DSAPublicKey interface in
* {@code java.security.interfaces}. * {@code java.security.interfaces}.
* *
* @since 1.1
* @see Key * @see Key
* @see PrivateKey * @see PrivateKey
* @see Certificate * @see Certificate

View File

@ -39,6 +39,7 @@ import sun.security.util.Debug;
* *
* @author Li Gong * @author Li Gong
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public class SecureClassLoader extends ClassLoader { public class SecureClassLoader extends ClassLoader {
/* /*

View File

@ -143,6 +143,7 @@ import sun.security.util.Debug;
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @author Josh Bloch * @author Josh Bloch
* @since 1.1
*/ */
public class SecureRandom extends java.util.Random { public class SecureRandom extends java.util.Random {

View File

@ -45,6 +45,7 @@ import sun.security.jca.*;
* {@code conf/security/java.security} in the Java installation directory. * {@code conf/security/java.security} in the Java installation directory.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public final class Security { public final class Security {

View File

@ -333,6 +333,7 @@ import java.util.StringTokenizer;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public final class SecurityPermission extends BasicPermission { public final class SecurityPermission extends BasicPermission {

View File

@ -113,6 +113,7 @@ import sun.security.jca.GetInstance.Instance;
* other algorithms are supported. * other algorithms are supported.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* *
*/ */

View File

@ -29,6 +29,7 @@ package java.security;
* This is the generic Signature exception. * This is the generic Signature exception.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
*/ */
public class SignatureException extends GeneralSecurityException { public class SignatureException extends GeneralSecurityException {

View File

@ -44,6 +44,7 @@ import sun.security.jca.JCAUtil;
* of a particular signature algorithm. * of a particular signature algorithm.
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.2
* *
* *
* @see Signature * @see Signature

View File

@ -114,6 +114,7 @@ import java.io.*;
* @see Signature * @see Signature
* *
* @author Li Gong * @author Li Gong
* @since 1.2
*/ */
public final class SignedObject implements Serializable { public final class SignedObject implements Serializable {

View File

@ -38,6 +38,7 @@ import java.io.*;
* @see Identity * @see Identity
* *
* @author Benjamin Renaud * @author Benjamin Renaud
* @since 1.1
* *
* @deprecated This class is no longer used. Its functionality has been * @deprecated This class is no longer used. Its functionality has been
* replaced by {@code java.security.KeyStore}, the * replaced by {@code java.security.KeyStore}, the

View File

@ -96,6 +96,7 @@ import java.security.cert.*;
* *
* *
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
*/ */
public final class UnresolvedPermission extends Permission public final class UnresolvedPermission extends Permission

View File

@ -43,6 +43,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
* *
* *
* @author Roland Schemers * @author Roland Schemers
* @since 1.2
* *
* @serial include * @serial include
*/ */

View File

@ -82,6 +82,7 @@ import java.security.Principal;
* @see java.security.acl.Acl#getPermissions * @see java.security.acl.Acl#getPermissions
* *
* @author Satish Dharmaraj * @author Satish Dharmaraj
* @since 1.1
* *
* @deprecated This package has been replaced by {@code java.security.Policy} * @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2. * and related classes since 1.2.

View File

@ -50,6 +50,7 @@ import java.security.Principal;
* @see java.security.acl.Acl * @see java.security.acl.Acl
* *
* @author Satish Dharmaraj * @author Satish Dharmaraj
* @since 1.1
* *
* @deprecated This package has been replaced by {@code java.security.Policy} * @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2. * and related classes since 1.2.

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