diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2013-01-18 04:28:38 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2013-01-18 04:28:38 +0000 |
commit | 53c61a4f9d1c02db4d5690712ba9b6c00a3cb40e (patch) | |
tree | 59862f4436c696f15ad88011d3dffc4330078dcd | |
parent | f8f8cbf1674d3250604eecd1d2ef16bc2539519f (diff) | |
download | ports-53c61a4f9d1c02db4d5690712ba9b6c00a3cb40e.tar.gz ports-53c61a4f9d1c02db4d5690712ba9b6c00a3cb40e.zip |
Notes
-rw-r--r-- | java/openjdk7/Makefile | 5 | ||||
-rw-r--r-- | java/openjdk7/files/patch-7u9 | 7564 | ||||
-rw-r--r-- | java/openjdk7/files/patch-make-java-java-genlocales.gmk | 40 | ||||
-rw-r--r-- | java/openjdk7/files/patch-set | 18007 | ||||
-rw-r--r-- | java/openjdk7/files/patch-zzz-7u11 | 85 |
5 files changed, 17366 insertions, 8335 deletions
diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile index 424f6e427dc3..ac381bea165d 100644 --- a/java/openjdk7/Makefile +++ b/java/openjdk7/Makefile @@ -7,7 +7,6 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${PORT_MINOR_VERSION}.${PORT_BUILD_NUMBER} -PORTREVISION= 2 CATEGORIES= java devel MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/ \ http://download.java.net/jaxp/1.4.5/:jaxp \ @@ -41,8 +40,8 @@ DEBUG_DESC= Enable extra debugging info POLICY_DESC= Install the Unlimited Strength Policy Files TZUPDATE_DESC= Update the time zone data -PORT_MINOR_VERSION= 9 -PORT_BUILD_NUMBER= 05 +PORT_MINOR_VERSION= 11 +PORT_BUILD_NUMBER= 21 JDK_MAJOR_VERSION= 7 JDK_MINOR_VERSION= 6 JDK_BUILD_NUMBER= 24 diff --git a/java/openjdk7/files/patch-7u9 b/java/openjdk7/files/patch-7u9 deleted file mode 100644 index 72aee82120fc..000000000000 --- a/java/openjdk7/files/patch-7u9 +++ /dev/null @@ -1,7564 +0,0 @@ -diff -r e4def733cc8c -r d9c8fa0606fd .hgtags ---- .hgtags Tue Aug 07 12:09:29 2012 -0700 -+++ .hgtags Thu Sep 20 14:22:08 2012 -0700 -@@ -197,3 +197,17 @@ - 29f6fb1833eb2a696b95e8985126f2d70f511a82 jdk7u6-b21 - 31cdab09d719fe60876c7f3a472386c1455d93e2 jdk7u6-b22 - d1c709f1196a73d1df10d04a221b10e30fd2eb48 jdk7u6-b23 -+e4def733cc8c58e83b7cefa7edd89a3e2b793520 jdk7u6-b24 -+f5f546dba006778854e7a81141fc1b44acd257a4 jdk7u6-b30 -+43775eae8df6c874fb3631c86009505cf3821b1f jdk7u7-b10 -+a380c75873bfb578e605d4362edb18c08698cc3e jdk7u7-b30 -+d7f2b3949f9c9ff1115ea61c496d3cd4c62e2759 jdk7u7-b11 -+82c51e6a3bea0dd8feb1bd3033e847dbdc5d9f99 jdk7u7-b31 -+5ca487420f9c2cf6d39acf1e842d13bf8ef0ca07 jdk7u7-b01 -+dbfa9c57853c2dd9cd4e4a139d83b519573d8031 jdk7u7-b02 -+bae912f95f2aa1d22dbc0ff62816b71861965cd6 jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+5ca487420f9c2cf6d39acf1e842d13bf8ef0ca07 jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+dbfa9c57853c2dd9cd4e4a139d83b519573d8031 jdk7u9-b02 -+3159fbe20e2d9501007aae8ca3db58978d754561 jdk7u9-b04 -diff -r 02512f61591f -r a5dced409c4b .hgtags ---- corba/.hgtags Tue Aug 07 12:09:37 2012 -0700 -+++ corba/.hgtags Thu Sep 20 14:22:12 2012 -0700 -@@ -197,3 +197,17 @@ - 353c15c4bc371f2f8258344c988d1403477cc140 jdk7u6-b21 - 793b80c0316fcafa18668bced26acb41af3be07d jdk7u6-b22 - 2a8376123fbb81bc4b2f643ff7cfaf7f87b21c35 jdk7u6-b23 -+02512f61591f55d84458d1ea4ce84eecb7324f89 jdk7u6-b24 -+8b20875b3faa01ef56331045de88747df278eaeb jdk7u6-b30 -+d7fe6c13adf9e06d98c061449d171bc06c2ba0a3 jdk7u7-b10 -+496baf62d0550c704505b0ff6f390279f6a569e0 jdk7u7-b30 -+e57e4274a3575f278115cc8ef03c5bdf3c43a7ed jdk7u7-b11 -+06cbc4af754ea8f2e3b7d0b1701d1a69ce9d5075 jdk7u7-b31 -+8737f43e092ea52dd85dcf164736eea3b9b364e6 jdk7u7-b01 -+ec602836c4e173927911673d253bb8baa1e3d170 jdk7u7-b02 -+a163e56c6679d10dc64ec48f35e67c3a5942afba jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+8737f43e092ea52dd85dcf164736eea3b9b364e6 jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+ec602836c4e173927911673d253bb8baa1e3d170 jdk7u9-b02 -+268470f3f0d0d7e9b04c579c551571097f0b0305 jdk7u9-b04 -diff -r b03c2687fb16 -r da4aa289ac10 .hgtags ---- hotspot/.hgtags Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/.hgtags Mon Sep 24 12:07:44 2012 -0700 -@@ -318,3 +318,17 @@ - 02a6c89432d724119565f9ba25672829b136fc5f jdk7u6-b21 - a79d86eef6ac995a1fc35554f082f3a61abe9ae0 jdk7u6-b22 - df57f6208cb76b4e8d1a0bd0eea3d2ad577cb79b jdk7u6-b23 -+b03c2687fb16514652e79261ad68d2c601dcee62 jdk7u6-b24 -+cffde29ea7cc8647f17002a4d0e94065dcd82839 jdk7u6-b30 -+f7933fecea9aa494e4032e17ff07e5fcec4b5961 jdk7u7-b10 -+eeef33dc4b40f9ba50c4c9b1ac61b30f0f2523bf jdk7u7-b30 -+f1551c70c7f598b7049bcc33e530fc738a81c7a4 jdk7u7-b11 -+6b9db7216dd4b7846faf372f19566a418c8e391f jdk7u7-b31 -+b66bb0e3224ff15259361a5b501bf8fa6b346113 jdk7u7-b01 -+ca6943c94e6075fc28353d52ac6ea52c80aef9bb jdk7u7-b02 -+e043d96d767d8ba4d74d53c477af8e07b78b6128 jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+b66bb0e3224ff15259361a5b501bf8fa6b346113 jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+ca6943c94e6075fc28353d52ac6ea52c80aef9bb jdk7u9-b02 -+ed42837374ac730ddaf2fd28814017c665634a8b jdk7u9-b04 -diff -r b03c2687fb16 -r da4aa289ac10 make/hotspot_version ---- hotspot/make/hotspot_version Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/make/hotspot_version Mon Sep 24 12:07:44 2012 -0700 -@@ -34,8 +34,8 @@ - HOTSPOT_VM_COPYRIGHT=Copyright 2012 - - HS_MAJOR_VER=23 --HS_MINOR_VER=2 --HS_BUILD_NUMBER=09 -+HS_MINOR_VER=5 -+HS_BUILD_NUMBER=02 - - JDK_MAJOR_VER=1 - JDK_MINOR_VER=7 -diff -r b03c2687fb16 -r da4aa289ac10 src/cpu/sparc/vm/methodHandles_sparc.cpp ---- hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Mon Sep 24 12:07:44 2012 -0700 -@@ -698,6 +698,17 @@ - if (arg_slots.is_constant() && arg_slots.as_constant() == 0) - return; - -+ // We have to insert at least one word, so bang the stack. -+ if (UseStackBanging) { -+ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register -+ __ mov(G3_method_handle, temp_reg); -+ int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); -+ if (frame_size <= 0) -+ frame_size = 256 * Interpreter::stackElementSize; // conservative -+ __ generate_stack_overflow_check(frame_size); -+ __ mov(temp_reg, G3_method_handle); -+ } -+ - assert_different_registers(argslot_reg, temp_reg, temp2_reg, temp3_reg, - (!arg_slots.is_register() ? Gargs : arg_slots.as_register())); - -@@ -1702,6 +1713,14 @@ - "copied argument(s) must fall within current frame"); - } - -+ if (UseStackBanging) { -+ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register -+ __ mov(G3_method_handle, O3_scratch); -+ // Bang the stack before pushing args. -+ int frame_size = 256 * Interpreter::stackElementSize; // conservative -+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); -+ __ mov(O3_scratch, G3_method_handle); -+ } - // insert location is always the bottom of the argument list: - __ neg(O1_stack_move); - push_arg_slots(_masm, O0_argslot, O1_stack_move, O2_scratch, O3_scratch); -@@ -2118,6 +2137,18 @@ - // The return handler will further cut back the stack when it takes - // down the RF. Perhaps there is a way to streamline this further. - -+ if (UseStackBanging) { -+ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register -+ __ mov(G3_method_handle, O4_scratch); -+ // Bang the stack before recursive call. -+ // Even if slots == 0, we are inside a RicochetFrame. -+ int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; -+ if (frame_size < 0) { -+ frame_size = 256 * Interpreter::stackElementSize; // conservative -+ } -+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); -+ __ mov(O4_scratch, G3_method_handle); -+ } - // State during recursive call: - // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | - __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); -diff -r b03c2687fb16 -r da4aa289ac10 src/cpu/x86/vm/methodHandles_x86.cpp ---- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Mon Sep 24 12:07:44 2012 -0700 -@@ -691,6 +691,14 @@ - if (VerifyMethodHandles) - verify_stack_move(_masm, arg_slots, -1); - -+ // We have to insert at least one word, so bang the stack. -+ if (UseStackBanging) { -+ int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); -+ if (frame_size <= 0) -+ frame_size = 256 * Interpreter::stackElementSize; // conservative -+ __ generate_stack_overflow_check(frame_size); -+ } -+ - // Make space on the stack for the inserted argument(s). - // Then pull down everything shallower than rax_argslot. - // The stacked return address gets pulled down with everything else. -@@ -1769,6 +1777,11 @@ - "copied argument(s) must fall within current frame"); - } - -+ if (UseStackBanging) { -+ // Bang the stack before pushing args. -+ int frame_size = 256 * Interpreter::stackElementSize; // conservative -+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); -+ } - // insert location is always the bottom of the argument list: - Address insert_location = __ argument_address(constant(0)); - int pre_arg_words = insert_location.disp() / wordSize; // return PC is pushed -@@ -2206,6 +2219,15 @@ - // The return handler will further cut back the stack when it takes - // down the RF. Perhaps there is a way to streamline this further. - -+ if (UseStackBanging) { -+ // Bang the stack before recursive call. -+ // Even if slots == 0, we are inside a RicochetFrame. -+ int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; -+ if (frame_size < 0) { -+ frame_size = 256 * Interpreter::stackElementSize; // conservative -+ } -+ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); -+ } - // State during recursive call: - // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | - __ jump_to_method_handle_entry(rcx_recv, rdx_temp); -@@ -2366,10 +2388,15 @@ - // case in a 32-bit version of the VM) we have to save 'rsi' - // on the stack because later on (at 'L_array_is_empty') 'rsi' - // will be overwritten. -- { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } -+ if (rsi_temp == saved_last_sp) { -+ __ push(saved_last_sp); -+ // Need to re-push return PC to keep it on stack top. -+ __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); -+ __ push(saved_last_sp); -+ } - // Also prepare a handy macro which restores 'rsi' if required. - #define UNPUSH_RSI \ -- { if (rsi_temp == saved_last_sp) __ pop(saved_last_sp); } -+ { if (rsi_temp == saved_last_sp) { __ pop(saved_last_sp); __ pop(saved_last_sp); } } - - __ jmp(L_array_is_empty); - __ bind(L_skip); -@@ -2382,7 +2409,12 @@ - // called in the case of a null pointer exception will not be - // confused by the extra value on the stack (it expects the - // return pointer on top of the stack) -- { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } -+ if (rsi_temp == saved_last_sp) { -+ __ push(saved_last_sp); -+ // Need to re-push return PC to keep it on stack top. -+ __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); -+ __ push(saved_last_sp); -+ } - - // Check the array type. - Register rbx_klass = rbx_temp; -diff -r b03c2687fb16 -r da4aa289ac10 src/share/vm/compiler/compilerOracle.cpp ---- hotspot/src/share/vm/compiler/compilerOracle.cpp Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/src/share/vm/compiler/compilerOracle.cpp Mon Sep 24 12:07:44 2012 -0700 -@@ -575,7 +575,7 @@ - char token[1024]; - int pos = 0; - int c = getc(stream); -- while(c != EOF) { -+ while(c != EOF && pos < (int)(sizeof(token)-1)) { - if (c == '\n') { - token[pos++] = '\0'; - parse_from_line(token); -@@ -596,7 +596,7 @@ - int pos = 0; - const char* sp = str; - int c = *sp++; -- while (c != '\0') { -+ while (c != '\0' && pos < (int)(sizeof(token)-1)) { - if (c == '\n') { - token[pos++] = '\0'; - parse_line(token); -diff -r b03c2687fb16 -r da4aa289ac10 src/share/vm/opto/loopTransform.cpp ---- hotspot/src/share/vm/opto/loopTransform.cpp Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/src/share/vm/opto/loopTransform.cpp Mon Sep 24 12:07:44 2012 -0700 -@@ -2733,6 +2733,8 @@ - result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); - _igvn.register_new_node_with_optimizer(result_mem); - -+/* Disable following optimization until proper fix (add missing checks). -+ - // If this fill is tightly coupled to an allocation and overwrites - // the whole body, allow it to take over the zeroing. - AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this); -@@ -2756,6 +2758,7 @@ - #endif - } - } -+*/ - - // Redirect the old control and memory edges that are outside the loop. - Node* exit = head->loopexit()->proj_out(0); -diff -r b03c2687fb16 -r da4aa289ac10 src/share/vm/runtime/arguments.cpp ---- hotspot/src/share/vm/runtime/arguments.cpp Tue Aug 07 12:09:51 2012 -0700 -+++ hotspot/src/share/vm/runtime/arguments.cpp Mon Sep 24 12:07:44 2012 -0700 -@@ -857,7 +857,7 @@ - bool result = true; - - int c = getc(stream); -- while(c != EOF) { -+ while(c != EOF && pos < (int)(sizeof(token)-1)) { - if (in_white_space) { - if (in_comment) { - if (c == '\n') in_comment = false; -diff -r 378f719cfb94 -r ab4bbb93b383 .hgtags ---- jaxp/.hgtags Tue Aug 07 12:10:13 2012 -0700 -+++ jaxp/.hgtags Thu Sep 20 14:22:51 2012 -0700 -@@ -197,3 +197,17 @@ - 7403701aa75848ca2a7b297909908b858134e132 jdk7u6-b21 - fcf35906d1d88583878cd2e2d7c63dfba4e9f679 jdk7u6-b22 - 8824bcbfd7cd8059ededf70f1e7f2b06f02cb33f jdk7u6-b23 -+378f719cfb9491b766cd9f7cd47ad7fa3503e141 jdk7u6-b24 -+5f1b80e8baec46fc28826a3a6ab8e1913c872f4c jdk7u6-b30 -+2eafa8a6fd8fdb54b10045e247d1a57f9817f473 jdk7u7-b10 -+c4aa15da8529451cc678d5747e7b82e9cc38627e jdk7u7-b30 -+f6e11679b12e1548f407b78a940c568401dd2a19 jdk7u7-b11 -+7840a267c777e22004912ad0aadd5258ac3d36c6 jdk7u7-b31 -+61fc72e9fe26b3acf1572866143c22719c088b62 jdk7u7-b01 -+78d9e4853388a2e7be18ff18c0b5330c074cb514 jdk7u7-b02 -+fc7c5aa8c722f28c59560ce83140e803d853afc9 jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+61fc72e9fe26b3acf1572866143c22719c088b62 jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+78d9e4853388a2e7be18ff18c0b5330c074cb514 jdk7u9-b02 -+b12a2d557c5e302b614c5f7e25ad6c8a0e138742 jdk7u9-b04 -diff -r b8b85e62d2c5 -r f3e42e044584 .hgtags ---- jaxws/.hgtags Tue Aug 07 12:10:23 2012 -0700 -+++ jaxws/.hgtags Thu Sep 20 14:22:56 2012 -0700 -@@ -197,3 +197,17 @@ - 55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u6-b21 - 0fec2efe2452aed9736da39add4c7f71be561838 jdk7u6-b22 - afb6d773328fa76cea65dc024a448cd931d111f2 jdk7u6-b23 -+b8b85e62d2c5347df8cf2e825e51e3de178508ea jdk7u6-b24 -+fb03d08f73e98f0dd67cb81632eb9b685de49b7e jdk7u6-b30 -+739ffa9dffad4cc2febe66ca1c2d86496e80741a jdk7u7-b10 -+e9a5a78329d0518efafd9f6f6149f359a7db4e2e jdk7u7-b30 -+ed6262e7bb0db4cd116c31f3c88cbd7c0288de40 jdk7u7-b11 -+538c248de3ef0fcb34c28295c1eab61269708137 jdk7u7-b31 -+dc2e6882056c2d400d4cf3c78d67da8e20fc37cc jdk7u7-b01 -+45cf55bc1732e8495425dceb385740c6852c0fc8 jdk7u7-b02 -+0289894a64a628133bb63f1dc48b45593f96a14d jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+dc2e6882056c2d400d4cf3c78d67da8e20fc37cc jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+45cf55bc1732e8495425dceb385740c6852c0fc8 jdk7u9-b02 -+66a2e01550a9e84e907a7f7b96e64ee90a4ec0e4 jdk7u9-b04 -diff -r 1c775da99873 -r ffad06d70095 .hgtags ---- jdk/.hgtags Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/.hgtags Sun Sep 23 23:43:31 2012 +0400 -@@ -197,3 +197,17 @@ - 243717d7fe9589148951ffb5551264af0e446314 jdk7u6-b21 - d78f2b600d393f45d6ace8ca0f29ad677624a775 jdk7u6-b22 - 0ae89e53f5300da1961984a7d81c220c7cf717d7 jdk7u6-b23 -+1c775da998735711853cfe1ae1d6baddc5f12a66 jdk7u6-b24 -+4bd0528374971157afd6372890f4250e1cf712d9 jdk7u6-b30 -+78e01a6ca8d30e8fc4eb297d297a098edfb3fec6 jdk7u7-b10 -+9666d4e4bbf3f80614e246d5c15df86154544013 jdk7u7-b30 -+94154c14973aee7c5ff4846af7bcb71fe7a82fa5 jdk7u7-b11 -+f93d2e3b2610b612401c95dd56d1a1122d35f676 jdk7u7-b31 -+94a7d51992ae6fd31f9adc15c4976d6354dca14d jdk7u7-b01 -+901c290c9c8b495a2696f10a87523363239d001b jdk7u7-b02 -+0e2200a8762c1fdbd1ea812ba3f6535245372c81 jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+94a7d51992ae6fd31f9adc15c4976d6354dca14d jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+901c290c9c8b495a2696f10a87523363239d001b jdk7u9-b02 -+7302c386ca9c6cd20c27d0a2adb0b142f679d6b3 jdk7u9-b04 -diff -r 1c775da99873 -r ffad06d70095 make/com/oracle/security/ucrypto/Makefile ---- jdk/make/com/oracle/security/ucrypto/Makefile Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/com/oracle/security/ucrypto/Makefile Sun Sep 23 23:43:31 2012 +0400 -@@ -198,9 +198,9 @@ - # - # Build ucrypto.jar. - # -- $(UNSIGNED_DIR)/ucrypto.jar: build -+ $(UNSIGNED_DIR)/ucrypto.jar: build $(JCE_MANIFEST_FILE) - $(prep-target) -- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ -+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ - $(BOOT_JAR_JFLAGS) - @$(java-vm-cleanup) - -diff -r 1c775da99873 -r ffad06d70095 make/common/Release.gmk ---- jdk/make/common/Release.gmk Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/common/Release.gmk Sun Sep 23 23:43:31 2012 +0400 -@@ -399,10 +399,29 @@ - sun/tools/jinfo \ - sun/tools/jmap - -+JFR_SRCDIRS_EXIST := $(shell \ -+ if [ -d $(CLOSED_SHARE_SRC)/classes/com/oracle/jrockit/jfr ] ; then \ -+ echo true; \ -+ else \ -+ echo false; \ -+ fi) -+ -+BUILD_JFR= -+ifndef OPENJDK -+ifndef JAVASE_EMBEDDED -+ifeq ($(JFR_SRCDIRS_EXIST), true) -+BUILD_JFR=true -+endif -+endif -+endif -+ - # classes that go into jfr.jar -+JFR_CLASSES_DIRS= -+ifdef BUILD_JFR - JFR_CLASSES_DIRS= \ - com/oracle/jrockit/jfr \ - oracle/jrockit/jfr -+endif - - # classes that go into jsse.jar - JSSE_CLASSES_DIRS = \ -@@ -606,8 +625,7 @@ - $(ECHO) "sun/tools/jstack/" >> $@ - $(ECHO) "sun/tools/jinfo/" >> $@ - $(ECHO) "sun/tools/jmap/" >> $@ --ifndef OPENJDK --ifndef JAVASE_EMBEDDED -+ifdef BUILD_JFR - $(ECHO) "com/oracle/jrockit/jfr/" >> $@ - $(ECHO) "com/oracle/jrockit/jfr/client/" >> $@ - $(ECHO) "com/oracle/jrockit/jfr/management/" >> $@ -@@ -618,7 +636,7 @@ - $(ECHO) "oracle/jrockit/jfr/settings/" >> $@ - $(ECHO) "oracle/jrockit/jfr/tools/" >> $@ - endif --endif -+ - - - # File order list for rt.jar -@@ -645,8 +663,7 @@ - - # Create jfr.jar - JFR_JAR= --ifndef OPENJDK --ifndef JAVASE_EMBEDDED -+ifdef BUILD_JFR - JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar - $(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE) - $(prep-target) -@@ -655,7 +672,6 @@ - $(JFR_CLASSES_DIRS) $(BOOT_JAR_JFLAGS) - @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) - endif --endif - - # Create the rt.jar file list & non-class files list - -diff -r 1c775da99873 -r ffad06d70095 make/java/java/FILES_java.gmk ---- jdk/make/java/java/FILES_java.gmk Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/java/java/FILES_java.gmk Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 1996, 2012, 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 -@@ -476,6 +476,7 @@ - sun/misc/MessageUtils.java \ - sun/misc/GC.java \ - sun/misc/Service.java \ -+ sun/misc/JavaAWTAccess.java \ - sun/misc/JavaLangAccess.java \ - sun/misc/JavaIOAccess.java \ - sun/misc/JavaIOFileDescriptorAccess.java \ -diff -r 1c775da99873 -r ffad06d70095 make/javax/crypto/Defs-jce.gmk ---- jdk/make/javax/crypto/Defs-jce.gmk Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/javax/crypto/Defs-jce.gmk Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2007, 2012, 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 -@@ -31,7 +31,7 @@ - JCE_MANIFEST_FILE = $(TEMPDIR)/manifest.mf - $(JCE_MANIFEST_FILE): $(MAINMANIFEST) - $(prep-target) -- $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ -+ $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \ - -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \ - $(MAINMANIFEST) >> $@ - $(ECHO) "Extension-Name: javax.crypto" >> $@ -diff -r 1c775da99873 -r ffad06d70095 make/sun/security/ec/Makefile ---- jdk/make/sun/security/ec/Makefile Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/sun/security/ec/Makefile Sun Sep 23 23:43:31 2012 +0400 -@@ -245,9 +245,9 @@ - # - # Build sunec.jar. - # --$(UNSIGNED_DIR)/sunec.jar: build -+$(UNSIGNED_DIR)/sunec.jar: build $(JCE_MANIFEST_FILE) - $(prep-target) -- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ -+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ - $(BOOT_JAR_JFLAGS) - @$(java-vm-cleanup) - -diff -r 1c775da99873 -r ffad06d70095 make/sun/security/mscapi/Makefile ---- jdk/make/sun/security/mscapi/Makefile Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/sun/security/mscapi/Makefile Sun Sep 23 23:43:31 2012 +0400 -@@ -210,9 +210,9 @@ - # - # Build sunmscapi.jar. - # --$(UNSIGNED_DIR)/sunmscapi.jar: build -+$(UNSIGNED_DIR)/sunmscapi.jar: build $(JCE_MANIFEST_FILE) - $(prep-target) -- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ -+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ - $(BOOT_JAR_JFLAGS) - @$(java-vm-cleanup) - -diff -r 1c775da99873 -r ffad06d70095 make/sun/security/pkcs11/Makefile ---- jdk/make/sun/security/pkcs11/Makefile Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/make/sun/security/pkcs11/Makefile Sun Sep 23 23:43:31 2012 +0400 -@@ -224,9 +224,9 @@ - # - # Build sunpkcs11.jar. - # --$(UNSIGNED_DIR)/sunpkcs11.jar: build -+$(UNSIGNED_DIR)/sunpkcs11.jar: build $(JCE_MANIFEST_FILE) - $(prep-target) -- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ -+ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ - $(BOOT_JAR_JFLAGS) - @$(java-vm-cleanup) - -diff -r 1c775da99873 -r ffad06d70095 src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java ---- jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -42,6 +42,7 @@ - import sun.awt.*; - import sun.lwawt.*; - import sun.lwawt.LWWindowPeer.PeerType; -+import sun.security.action.GetBooleanAction; - - - class NamedCursor extends Cursor { -@@ -90,14 +91,6 @@ - } - } - -- static String getSystemProperty(final String name, final String deflt) { -- return AccessController.doPrivileged (new PrivilegedAction<String>() { -- public String run() { -- return System.getProperty(name, deflt); -- } -- }); -- } -- - public LWCToolkit() { - SunToolkit.setDataTransfererClassName("sun.lwawt.macosx.CDataTransferer"); - -@@ -709,8 +702,8 @@ - */ - public synchronized static boolean getSunAwtDisableCALayers() { - if (sunAwtDisableCALayers == null) { -- sunAwtDisableCALayers = -- getBooleanSystemProperty("sun.awt.disableCALayers"); -+ sunAwtDisableCALayers = AccessController.doPrivileged( -+ new GetBooleanAction("sun.awt.disableCALayers")); - } - return sunAwtDisableCALayers.booleanValue(); - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/decoder/DocumentHandler.java ---- jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -37,6 +37,9 @@ - import java.util.HashMap; - import java.util.List; - import java.util.Map; -+import java.security.AccessControlContext; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - - import javax.xml.parsers.ParserConfigurationException; - import javax.xml.parsers.SAXParserFactory; -@@ -46,6 +49,8 @@ - import org.xml.sax.SAXException; - import org.xml.sax.helpers.DefaultHandler; - -+import sun.misc.SharedSecrets; -+ - /** - * The main class to parse JavaBeans XML archive. - * -@@ -56,11 +61,10 @@ - * @see ElementHandler - */ - public final class DocumentHandler extends DefaultHandler { -- private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<String, Class<? extends ElementHandler>>(); -- -- private final Map<String, Object> environment = new HashMap<String, Object>(); -- -- private final List<Object> objects = new ArrayList<Object>(); -+ private final AccessControlContext acc = AccessController.getContext(); -+ private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<>(); -+ private final Map<String, Object> environment = new HashMap<>(); -+ private final List<Object> objects = new ArrayList<>(); - - private Reference<ClassLoader> loader; - private ExceptionListener listener; -@@ -351,23 +355,32 @@ - * - * @param input the input source to parse - */ -- public void parse(InputSource input) { -- try { -- SAXParserFactory.newInstance().newSAXParser().parse(input, this); -+ public void parse(final InputSource input) { -+ if ((this.acc == null) && (null != System.getSecurityManager())) { -+ throw new SecurityException("AccessControlContext is not set"); - } -- catch (ParserConfigurationException exception) { -- handleException(exception); -- } -- catch (SAXException wrapper) { -- Exception exception = wrapper.getException(); -- if (exception == null) { -- exception = wrapper; -+ AccessControlContext stack = AccessController.getContext(); -+ SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction<Void>() { -+ public Void run() { -+ try { -+ SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this); -+ } -+ catch (ParserConfigurationException exception) { -+ handleException(exception); -+ } -+ catch (SAXException wrapper) { -+ Exception exception = wrapper.getException(); -+ if (exception == null) { -+ exception = wrapper; -+ } -+ handleException(exception); -+ } -+ catch (IOException exception) { -+ handleException(exception); -+ } -+ return null; - } -- handleException(exception); -- } -- catch (IOException exception) { -- handleException(exception); -- } -+ }, stack, this.acc); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/decoder/MethodElementHandler.java ---- jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -28,6 +28,8 @@ - - import java.lang.reflect.Method; - -+import sun.reflect.misc.MethodUtil; -+ - /** - * This class is intended to handle <method> element. - * It describes invocation of the method. -@@ -101,7 +103,7 @@ - if (method.isVarArgs()) { - args = getArguments(args, method.getParameterTypes()); - } -- Object value = method.invoke(bean, args); -+ Object value = MethodUtil.invoke(method, bean, args); - return method.getReturnType().equals(void.class) - ? ValueObjectImpl.VOID - : ValueObjectImpl.create(value); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java ---- jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, 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 -@@ -35,6 +35,8 @@ - import java.lang.reflect.InvocationTargetException; - import java.lang.reflect.Method; - -+import sun.reflect.misc.MethodUtil; -+ - /** - * This class is intended to handle <property> element. - * This element simplifies access to the properties. -@@ -168,11 +170,11 @@ - private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { - Class<?> type = bean.getClass(); - if (index == null) { -- return findGetter(type, name).invoke(bean); -+ return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {}); - } else if (type.isArray() && (name == null)) { - return Array.get(bean, index); - } else { -- return findGetter(type, name, int.class).invoke(bean, index); -+ return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index}); - } - } - -@@ -197,11 +199,11 @@ - : null; - - if (index == null) { -- findSetter(type, name, param).invoke(bean, value); -+ MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value}); - } else if (type.isArray() && (name == null)) { - Array.set(bean, index, value); - } else { -- findSetter(type, name, int.class, param).invoke(bean, index, value); -+ MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value}); - } - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/BooleanEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,76 @@ -+/* -+ * Copyright (c) 2006, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "boolean" type. -+ */ -+ -+import java.beans.*; -+ -+public class BooleanEditor extends PropertyEditorSupport { -+ -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ return (value != null) -+ ? value.toString() -+ : "null"; -+ } -+ -+ public String getAsText() { -+ Object value = getValue(); -+ return (value instanceof Boolean) -+ ? getValidName((Boolean) value) -+ : null; -+ } -+ -+ public void setAsText(String text) throws java.lang.IllegalArgumentException { -+ if (text == null) { -+ setValue(null); -+ } else if (isValidName(true, text)) { -+ setValue(Boolean.TRUE); -+ } else if (isValidName(false, text)) { -+ setValue(Boolean.FALSE); -+ } else { -+ throw new java.lang.IllegalArgumentException(text); -+ } -+ } -+ -+ public String[] getTags() { -+ return new String[] {getValidName(true), getValidName(false)}; -+ } -+ -+ // the following method should be localized (4890258) -+ -+ private String getValidName(boolean value) { -+ return value ? "True" : "False"; -+ } -+ -+ private boolean isValidName(boolean value, String name) { -+ return getValidName(value).equalsIgnoreCase(name); -+ } -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/ByteEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "byte" type. -+ * -+ */ -+ -+import java.beans.*; -+ -+public class ByteEditor extends NumberEditor { -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ return (value != null) -+ ? "((byte)" + value + ")" -+ : "null"; -+ } -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Byte.decode(text)); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/ColorEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,214 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+import java.awt.*; -+import java.beans.*; -+ -+public class ColorEditor extends Panel implements PropertyEditor { -+ private static final long serialVersionUID = 1781257185164716054L; -+ -+ public ColorEditor() { -+ setLayout(null); -+ -+ ourWidth = hPad; -+ -+ // Create a sample color block bordered in black -+ Panel p = new Panel(); -+ p.setLayout(null); -+ p.setBackground(Color.black); -+ sample = new Canvas(); -+ p.add(sample); -+ sample.reshape(2, 2, sampleWidth, sampleHeight); -+ add(p); -+ p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4); -+ ourWidth += sampleWidth + 4 + hPad; -+ -+ text = new TextField("", 14); -+ add(text); -+ text.reshape(ourWidth,0,100,30); -+ ourWidth += 100 + hPad; -+ -+ choser = new Choice(); -+ int active = 0; -+ for (int i = 0; i < colorNames.length; i++) { -+ choser.addItem(colorNames[i]); -+ } -+ add(choser); -+ choser.reshape(ourWidth,0,100,30); -+ ourWidth += 100 + hPad; -+ -+ resize(ourWidth,40); -+ } -+ -+ public void setValue(Object o) { -+ Color c = (Color)o; -+ changeColor(c); -+ } -+ -+ public Dimension preferredSize() { -+ return new Dimension(ourWidth, 40); -+ } -+ -+ public boolean keyUp(Event e, int key) { -+ if (e.target == text) { -+ try { -+ setAsText(text.getText()); -+ } catch (IllegalArgumentException ex) { -+ // Quietly ignore. -+ } -+ } -+ return (false); -+ } -+ -+ public void setAsText(String s) throws java.lang.IllegalArgumentException { -+ if (s == null) { -+ changeColor(null); -+ return; -+ } -+ int c1 = s.indexOf(','); -+ int c2 = s.indexOf(',', c1+1); -+ if (c1 < 0 || c2 < 0) { -+ // Invalid string. -+ throw new IllegalArgumentException(s); -+ } -+ try { -+ int r = Integer.parseInt(s.substring(0,c1)); -+ int g = Integer.parseInt(s.substring(c1+1, c2)); -+ int b = Integer.parseInt(s.substring(c2+1)); -+ Color c = new Color(r,g,b); -+ changeColor(c); -+ } catch (Exception ex) { -+ throw new IllegalArgumentException(s); -+ } -+ -+ } -+ -+ public boolean action(Event e, Object arg) { -+ if (e.target == choser) { -+ changeColor(colors[choser.getSelectedIndex()]); -+ } -+ return false; -+ } -+ -+ public String getJavaInitializationString() { -+ return (this.color != null) -+ ? "new java.awt.Color(" + this.color.getRGB() + ",true)" -+ : "null"; -+ } -+ -+ -+ private void changeColor(Color c) { -+ -+ if (c == null) { -+ this.color = null; -+ this.text.setText(""); -+ return; -+ } -+ -+ color = c; -+ -+ text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue()); -+ -+ int active = 0; -+ for (int i = 0; i < colorNames.length; i++) { -+ if (color.equals(colors[i])) { -+ active = i; -+ } -+ } -+ choser.select(active); -+ -+ sample.setBackground(color); -+ sample.repaint(); -+ -+ support.firePropertyChange("", null, null); -+ } -+ -+ public Object getValue() { -+ return color; -+ } -+ -+ public boolean isPaintable() { -+ return true; -+ } -+ -+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { -+ Color oldColor = gfx.getColor(); -+ gfx.setColor(Color.black); -+ gfx.drawRect(box.x, box.y, box.width-3, box.height-3); -+ gfx.setColor(color); -+ gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4); -+ gfx.setColor(oldColor); -+ } -+ -+ public String getAsText() { -+ return (this.color != null) -+ ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue() -+ : null; -+ } -+ -+ public String[] getTags() { -+ return null; -+ } -+ -+ public java.awt.Component getCustomEditor() { -+ return this; -+ } -+ -+ public boolean supportsCustomEditor() { -+ return true; -+ } -+ -+ public void addPropertyChangeListener(PropertyChangeListener l) { -+ support.addPropertyChangeListener(l); -+ } -+ -+ public void removePropertyChangeListener(PropertyChangeListener l) { -+ support.removePropertyChangeListener(l); -+ } -+ -+ -+ private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray", -+ "black", "red", "pink", "orange", -+ "yellow", "green", "magenta", "cyan", -+ "blue"}; -+ private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray, -+ Color.black, Color.red, Color.pink, Color.orange, -+ Color.yellow, Color.green, Color.magenta, Color.cyan, -+ Color.blue}; -+ -+ private Canvas sample; -+ private int sampleHeight = 20; -+ private int sampleWidth = 40; -+ private int hPad = 5; -+ private int ourWidth; -+ -+ private Color color; -+ private TextField text; -+ private Choice choser; -+ -+ private PropertyChangeSupport support = new PropertyChangeSupport(this); -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/DoubleEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "double" type. -+ * -+ */ -+ -+import java.beans.*; -+ -+public class DoubleEditor extends NumberEditor { -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Double.valueOf(text)); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/EnumEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,143 @@ -+/* -+ * Copyright (c) 2006, 2012, 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 com.sun.beans.editors; -+ -+import java.awt.Component; -+import java.awt.Graphics; -+import java.awt.Rectangle; -+import java.beans.PropertyChangeEvent; -+import java.beans.PropertyChangeListener; -+import java.beans.PropertyEditor; -+import java.util.ArrayList; -+import java.util.List; -+ -+/** -+ * Property editor for java.lang.Enum subclasses. -+ * -+ * @see PropertyEditor -+ * -+ * @since 1.7 -+ * -+ * @author Sergey A. Malenkov -+ */ -+public class EnumEditor implements PropertyEditor { -+ private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); -+ -+ private final Class type; -+ private final String[] tags; -+ -+ private Object value; -+ -+ public EnumEditor( Class type ) { -+ Object[] values = type.getEnumConstants(); -+ if ( values == null ) { -+ throw new IllegalArgumentException( "Unsupported " + type ); -+ } -+ this.type = type; -+ this.tags = new String[values.length]; -+ for ( int i = 0; i < values.length; i++ ) { -+ this.tags[i] = ( ( Enum )values[i] ).name(); -+ } -+ } -+ -+ public Object getValue() { -+ return this.value; -+ } -+ -+ public void setValue( Object value ) { -+ if ( ( value != null ) && !this.type.isInstance( value ) ) { -+ throw new IllegalArgumentException( "Unsupported value: " + value ); -+ } -+ Object oldValue; -+ PropertyChangeListener[] listeners; -+ synchronized ( this.listeners ) { -+ oldValue = this.value; -+ this.value = value; -+ -+ if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) { -+ return; // do not fire event if value is not changed -+ } -+ int size = this.listeners.size(); -+ if ( size == 0 ) { -+ return; // do not fire event if there are no any listener -+ } -+ listeners = this.listeners.toArray( new PropertyChangeListener[size] ); -+ } -+ PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value ); -+ for ( PropertyChangeListener listener : listeners ) { -+ listener.propertyChange( event ); -+ } -+ } -+ -+ public String getAsText() { -+ return ( this.value != null ) -+ ? ( ( Enum )this.value ).name() -+ : null; -+ } -+ -+ public void setAsText( String text ) { -+ setValue( ( text != null ) -+ ? Enum.valueOf( this.type, text ) -+ : null ); -+ } -+ -+ public String[] getTags() { -+ return this.tags.clone(); -+ } -+ -+ public String getJavaInitializationString() { -+ String name = getAsText(); -+ return ( name != null ) -+ ? this.type.getName() + '.' + name -+ : "null"; -+ } -+ -+ public boolean isPaintable() { -+ return false; -+ } -+ -+ public void paintValue( Graphics gfx, Rectangle box ) { -+ } -+ -+ public boolean supportsCustomEditor() { -+ return false; -+ } -+ -+ public Component getCustomEditor() { -+ return null; -+ } -+ -+ public void addPropertyChangeListener( PropertyChangeListener listener ) { -+ synchronized ( this.listeners ) { -+ this.listeners.add( listener ); -+ } -+ } -+ -+ public void removePropertyChangeListener( PropertyChangeListener listener ) { -+ synchronized ( this.listeners ) { -+ this.listeners.remove( listener ); -+ } -+ } -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/FloatEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "float" type. -+ * -+ */ -+ -+import java.beans.*; -+ -+public class FloatEditor extends NumberEditor { -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ return (value != null) -+ ? value + "F" -+ : "null"; -+ } -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Float.valueOf(text)); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/FontEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/FontEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,219 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+import java.awt.*; -+import java.beans.*; -+ -+public class FontEditor extends Panel implements java.beans.PropertyEditor { -+ private static final long serialVersionUID = 6732704486002715933L; -+ -+ public FontEditor() { -+ setLayout(null); -+ -+ toolkit = Toolkit.getDefaultToolkit(); -+ fonts = toolkit.getFontList(); -+ -+ familyChoser = new Choice(); -+ for (int i = 0; i < fonts.length; i++) { -+ familyChoser.addItem(fonts[i]); -+ } -+ add(familyChoser); -+ familyChoser.reshape(20, 5, 100, 30); -+ -+ styleChoser = new Choice(); -+ for (int i = 0; i < styleNames.length; i++) { -+ styleChoser.addItem(styleNames[i]); -+ } -+ add(styleChoser); -+ styleChoser.reshape(145, 5, 70, 30); -+ -+ sizeChoser = new Choice(); -+ for (int i = 0; i < pointSizes.length; i++) { -+ sizeChoser.addItem("" + pointSizes[i]); -+ } -+ add(sizeChoser); -+ sizeChoser.reshape(220, 5, 70, 30); -+ -+ resize(300,40); -+ } -+ -+ -+ public Dimension preferredSize() { -+ return new Dimension(300, 40); -+ } -+ -+ public void setValue(Object o) { -+ font = (Font) o; -+ if (this.font == null) -+ return; -+ -+ changeFont(font); -+ // Update the current GUI choices. -+ for (int i = 0; i < fonts.length; i++) { -+ if (fonts[i].equals(font.getFamily())) { -+ familyChoser.select(i); -+ break; -+ } -+ } -+ for (int i = 0; i < styleNames.length; i++) { -+ if (font.getStyle() == styles[i]) { -+ styleChoser.select(i); -+ break; -+ } -+ } -+ for (int i = 0; i < pointSizes.length; i++) { -+ if (font.getSize() <= pointSizes[i]) { -+ sizeChoser.select(i); -+ break; -+ } -+ } -+ } -+ -+ private void changeFont(Font f) { -+ font = f; -+ if (sample != null) { -+ remove(sample); -+ } -+ sample = new Label(sampleText); -+ sample.setFont(font); -+ add(sample); -+ Component p = getParent(); -+ if (p != null) { -+ p.invalidate(); -+ p.layout(); -+ } -+ invalidate(); -+ layout(); -+ repaint(); -+ support.firePropertyChange("", null, null); -+ } -+ -+ public Object getValue() { -+ return (font); -+ } -+ -+ public String getJavaInitializationString() { -+ if (this.font == null) -+ return "null"; -+ -+ return "new java.awt.Font(\"" + font.getName() + "\", " + -+ font.getStyle() + ", " + font.getSize() + ")"; -+ } -+ -+ public boolean action(Event e, Object arg) { -+ String family = familyChoser.getSelectedItem(); -+ int style = styles[styleChoser.getSelectedIndex()]; -+ int size = pointSizes[sizeChoser.getSelectedIndex()]; -+ try { -+ Font f = new Font(family, style, size); -+ changeFont(f); -+ } catch (Exception ex) { -+ System.err.println("Couldn't create font " + family + "-" + -+ styleNames[style] + "-" + size); -+ } -+ return (false); -+ } -+ -+ -+ public boolean isPaintable() { -+ return true; -+ } -+ -+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { -+ // Silent noop. -+ Font oldFont = gfx.getFont(); -+ gfx.setFont(font); -+ FontMetrics fm = gfx.getFontMetrics(); -+ int vpad = (box.height - fm.getAscent())/2; -+ gfx.drawString(sampleText, 0, box.height-vpad); -+ gfx.setFont(oldFont); -+ } -+ -+ public String getAsText() { -+ if (this.font == null) { -+ return null; -+ } -+ StringBuilder sb = new StringBuilder(); -+ sb.append(this.font.getName()); -+ sb.append(' '); -+ -+ boolean b = this.font.isBold(); -+ if (b) { -+ sb.append("BOLD"); -+ } -+ boolean i = this.font.isItalic(); -+ if (i) { -+ sb.append("ITALIC"); -+ } -+ if (b || i) { -+ sb.append(' '); -+ } -+ sb.append(this.font.getSize()); -+ return sb.toString(); -+ } -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Font.decode(text)); -+ } -+ -+ public String[] getTags() { -+ return null; -+ } -+ -+ public java.awt.Component getCustomEditor() { -+ return this; -+ } -+ -+ public boolean supportsCustomEditor() { -+ return true; -+ } -+ -+ public void addPropertyChangeListener(PropertyChangeListener l) { -+ support.addPropertyChangeListener(l); -+ } -+ -+ public void removePropertyChangeListener(PropertyChangeListener l) { -+ support.removePropertyChangeListener(l); -+ } -+ -+ private Font font; -+ private Toolkit toolkit; -+ private String sampleText = "Abcde..."; -+ -+ private Label sample; -+ private Choice familyChoser; -+ private Choice styleChoser; -+ private Choice sizeChoser; -+ -+ private String fonts[]; -+ private String[] styleNames = { "plain", "bold", "italic" }; -+ private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC }; -+ private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 }; -+ -+ private PropertyChangeSupport support = new PropertyChangeSupport(this); -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/IntegerEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,42 @@ -+/* -+ * Copyright (c) 2006, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "int" type. -+ * -+ */ -+ -+import java.beans.*; -+ -+public class IntegerEditor extends NumberEditor { -+ -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Integer.decode(text)); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/LongEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/LongEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "long" type. -+ * -+ */ -+ -+import java.beans.*; -+ -+public class LongEditor extends NumberEditor { -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ return (value != null) -+ ? value + "L" -+ : "null"; -+ } -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Long.decode(text)); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/NumberEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,44 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Abstract Property editor for a java builtin number types. -+ * -+ */ -+ -+import java.beans.*; -+ -+abstract public class NumberEditor extends PropertyEditorSupport { -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ return (value != null) -+ ? value.toString() -+ : "null"; -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/ShortEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+/** -+ * Property editor for a java builtin "short" type. -+ * -+ */ -+ -+import java.beans.*; -+ -+public class ShortEditor extends NumberEditor { -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ return (value != null) -+ ? "((short)" + value + ")" -+ : "null"; -+ } -+ -+ public void setAsText(String text) throws IllegalArgumentException { -+ setValue((text == null) ? null : Short.decode(text)); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/editors/StringEditor.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/editors/StringEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,74 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; -+ -+import java.beans.*; -+ -+public class StringEditor extends PropertyEditorSupport { -+ -+ public String getJavaInitializationString() { -+ Object value = getValue(); -+ if (value == null) -+ return "null"; -+ -+ String str = value.toString(); -+ int length = str.length(); -+ StringBuilder sb = new StringBuilder(length + 2); -+ sb.append('"'); -+ for (int i = 0; i < length; i++) { -+ char ch = str.charAt(i); -+ switch (ch) { -+ case '\b': sb.append("\\b"); break; -+ case '\t': sb.append("\\t"); break; -+ case '\n': sb.append("\\n"); break; -+ case '\f': sb.append("\\f"); break; -+ case '\r': sb.append("\\r"); break; -+ case '\"': sb.append("\\\""); break; -+ case '\\': sb.append("\\\\"); break; -+ default: -+ if ((ch < ' ') || (ch > '~')) { -+ sb.append("\\u"); -+ String hex = Integer.toHexString((int) ch); -+ for (int len = hex.length(); len < 4; len++) { -+ sb.append('0'); -+ } -+ sb.append(hex); -+ } else { -+ sb.append(ch); -+ } -+ break; -+ } -+ } -+ sb.append('"'); -+ return sb.toString(); -+ } -+ -+ public void setAsText(String text) { -+ setValue(text); -+ } -+ -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/finder/BeanInfoFinder.java ---- jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -42,6 +42,7 @@ - extends InstanceFinder<BeanInfo> { - - private static final String DEFAULT = "sun.beans.infos"; -+ private static final String DEFAULT_NEW = "com.sun.beans.infos"; - - public BeanInfoFinder() { - super(BeanInfo.class, true, "BeanInfo", DEFAULT); -@@ -53,10 +54,13 @@ - - @Override - protected BeanInfo instantiate(Class<?> type, String prefix, String name) { -+ if (DEFAULT.equals(prefix)) { -+ prefix = DEFAULT_NEW; -+ } - // this optimization will only use the BeanInfo search path - // if is has changed from the original - // or trying to get the ComponentBeanInfo -- BeanInfo info = !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name) -+ BeanInfo info = !DEFAULT_NEW.equals(prefix) || "ComponentBeanInfo".equals(name) - ? super.instantiate(type, prefix, name) - : null; - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/finder/ClassFinder.java ---- jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2006, 2012, 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 -@@ -24,6 +24,8 @@ - */ - package com.sun.beans.finder; - -+import static sun.reflect.misc.ReflectUtil.checkPackageAccess; -+ - /** - * This is utility class that provides {@code static} methods - * to find a class with the specified name using the specified class loader. -@@ -54,6 +56,7 @@ - * @see Thread#getContextClassLoader() - */ - public static Class<?> findClass(String name) throws ClassNotFoundException { -+ checkPackageAccess(name); - try { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) { -@@ -94,6 +97,7 @@ - * @see Class#forName(String,boolean,ClassLoader) - */ - public static Class<?> findClass(String name, ClassLoader loader) throws ClassNotFoundException { -+ checkPackageAccess(name); - if (loader != null) { - try { - return Class.forName(name, false, loader); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/finder/ConstructorFinder.java ---- jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -29,6 +29,8 @@ - import java.lang.reflect.Constructor; - import java.lang.reflect.Modifier; - -+import static sun.reflect.misc.ReflectUtil.isPackageAccessible; -+ - /** - * This utility class provides {@code static} methods - * to find a public constructor with specified parameter types -@@ -61,7 +63,7 @@ - if (Modifier.isAbstract(type.getModifiers())) { - throw new NoSuchMethodException("Abstract class cannot be instantiated"); - } -- if (!Modifier.isPublic(type.getModifiers())) { -+ if (!Modifier.isPublic(type.getModifiers()) || !isPackageAccessible(type)) { - throw new NoSuchMethodException("Class is not accessible"); - } - PrimitiveWrapperMap.replacePrimitivesWithWrappers(args); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/finder/FieldFinder.java ---- jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -27,6 +27,8 @@ - import java.lang.reflect.Field; - import java.lang.reflect.Modifier; - -+import static sun.reflect.misc.ReflectUtil.isPackageAccessible; -+ - /** - * This utility class provides {@code static} methods - * to find a public field with specified name -@@ -56,7 +58,8 @@ - if (!Modifier.isPublic(field.getModifiers())) { - throw new NoSuchFieldException("Field '" + name + "' is not public"); - } -- if (!Modifier.isPublic(field.getDeclaringClass().getModifiers())) { -+ type = field.getDeclaringClass(); -+ if (!Modifier.isPublic(type.getModifiers()) || !isPackageAccessible(type)) { - throw new NoSuchFieldException("Field '" + name + "' is not accessible"); - } - return field; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/finder/MethodFinder.java ---- jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -33,6 +33,8 @@ - import java.lang.reflect.Type; - import java.util.Arrays; - -+import static sun.reflect.misc.ReflectUtil.isPackageAccessible; -+ - /** - * This utility class provides {@code static} methods - * to find a public method with specified name and parameter types -@@ -120,7 +122,7 @@ - */ - public static Method findAccessibleMethod(Method method) throws NoSuchMethodException { - Class<?> type = method.getDeclaringClass(); -- if (Modifier.isPublic(type.getModifiers())) { -+ if (Modifier.isPublic(type.getModifiers()) && isPackageAccessible(type)) { - return method; - } - if (Modifier.isStatic(method.getModifiers())) { -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java ---- jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -28,14 +28,14 @@ - - import java.beans.PropertyEditor; - --import sun.beans.editors.BooleanEditor; --import sun.beans.editors.ByteEditor; --import sun.beans.editors.DoubleEditor; --import sun.beans.editors.EnumEditor; --import sun.beans.editors.FloatEditor; --import sun.beans.editors.IntegerEditor; --import sun.beans.editors.LongEditor; --import sun.beans.editors.ShortEditor; -+import com.sun.beans.editors.BooleanEditor; -+import com.sun.beans.editors.ByteEditor; -+import com.sun.beans.editors.DoubleEditor; -+import com.sun.beans.editors.EnumEditor; -+import com.sun.beans.editors.FloatEditor; -+import com.sun.beans.editors.IntegerEditor; -+import com.sun.beans.editors.LongEditor; -+import com.sun.beans.editors.ShortEditor; - - /** - * This is utility class that provides functionality -@@ -48,10 +48,13 @@ - public final class PropertyEditorFinder - extends InstanceFinder<PropertyEditor> { - -+ private static final String DEFAULT = "sun.beans.editors"; -+ private static final String DEFAULT_NEW = "com.sun.beans.editors"; -+ - private final WeakCache<Class<?>, Class<?>> registry; - - public PropertyEditorFinder() { -- super(PropertyEditor.class, false, "Editor", "sun.beans.editors"); -+ super(PropertyEditor.class, false, "Editor", DEFAULT); - - this.registry = new WeakCache<Class<?>, Class<?>>(); - this.registry.put(Byte.TYPE, ByteEditor.class); -@@ -84,4 +87,9 @@ - } - return editor; - } -+ -+ @Override -+ protected PropertyEditor instantiate(Class<?> type, String prefix, String name) { -+ return super.instantiate(type, DEFAULT.equals(prefix) ? DEFAULT_NEW : prefix, name); -+ } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,62 @@ -+/* -+ * Copyright (c) 1996, 2012, 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 com.sun.beans.infos; -+ -+import java.beans.*; -+ -+/** -+ * BeanInfo descriptor for a standard AWT component. -+ */ -+ -+public class ComponentBeanInfo extends SimpleBeanInfo { -+ private static final Class beanClass = java.awt.Component.class; -+ -+ public PropertyDescriptor[] getPropertyDescriptors() { -+ try { -+ PropertyDescriptor -+ name = new PropertyDescriptor("name", beanClass), -+ background = new PropertyDescriptor("background", beanClass), -+ foreground = new PropertyDescriptor("foreground", beanClass), -+ font = new PropertyDescriptor("font", beanClass), -+ enabled = new PropertyDescriptor("enabled", beanClass), -+ visible = new PropertyDescriptor("visible", beanClass), -+ focusable = new PropertyDescriptor("focusable", beanClass); -+ -+ enabled.setExpert(true); -+ visible.setHidden(true); -+ -+ background.setBound(true); -+ foreground.setBound(true); -+ font.setBound(true); -+ focusable.setBound(true); -+ -+ PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable }; -+ return rv; -+ } catch (IntrospectionException e) { -+ throw new Error(e.toString()); -+ } -+ } -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java ---- jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -68,9 +68,9 @@ - this.notifBuffer = notifBuffer; - this.connectionId = connectionId; - connectionTimeout = EnvHelp.getServerConnectionTimeout(env); -- checkNotificationEmission = EnvHelp.computeBooleanFromString( -- env, -- "jmx.remote.x.check.notification.emission",false); -+ -+ String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission"); -+ checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean ); - notificationAccessController = - EnvHelp.getNotificationAccessController(env); - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/jmx/remote/util/EnvHelp.java ---- jdk/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Sun Sep 23 23:43:31 2012 +0400 -@@ -665,97 +665,57 @@ - * Computes a boolean value from a string value retrieved from a - * property in the given map. - * -- * @param env the environment map. -- * @param prop the name of the property in the environment map whose -- * returned string value must be converted into a boolean value. -- * @param systemProperty if true, consult a system property of the -- * same name if there is no entry in the environment map. -+ * @param stringBoolean the string value that must be converted -+ * into a boolean value. - * - * @return - * <ul> -- * <li>{@code false} if {@code env.get(prop)} is {@code null}</li> -+ * <li>{@code false} if {@code stringBoolean} is {@code null}</li> - * <li>{@code false} if -- * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} -+ * {@code stringBoolean.equalsIgnoreCase("false")} - * is {@code true}</li> - * <li>{@code true} if -- * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} -+ * {@code stringBoolean.equalsIgnoreCase("true")} - * is {@code true}</li> - * </ul> - * -- * @throws IllegalArgumentException if {@code env} is {@code null} or -- * {@code env.get(prop)} is not {@code null} and -+ * @throws IllegalArgumentException if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are - * {@code false}. -- * @throws ClassCastException if {@code env.get(prop)} cannot be cast -- * to {@code String}. - */ -- public static boolean computeBooleanFromString( -- Map<String, ?> env, String prop, boolean systemProperty) { -- -- if (env == null) -- throw new IllegalArgumentException("env map cannot be null"); -- -+ public static boolean computeBooleanFromString(String stringBoolean) { - // returns a default value of 'false' if no property is found... -- return computeBooleanFromString(env,prop,systemProperty,false); -+ return computeBooleanFromString(stringBoolean,false); - } - - /** - * Computes a boolean value from a string value retrieved from a - * property in the given map. - * -- * @param env the environment map. -- * @param prop the name of the property in the environment map whose -- * returned string value must be converted into a boolean value. -- * @param systemProperty if true, consult a system property of the -- * same name if there is no entry in the environment map. -+ * @param stringBoolean the string value that must be converted -+ * into a boolean value. - * @param defaultValue a default value to return in case no property - * was defined. - * - * @return - * <ul> -- * <li>{@code defaultValue} if {@code env.get(prop)} is {@code null} -- * and {@code systemProperty} is {@code false}</li> -- * <li>{@code defaultValue} if {@code env.get(prop)} is {@code null} -- * and {@code systemProperty} is {@code true} and -- * {@code System.getProperty(prop)} is {@code null}</li> -- * <li>{@code false} if {@code env.get(prop)} is {@code null} -- * and {@code systemProperty} is {@code true} and -- * {@code System.getProperty(prop).equalsIgnoreCase("false")} -- * is {@code true}</li> -- * <li>{@code true} if {@code env.get(prop)} is {@code null} -- * and {@code systemProperty} is {@code true} and -- * {@code System.getProperty(prop).equalsIgnoreCase("true")} -- * is {@code true}</li> -+ * <li>{@code defaultValue} if {@code stringBoolean} -+ * is {@code null}</li> - * <li>{@code false} if -- * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} -+ * {@code stringBoolean.equalsIgnoreCase("false")} - * is {@code true}</li> - * <li>{@code true} if -- * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} -+ * {@code stringBoolean.equalsIgnoreCase("true")} - * is {@code true}</li> - * </ul> - * -- * @throws IllegalArgumentException if {@code env} is {@code null} or -- * {@code env.get(prop)} is not {@code null} and -+ * @throws IllegalArgumentException if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are - * {@code false}. -- * @throws ClassCastException if {@code env.get(prop)} cannot be cast -- * to {@code String}. - */ -- public static boolean computeBooleanFromString( -- Map<String, ?> env, String prop, -- boolean systemProperty, boolean defaultValue) { -- -- if (env == null) -- throw new IllegalArgumentException("env map cannot be null"); -- -- String stringBoolean = (String) env.get(prop); -- if (stringBoolean == null && systemProperty) { -- stringBoolean = -- AccessController.doPrivileged(new GetPropertyAction(prop)); -- } -- -+ public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) { - if (stringBoolean == null) - return defaultValue; - else if (stringBoolean.equalsIgnoreCase("true")) -@@ -763,8 +723,8 @@ - else if (stringBoolean.equalsIgnoreCase("false")) - return false; - else -- throw new IllegalArgumentException(prop + -- " must be \"true\" or \"false\" instead of \"" + -+ throw new IllegalArgumentException( -+ "Property value must be \"true\" or \"false\" instead of \"" + - stringBoolean + "\""); - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/org/apache/xml/internal/security/Init.java ---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java Sun Sep 23 23:43:31 2012 +0400 -@@ -154,7 +154,7 @@ - } - } - for (Node el=config.getFirstChild();el!=null;el=el.getNextSibling()) { -- if (!(el instanceof Element)) { -+ if (el.getNodeType() != Node.ELEMENT_NODE) { - continue; - } - String tag=el.getLocalName(); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java ---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java Sun Sep 23 23:43:31 2012 +0400 -@@ -202,7 +202,7 @@ - try { - NameSpaceSymbTable ns=new NameSpaceSymbTable(); - int nodeLevel=NODE_BEFORE_DOCUMENT_ELEMENT; -- if (rootNode instanceof Element) { -+ if (rootNode != null && rootNode.getNodeType() == Node.ELEMENT_NODE) { - //Fills the nssymbtable with the definitions of the parent of the root subnode - getParentNameSpaces((Element)rootNode,ns); - nodeLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; -@@ -332,7 +332,7 @@ - return; - sibling=parentNode.getNextSibling(); - parentNode=parentNode.getParentNode(); -- if (!(parentNode instanceof Element)) { -+ if (parentNode !=null && parentNode.getNodeType() != Node.ELEMENT_NODE) { - documentLevel=NODE_AFTER_DOCUMENT_ELEMENT; - parentNode=null; - } -@@ -388,7 +388,7 @@ - return; - boolean currentNodeIsVisible = false; - NameSpaceSymbTable ns=new NameSpaceSymbTable(); -- if (currentNode instanceof Element) -+ if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE) - getParentNameSpaces((Element)currentNode,ns); - Node sibling=null; - Node parentNode=null; -@@ -509,7 +509,7 @@ - return; - sibling=parentNode.getNextSibling(); - parentNode=parentNode.getParentNode(); -- if (!(parentNode instanceof Element)) { -+ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) { - parentNode=null; - documentLevel=NODE_AFTER_DOCUMENT_ELEMENT; - } -@@ -591,18 +591,14 @@ - final void getParentNameSpaces(Element el,NameSpaceSymbTable ns) { - List parents=new ArrayList(10); - Node n1=el.getParentNode(); -- if (!(n1 instanceof Element)) { -+ if (n1 == null || n1.getNodeType() != Node.ELEMENT_NODE) { - return; - } - //Obtain all the parents of the elemnt -- Element parent=(Element) n1; -- while (parent!=null) { -- parents.add(parent); -- Node n=parent.getParentNode(); -- if (!(n instanceof Element )) { -- break; -- } -- parent=(Element)n; -+ Node parent = n1; -+ while (parent!=null && parent.getNodeType() == Node.ELEMENT_NODE) { -+ parents.add((Element)parent); -+ parent = parent.getParentNode(); - } - //Visit them in reverse order. - ListIterator it=parents.listIterator(parents.size()); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java ---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1445,7 +1445,7 @@ - // The de-serialiser returns a fragment whose children we need to - // take on. - -- if (sourceParent instanceof Document) { -+ if (sourceParent != null && sourceParent.getNodeType() == Node.DOCUMENT_NODE) { - - // If this is a content decryption, this may have problems - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java ---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java Sun Sep 23 23:43:31 2012 +0400 -@@ -283,7 +283,7 @@ - Element e=null; - while (it.hasNext()) { - Node currentNode=(Node)it.next(); -- if (currentNode instanceof Element) { -+ if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE) { - e=(Element)currentNode; - break; - } -@@ -292,14 +292,14 @@ - List parents=new ArrayList(10); - - //Obtain all the parents of the elemnt -- do { -+ while (e != null) { - parents.add(e); - Node n=e.getParentNode(); -- if (!(n instanceof Element )) { -+ if (n == null || n.getNodeType() != Node.ELEMENT_NODE) { - break; - } - e=(Element)n; -- } while (e!=null); -+ } - //Visit them in reverse order. - ListIterator it2=parents.listIterator(parents.size()-1); - Element ele=null; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java ---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java Sun Sep 23 23:43:31 2012 +0400 -@@ -223,7 +223,7 @@ - } while (sibling==null && parentNode!=null) { - sibling=parentNode.getNextSibling(); - parentNode=parentNode.getParentNode(); -- if (!(parentNode instanceof Element)) { -+ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) { - parentNode=null; - } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java ---- jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Sun Sep 23 23:43:31 2012 +0400 -@@ -146,7 +146,11 @@ - */ - public RhinoScriptEngine() { - if (System.getSecurityManager() != null) { -- accCtxt = AccessController.getContext(); -+ try { -+ AccessController.checkPermission(new AllPermission()); -+ } catch (AccessControlException ace) { -+ accCtxt = AccessController.getContext(); -+ } - } - - Context cx = enterContext(); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/AWTEvent.java ---- jdk/src/share/classes/java/awt/AWTEvent.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/AWTEvent.java Sun Sep 23 23:43:31 2012 +0400 -@@ -35,8 +35,6 @@ - - import java.security.AccessControlContext; - import java.security.AccessController; --import java.io.ObjectInputStream; --import java.io.IOException; - - /** - * The root event class for all AWT events. -@@ -262,9 +260,11 @@ - public void setPosted(AWTEvent ev) { - ev.isPosted = true; - } -+ - public void setSystemGenerated(AWTEvent ev) { - ev.isSystemGenerated = true; - } -+ - public boolean isSystemGenerated(AWTEvent ev) { - return ev.isSystemGenerated; - } -@@ -272,6 +272,15 @@ - public AccessControlContext getAccessControlContext(AWTEvent ev) { - return ev.getAccessControlContext(); - } -+ -+ public byte[] getBData(AWTEvent ev) { -+ return ev.bdata; -+ } -+ -+ public void setBData(AWTEvent ev, byte[] bdata) { -+ ev.bdata = bdata; -+ } -+ - }); - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/CheckboxMenuItem.java ---- jdk/src/share/classes/java/awt/CheckboxMenuItem.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/CheckboxMenuItem.java Sun Sep 23 23:43:31 2012 +0400 -@@ -31,6 +31,7 @@ - import java.io.ObjectInputStream; - import java.io.IOException; - import javax.accessibility.*; -+import sun.awt.AWTAccessor; - - - /** -@@ -68,6 +69,13 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ -+ AWTAccessor.setCheckboxMenuItemAccessor( -+ new AWTAccessor.CheckboxMenuItemAccessor() { -+ public boolean getState(CheckboxMenuItem cmi) { -+ return cmi.state; -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/Cursor.java ---- jdk/src/share/classes/java/awt/Cursor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/Cursor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -24,10 +24,6 @@ - */ - package java.awt; - --import java.awt.AWTException; --import java.awt.Point; --import java.awt.Toolkit; -- - import java.io.File; - import java.io.FileInputStream; - -@@ -39,6 +35,7 @@ - import java.security.AccessController; - - import sun.util.logging.PlatformLogger; -+import sun.awt.AWTAccessor; - - /** - * A class to encapsulate the bitmap representation of the mouse cursor. -@@ -199,6 +196,21 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ -+ AWTAccessor.setCursorAccessor( -+ new AWTAccessor.CursorAccessor() { -+ public long getPData(Cursor cursor) { -+ return cursor.pData; -+ } -+ -+ public void setPData(Cursor cursor, long pData) { -+ cursor.pData = pData; -+ } -+ -+ public int getType(Cursor cursor) { -+ return cursor.type; -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/DefaultKeyboardFocusManager.java ---- jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Sun Sep 23 23:43:31 2012 +0400 -@@ -39,6 +39,7 @@ - - import sun.awt.AppContext; - import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - import sun.awt.CausedFocusEvent; - - /** -@@ -75,6 +76,15 @@ - typeAheadMarkers = new LinkedList(); - private boolean consumeNextKeyTyped; - -+ static { -+ AWTAccessor.setDefaultKeyboardFocusManagerAccessor( -+ new AWTAccessor.DefaultKeyboardFocusManagerAccessor() { -+ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e) { -+ dkfm.consumeNextKeyTyped(e); -+ } -+ }); -+ } -+ - private static class TypeAheadMarker { - long after; - Component untilFocused; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/EventQueue.java ---- jdk/src/share/classes/java/awt/EventQueue.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/EventQueue.java Sun Sep 23 23:43:31 2012 +0400 -@@ -52,7 +52,6 @@ - import java.util.concurrent.atomic.AtomicInteger; - - import java.security.AccessControlContext; --import java.security.ProtectionDomain; - - import sun.misc.SharedSecrets; - import sun.misc.JavaSecurityAccess; -@@ -188,6 +187,17 @@ - public boolean isDispatchThreadImpl(EventQueue eventQueue) { - return eventQueue.isDispatchThreadImpl(); - } -+ public void removeSourceEvents(EventQueue eventQueue, -+ Object source, -+ boolean removeAllEvents) { -+ eventQueue.removeSourceEvents(source, removeAllEvents); -+ } -+ public boolean noEvents(EventQueue eventQueue) { -+ return eventQueue.noEvents(); -+ } -+ public void wakeup(EventQueue eventQueue, boolean isShutdown) { -+ eventQueue.wakeup(isShutdown); -+ } - }); - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/KeyboardFocusManager.java ---- jdk/src/share/classes/java/awt/KeyboardFocusManager.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/KeyboardFocusManager.java Sun Sep 23 23:43:31 2012 +0400 -@@ -56,7 +56,6 @@ - import sun.util.logging.PlatformLogger; - - import sun.awt.AppContext; --import sun.awt.HeadlessToolkit; - import sun.awt.SunToolkit; - import sun.awt.CausedFocusEvent; - import sun.awt.KeyboardFocusManagerPeerProvider; -@@ -148,6 +147,9 @@ - public KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx) { - return KeyboardFocusManager.getCurrentKeyboardFocusManager(ctx); - } -+ public Container getCurrentFocusCycleRoot() { -+ return KeyboardFocusManager.currentFocusCycleRoot; -+ } - } - ); - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/Menu.java ---- jdk/src/share/classes/java/awt/Menu.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/Menu.java Sun Sep 23 23:43:31 2012 +0400 -@@ -31,6 +31,7 @@ - import java.awt.peer.MenuPeer; - import java.awt.event.KeyEvent; - import javax.accessibility.*; -+import sun.awt.AWTAccessor; - - /** - * A <code>Menu</code> object is a pull-down menu component -@@ -62,6 +63,13 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ -+ AWTAccessor.setMenuAccessor( -+ new AWTAccessor.MenuAccessor() { -+ public Vector getItems(Menu menu) { -+ return menu.items; -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/MenuBar.java ---- jdk/src/share/classes/java/awt/MenuBar.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/MenuBar.java Sun Sep 23 23:43:31 2012 +0400 -@@ -28,6 +28,7 @@ - import java.io.ObjectInputStream; - import java.util.Vector; - import java.util.Enumeration; -+import sun.awt.AWTAccessor; - import java.awt.peer.MenuBarPeer; - import java.awt.event.KeyEvent; - import javax.accessibility.*; -@@ -74,6 +75,16 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ AWTAccessor.setMenuBarAccessor( -+ new AWTAccessor.MenuBarAccessor() { -+ public Menu getHelpMenu(MenuBar menuBar) { -+ return menuBar.helpMenu; -+ } -+ -+ public Vector getMenus(MenuBar menuBar) { -+ return menuBar.menus; -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/MenuComponent.java ---- jdk/src/share/classes/java/awt/MenuComponent.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/MenuComponent.java Sun Sep 23 23:43:31 2012 +0400 -@@ -29,7 +29,6 @@ - import java.io.IOException; - import java.io.ObjectInputStream; - import sun.awt.AppContext; --import sun.awt.SunToolkit; - import sun.awt.AWTAccessor; - import javax.accessibility.*; - -@@ -143,6 +142,9 @@ - public MenuContainer getParent(MenuComponent menuComp) { - return menuComp.parent; - } -+ public Font getFont_NoClientCode(MenuComponent menuComp) { -+ return menuComp.getFont_NoClientCode(); -+ } - }); - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/MenuItem.java ---- jdk/src/share/classes/java/awt/MenuItem.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/MenuItem.java Sun Sep 23 23:43:31 2012 +0400 -@@ -31,7 +31,7 @@ - import java.io.ObjectInputStream; - import java.io.IOException; - import javax.accessibility.*; -- -+import sun.awt.AWTAccessor; - - /** - * All items in a menu must belong to the class -@@ -76,6 +76,29 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ -+ AWTAccessor.setMenuItemAccessor( -+ new AWTAccessor.MenuItemAccessor() { -+ public boolean isEnabled(MenuItem item) { -+ return item.enabled; -+ } -+ -+ public String getLabel(MenuItem item) { -+ return item.label; -+ } -+ -+ public MenuShortcut getShortcut(MenuItem item) { -+ return item.shortcut; -+ } -+ -+ public String getActionCommandImpl(MenuItem item) { -+ return item.getActionCommandImpl(); -+ } -+ -+ public boolean isItemEnabled(MenuItem item) { -+ return item.isItemEnabled(); -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/ScrollPaneAdjustable.java ---- jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Sun Sep 23 23:43:31 2012 +0400 -@@ -24,6 +24,8 @@ - */ - package java.awt; - -+import sun.awt.AWTAccessor; -+ - import java.awt.event.AdjustmentEvent; - import java.awt.event.AdjustmentListener; - import java.awt.peer.ScrollPanePeer; -@@ -156,6 +158,13 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ AWTAccessor.setScrollPaneAdjustableAccessor( -+ new AWTAccessor.ScrollPaneAdjustableAccessor() { -+ public void setTypedValue(final ScrollPaneAdjustable adj, -+ final int v, final int type) { -+ adj.setTypedValue(v, type); -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/SystemTray.java ---- jdk/src/share/classes/java/awt/SystemTray.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/SystemTray.java Sun Sep 23 23:43:31 2012 +0400 -@@ -33,6 +33,7 @@ - import sun.awt.SunToolkit; - import sun.awt.HeadlessToolkit; - import sun.security.util.SecurityConstants; -+import sun.awt.AWTAccessor; - - /** - * The <code>SystemTray</code> class represents the system tray for a -@@ -127,6 +128,18 @@ - - private static final TrayIcon[] EMPTY_TRAY_ARRAY = new TrayIcon[0]; - -+ static { -+ AWTAccessor.setSystemTrayAccessor( -+ new AWTAccessor.SystemTrayAccessor() { -+ public void firePropertyChange(SystemTray tray, -+ String propertyName, -+ Object oldValue, -+ Object newValue) { -+ tray.firePropertyChange(propertyName, oldValue, newValue); -+ } -+ }); -+ } -+ - /** - * Private <code>SystemTray</code> constructor. - * -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/TrayIcon.java ---- jdk/src/share/classes/java/awt/TrayIcon.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/TrayIcon.java Sun Sep 23 23:43:31 2012 +0400 -@@ -25,19 +25,11 @@ - - package java.awt; - --import java.awt.Point; --import java.awt.Toolkit; --import java.awt.GraphicsEnvironment; - import java.awt.event.*; --import java.awt.AWTEvent; --import java.awt.AWTEventMulticaster; --import java.awt.EventQueue; --import java.awt.PopupMenu; --import java.awt.Image; --import java.util.EventListener; - import java.awt.peer.TrayIconPeer; - import sun.awt.AppContext; - import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - import sun.awt.HeadlessToolkit; - import java.util.EventObject; - import java.security.AccessControlContext; -@@ -129,6 +121,16 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ -+ AWTAccessor.setTrayIconAccessor( -+ new AWTAccessor.TrayIconAccessor() { -+ public void addNotify(TrayIcon trayIcon) throws AWTException { -+ trayIcon.addNotify(); -+ } -+ public void removeNotify(TrayIcon trayIcon) { -+ trayIcon.removeNotify(); -+ } -+ }); - } - - private TrayIcon() -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/awt/event/KeyEvent.java ---- jdk/src/share/classes/java/awt/event/KeyEvent.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/awt/event/KeyEvent.java Sun Sep 23 23:43:31 2012 +0400 -@@ -25,12 +25,12 @@ - - package java.awt.event; - --import java.awt.Event; - import java.awt.Component; - import java.awt.GraphicsEnvironment; - import java.awt.Toolkit; - import java.io.IOException; - import java.io.ObjectInputStream; -+import sun.awt.AWTAccessor; - - /** - * An event which indicates that a keystroke occurred in a component. -@@ -914,6 +914,23 @@ - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } -+ -+ AWTAccessor.setKeyEventAccessor( -+ new AWTAccessor.KeyEventAccessor() { -+ public void setRawCode(KeyEvent ev, long rawCode) { -+ ev.rawCode = rawCode; -+ } -+ -+ public void setPrimaryLevelUnicode(KeyEvent ev, -+ long primaryLevelUnicode) { -+ ev.primaryLevelUnicode = primaryLevelUnicode; -+ } -+ -+ public void setExtendedKeyCode(KeyEvent ev, -+ long extendedKeyCode) { -+ ev.extendedKeyCode = extendedKeyCode; -+ } -+ }); - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/beans/XMLDecoder.java ---- jdk/src/share/classes/java/beans/XMLDecoder.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/beans/XMLDecoder.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -29,6 +29,9 @@ - import java.io.Closeable; - import java.io.InputStream; - import java.io.IOException; -+import java.security.AccessControlContext; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - - import org.xml.sax.InputSource; - import org.xml.sax.helpers.DefaultHandler; -@@ -61,6 +64,7 @@ - * @author Philip Milne - */ - public class XMLDecoder implements AutoCloseable { -+ private final AccessControlContext acc = AccessController.getContext(); - private final DocumentHandler handler = new DocumentHandler(); - private final InputSource input; - private Object owner; -@@ -189,7 +193,15 @@ - return false; - } - if (this.array == null) { -- this.handler.parse(this.input); -+ if ((this.acc == null) && (null != System.getSecurityManager())) { -+ throw new SecurityException("AccessControlContext is not set"); -+ } -+ AccessController.doPrivileged(new PrivilegedAction<Void>() { -+ public Void run() { -+ XMLDecoder.this.handler.parse(XMLDecoder.this.input); -+ return null; -+ } -+ }, this.acc); - this.array = this.handler.getObjects(); - } - return true; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/io/FilePermission.java ---- jdk/src/share/classes/java/io/FilePermission.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/io/FilePermission.java Sun Sep 23 23:43:31 2012 +0400 -@@ -418,7 +418,7 @@ - */ - - public int hashCode() { -- return this.cpath.hashCode(); -+ return 0; - } - - /** -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/lang/invoke/MethodHandleImpl.java ---- jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -25,7 +25,6 @@ - - package java.lang.invoke; - --import sun.invoke.util.VerifyType; - import java.security.AccessController; - import java.security.PrivilegedAction; - import java.util.ArrayList; -@@ -35,6 +34,7 @@ - import java.util.List; - import sun.invoke.empty.Empty; - import sun.invoke.util.ValueConversions; -+import sun.invoke.util.VerifyType; - import sun.invoke.util.Wrapper; - import sun.misc.Unsafe; - import static java.lang.invoke.MethodHandleStatics.*; -@@ -1258,4 +1258,169 @@ - return THROW_EXCEPTION; - } - static <T extends Throwable> Empty throwException(T t) throws T { throw t; } -+ -+ /** -+ * Create an alias for the method handle which, when called, -+ * appears to be called from the same class loader and protection domain -+ * as hostClass. -+ * This is an expensive no-op unless the method which is called -+ * is sensitive to its caller. A small number of system methods -+ * are in this category, including Class.forName and Method.invoke. -+ */ -+ static -+ MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) { -+ return BindCaller.bindCaller(mh, hostClass); -+ } -+ -+ // Put the whole mess into its own nested class. -+ // That way we can lazily load the code and set up the constants. -+ private static class BindCaller { -+ static -+ MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) { -+ // Do not use this function to inject calls into system classes. -+ if (hostClass == null) { -+ hostClass = C_Trampoline; -+ } else if (hostClass.isArray() || -+ hostClass.isPrimitive() || -+ hostClass.getName().startsWith("java.") || -+ hostClass.getName().startsWith("sun.")) { -+ throw new InternalError(); // does not happen, and should not anyway -+ } -+ // For simplicity, convert mh to a varargs-like method. -+ MethodHandle vamh = prepareForInvoker(mh); -+ // Cache the result of makeInjectedInvoker once per argument class. -+ MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass); -+ return restoreToType(bccInvoker.bindTo(vamh), mh.type()); -+ } -+ -+ // This class ("Trampoline") is known to be inside a dead-end class loader. -+ // Inject all doubtful calls into this class. -+ private static Class<?> C_Trampoline; -+ static { -+ Class<?> tramp = null; -+ try { -+ final int FRAME_COUNT_ARG = 1; // [0] Reflection [1] Trampoline -+ java.lang.reflect.Method gcc = sun.reflect.Reflection.class.getMethod("getCallerClass", int.class); -+ tramp = (Class<?>) sun.reflect.misc.MethodUtil.invoke(gcc, null, new Object[]{ FRAME_COUNT_ARG }); -+ if (tramp.getClassLoader() == BindCaller.class.getClassLoader()) -+ throw new RuntimeException(tramp.getName()+" class loader"); -+ } catch (Throwable ex) { -+ throw new InternalError(ex.toString()); -+ } -+ C_Trampoline = tramp; -+ } -+ -+ private static final Unsafe UNSAFE = Unsafe.getUnsafe(); -+ -+ private static MethodHandle makeInjectedInvoker(Class<?> hostClass) { -+ Class<?> bcc = UNSAFE.defineAnonymousClass(hostClass, T_BYTES, null); -+ if (hostClass.getClassLoader() != bcc.getClassLoader()) -+ throw new InternalError(hostClass.getName()+" (CL)"); -+ try { -+ if (hostClass.getProtectionDomain() != bcc.getProtectionDomain()) -+ throw new InternalError(hostClass.getName()+" (PD)"); -+ } catch (SecurityException ex) { -+ // Self-check was blocked by security manager. This is OK. -+ // In fact the whole try body could be turned into an assertion. -+ } -+ try { -+ MethodHandle init = IMPL_LOOKUP.findStatic(bcc, "init", MethodType.methodType(void.class)); -+ init.invokeExact(); // force initialization of the class -+ } catch (Throwable ex) { -+ throw uncaughtException(ex); -+ } -+ MethodHandle bccInvoker; -+ try { -+ MethodType invokerMT = MethodType.methodType(Object.class, MethodHandle.class, Object[].class); -+ bccInvoker = IMPL_LOOKUP.findStatic(bcc, "invoke_V", invokerMT); -+ } catch (ReflectiveOperationException ex) { -+ throw uncaughtException(ex); -+ } -+ // Test the invoker, to ensure that it really injects into the right place. -+ try { -+ MethodHandle vamh = prepareForInvoker(MH_checkCallerClass); -+ Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc}); -+ } catch (Throwable ex) { -+ throw new InternalError(ex.toString()); -+ } -+ return bccInvoker; -+ } -+ private static ClassValue<MethodHandle> CV_makeInjectedInvoker = new ClassValue<MethodHandle>() { -+ @Override protected MethodHandle computeValue(Class<?> hostClass) { -+ return makeInjectedInvoker(hostClass); -+ } -+ }; -+ -+ // Adapt mh so that it can be called directly from an injected invoker: -+ private static MethodHandle prepareForInvoker(MethodHandle mh) { -+ mh = mh.asFixedArity(); -+ MethodType mt = mh.type(); -+ int arity = mt.parameterCount(); -+ MethodHandle vamh = mh.asType(mt.generic()); -+ vamh = vamh.asSpreader(Object[].class, arity); -+ return vamh; -+ } -+ -+ // Undo the adapter effect of prepareForInvoker: -+ private static MethodHandle restoreToType(MethodHandle vamh, MethodType type) { -+ return vamh.asCollector(Object[].class, type.parameterCount()).asType(type); -+ } -+ -+ private static final MethodHandle MH_checkCallerClass; -+ static { -+ final Class<?> THIS_CLASS = BindCaller.class; -+ assert(checkCallerClass(THIS_CLASS, THIS_CLASS)); -+ try { -+ MH_checkCallerClass = IMPL_LOOKUP -+ .findStatic(THIS_CLASS, "checkCallerClass", -+ MethodType.methodType(boolean.class, Class.class, Class.class)); -+ assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); -+ } catch (Throwable ex) { -+ throw new InternalError(ex.toString()); -+ } -+ } -+ -+ private static boolean checkCallerClass(Class<?> expected, Class<?> expected2) { -+ final int FRAME_COUNT_ARG = 2; // [0] Reflection [1] BindCaller [2] Expected -+ Class<?> actual = sun.reflect.Reflection.getCallerClass(FRAME_COUNT_ARG); -+ if (actual != expected && actual != expected2) -+ throw new InternalError("found "+actual.getName()+", expected "+expected.getName() -+ +(expected == expected2 ? "" : ", or else "+expected2.getName())); -+ return true; -+ } -+ -+ private static final byte[] T_BYTES; -+ static { -+ final Object[] values = {null}; -+ AccessController.doPrivileged(new PrivilegedAction<Void>() { -+ public Void run() { -+ try { -+ Class<T> tClass = T.class; -+ String tName = tClass.getName(); -+ String tResource = tName.substring(tName.lastIndexOf('.')+1)+".class"; -+ java.net.URLConnection uconn = tClass.getResource(tResource).openConnection(); -+ int len = uconn.getContentLength(); -+ byte[] bytes = new byte[len]; -+ try (java.io.InputStream str = uconn.getInputStream()) { -+ int nr = str.read(bytes); -+ if (nr != len) throw new java.io.IOException(tResource); -+ } -+ values[0] = bytes; -+ } catch (java.io.IOException ex) { -+ throw new InternalError(ex.toString()); -+ } -+ return null; -+ } -+ }); -+ T_BYTES = (byte[]) values[0]; -+ } -+ -+ // The following class is used as a template for Unsafe.defineAnonymousClass: -+ private static class T { -+ static void init() { } // side effect: initializes this class -+ static Object invoke_V(MethodHandle vamh, Object[] args) throws Throwable { -+ return vamh.invokeExact(args); -+ } -+ } -+ } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/lang/invoke/MethodHandleNatives.java ---- jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, 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 -@@ -401,4 +401,101 @@ - assert(!HAVE_RICOCHET_FRAMES) : "this code should not be executed if `-XX:+UseRicochetFrames is enabled"; - return true; - } -+ -+ /** -+ * Is this method a caller-sensitive method? -+ * I.e., does it call Reflection.getCallerClass or a similer method -+ * to ask about the identity of its caller? -+ */ -+ // FIXME: Replace this pattern match by an annotation @sun.reflect.CallerSensitive. -+ static boolean isCallerSensitive(MemberName mem) { -+ assert(mem.isInvocable()); -+ Class<?> defc = mem.getDeclaringClass(); -+ switch (mem.getName()) { -+ case "doPrivileged": -+ return defc == java.security.AccessController.class; -+ case "getUnsafe": -+ return defc == sun.misc.Unsafe.class; -+ case "lookup": -+ return defc == java.lang.invoke.MethodHandles.class; -+ case "invoke": -+ return defc == java.lang.reflect.Method.class; -+ case "get": -+ case "getBoolean": -+ case "getByte": -+ case "getChar": -+ case "getShort": -+ case "getInt": -+ case "getLong": -+ case "getFloat": -+ case "getDouble": -+ case "set": -+ case "setBoolean": -+ case "setByte": -+ case "setChar": -+ case "setShort": -+ case "setInt": -+ case "setLong": -+ case "setFloat": -+ case "setDouble": -+ return defc == java.lang.reflect.Field.class; -+ case "newInstance": -+ if (defc == java.lang.reflect.Constructor.class) return true; -+ if (defc == java.lang.Class.class) return true; -+ break; -+ case "forName": -+ case "getClassLoader": -+ case "getClasses": -+ case "getFields": -+ case "getMethods": -+ case "getConstructors": -+ case "getDeclaredClasses": -+ case "getDeclaredFields": -+ case "getDeclaredMethods": -+ case "getDeclaredConstructors": -+ case "getField": -+ case "getMethod": -+ case "getConstructor": -+ case "getDeclaredField": -+ case "getDeclaredMethod": -+ case "getDeclaredConstructor": -+ return defc == java.lang.Class.class; -+ case "getConnection": -+ case "getDriver": -+ case "getDrivers": -+ case "deregisterDriver": -+ return defc == java.sql.DriverManager.class; -+ case "newUpdater": -+ if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true; -+ if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true; -+ if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class) return true; -+ break; -+ case "getContextClassLoader": -+ return defc == java.lang.Thread.class; -+ case "getPackage": -+ case "getPackages": -+ return defc == java.lang.Package.class; -+ case "getParent": -+ case "getSystemClassLoader": -+ return defc == java.lang.ClassLoader.class; -+ case "load": -+ case "loadLibrary": -+ if (defc == java.lang.Runtime.class) return true; -+ if (defc == java.lang.System.class) return true; -+ break; -+ case "getCallerClass": -+ if (defc == sun.reflect.Reflection.class) return true; -+ if (defc == java.lang.System.class) return true; -+ break; -+ case "getCallerClassLoader": -+ return defc == java.lang.ClassLoader.class; -+ case "getProxyClass": -+ case "newProxyInstance": -+ return defc == java.lang.reflect.Proxy.class; -+ case "getBundle": -+ case "clearCache": -+ return defc == java.util.ResourceBundle.class; -+ } -+ return false; -+ } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/lang/invoke/MethodHandleStatics.java ---- jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2011, 2012, 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 -@@ -107,7 +107,7 @@ - /*non-public*/ static RuntimeException newIllegalArgumentException(String message, Object obj, Object obj2) { - return new IllegalArgumentException(message(message, obj, obj2)); - } -- /*non-public*/ static Error uncaughtException(Exception ex) { -+ /*non-public*/ static Error uncaughtException(Throwable ex) { - Error err = new InternalError("uncaught exception"); - err.initCause(ex); - return err; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/lang/invoke/MethodHandles.java ---- jdk/src/share/classes/java/lang/invoke/MethodHandles.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/lang/invoke/MethodHandles.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, 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 -@@ -589,7 +589,9 @@ - private - MethodHandle accessStatic(Class<?> refc, MemberName method) throws IllegalAccessException { - checkMethod(refc, method, true); -- return MethodHandleImpl.findMethod(method, false, lookupClassOrNull()); -+ MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull()); -+ mh = maybeBindCaller(method, mh); -+ return mh; - } - private - MethodHandle resolveStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException { -@@ -647,6 +649,7 @@ - private MethodHandle accessVirtual(Class<?> refc, MemberName method) throws IllegalAccessException { - checkMethod(refc, method, false); - MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull()); -+ mh = maybeBindCaller(method, mh); - return restrictProtectedReceiver(method, mh); - } - -@@ -687,6 +690,7 @@ - checkAccess(refc, ctor); - MethodHandle rawMH = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull()); - MethodHandle allocMH = MethodHandleImpl.makeAllocator(rawMH); -+ assert(!MethodHandleNatives.isCallerSensitive(ctor)); // maybeBindCaller not relevant here - return fixVarargs(allocMH, rawMH); - } - private MethodHandle resolveConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException { -@@ -755,6 +759,7 @@ - Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException { - checkMethod(refc, method, false); - MethodHandle mh = MethodHandleImpl.findMethod(method, false, specialCaller); -+ mh = maybeBindCaller(method, mh); - return restrictReceiver(method, mh, specialCaller); - } - private MethodHandle resolveSpecial(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException { -@@ -922,6 +927,8 @@ - checkSecurityManager(refc, method); // stack walk magic: do not refactor - checkMethod(refc, method, false); - MethodHandle dmh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull()); -+ MethodHandle bcmh = maybeBindCaller(method, dmh); -+ if (bcmh != dmh) return fixVarargs(bcmh.bindTo(receiver), dmh); - MethodHandle bmh = MethodHandleImpl.bindReceiver(dmh, receiver); - if (bmh == null) - throw method.makeAccessException("no access", this); -@@ -956,6 +963,7 @@ - return MethodHandleImpl.findMethod(method, true, /*no lookupClass*/ null); - checkMethod(method.getDeclaringClass(), method, method.isStatic()); - MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull()); -+ mh = maybeBindCaller(method, mh); - return restrictProtectedReceiver(method, mh); - } - -@@ -987,6 +995,7 @@ - // ignore m.isAccessible: this is a new kind of access - checkMethod(m.getDeclaringClass(), method, false); - MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull()); -+ mh = maybeBindCaller(method, mh); - return restrictReceiver(method, mh, specialCaller); - } - -@@ -1021,6 +1030,7 @@ - checkAccess(c.getDeclaringClass(), ctor); - rawCtor = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull()); - } -+ assert(!MethodHandleNatives.isCallerSensitive(ctor)); // maybeBindCaller not relevant here - MethodHandle allocator = MethodHandleImpl.makeAllocator(rawCtor); - return fixVarargs(allocator, rawCtor); - } -@@ -1232,6 +1242,16 @@ - MethodHandle narrowMH = MethodHandleImpl.convertArguments(mh, narrowType, rawType, 0); - return fixVarargs(narrowMH, mh); - } -+ private MethodHandle maybeBindCaller(MemberName method, MethodHandle mh) throws IllegalAccessException { -+ if (allowedModes == TRUSTED || !MethodHandleNatives.isCallerSensitive(method)) -+ return mh; -+ Class<?> hostClass = lookupClass; -+ if ((allowedModes & PRIVATE) == 0) // caller must use full-power lookup -+ hostClass = null; -+ MethodHandle cbmh = MethodHandleImpl.bindCaller(mh, hostClass); -+ cbmh = fixVarargs(cbmh, mh); // in JDK 7 version, varargs happens earlier and must be repaired -+ return cbmh; -+ } - - MethodHandle makeAccessor(Class<?> refc, MemberName field, - boolean trusted, boolean isSetter, -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/net/URL.java ---- jdk/src/share/classes/java/net/URL.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/net/URL.java Sun Sep 23 23:43:31 2012 +0400 -@@ -28,6 +28,8 @@ - import java.io.IOException; - import java.io.InputStream; - import java.io.OutputStream; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - import java.util.Hashtable; - import java.util.StringTokenizer; - import sun.security.util.SecurityConstants; -@@ -1116,6 +1118,22 @@ - static Hashtable handlers = new Hashtable(); - private static Object streamHandlerLock = new Object(); - -+ // special case the gopher protocol, disabled by default -+ private static final String GOPHER = "gopher"; -+ private static final String ENABLE_GOPHER_PROP = "jdk.net.registerGopherProtocol"; -+ private static final boolean enableGopher = AccessController.doPrivileged( -+ new PrivilegedAction<Boolean>() { -+ @Override -+ public Boolean run() { -+ String prop = System.getProperty(ENABLE_GOPHER_PROP); -+ return prop == null ? false : -+ (prop.equalsIgnoreCase("false") ? false : true); -+ } -+ }); -+ -+ // package name of the JDK implementation protocol handlers -+ private static final String JDK_PACKAGE_PREFIX = "sun.net.www.protocol"; -+ - /** - * Returns the Stream Handler. - * @param protocol the protocol to use -@@ -1147,7 +1165,7 @@ - - // REMIND: decide whether to allow the "null" class prefix - // or not. -- packagePrefixList += "sun.net.www.protocol"; -+ packagePrefixList += JDK_PACKAGE_PREFIX; - - StringTokenizer packagePrefixIter = - new StringTokenizer(packagePrefixList, "|"); -@@ -1157,6 +1175,14 @@ - - String packagePrefix = - packagePrefixIter.nextToken().trim(); -+ -+ // do not try to instantiate the JDK gopher handler -+ // unless the system property had been explicitly set -+ if (protocol.equalsIgnoreCase(GOPHER) && -+ packagePrefix.equals(JDK_PACKAGE_PREFIX) && -+ !enableGopher) { -+ continue; -+ } - try { - String clsName = packagePrefix + "." + protocol + - ".Handler"; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/security/AccessController.java ---- jdk/src/share/classes/java/security/AccessController.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/security/AccessController.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2012, 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 -@@ -290,11 +290,11 @@ - */ - public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action) { - -- DomainCombiner dc = null; - AccessControlContext acc = getStackAccessControlContext(); -- if (acc == null || (dc = acc.getAssignedCombiner()) == null) { -+ if (acc == null) { - return AccessController.doPrivileged(action); - } -+ DomainCombiner dc = acc.getAssignedCombiner(); - return AccessController.doPrivileged(action, preserveCombiner(dc)); - } - -@@ -386,11 +386,11 @@ - public static <T> T doPrivilegedWithCombiner - (PrivilegedExceptionAction<T> action) throws PrivilegedActionException { - -- DomainCombiner dc = null; - AccessControlContext acc = getStackAccessControlContext(); -- if (acc == null || (dc = acc.getAssignedCombiner()) == null) { -+ if (acc == null) { - return AccessController.doPrivileged(action); - } -+ DomainCombiner dc = acc.getAssignedCombiner(); - return AccessController.doPrivileged(action, preserveCombiner(dc)); - } - -@@ -417,7 +417,12 @@ - // perform 'combine' on the caller of doPrivileged, - // even if the caller is from the bootclasspath - ProtectionDomain[] pds = new ProtectionDomain[] {callerPd}; -- return new AccessControlContext(combiner.combine(pds, null), combiner); -+ if (combiner == null) { -+ return new AccessControlContext(pds); -+ } else { -+ return new AccessControlContext(combiner.combine(pds, null), -+ combiner); -+ } - } - - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/ServiceLoader.java ---- jdk/src/share/classes/java/util/ServiceLoader.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/ServiceLoader.java Sun Sep 23 23:43:31 2012 +0400 -@@ -358,14 +358,21 @@ - } - String cn = nextName; - nextName = null; -+ Class<?> c = null; - try { -- S p = service.cast(Class.forName(cn, true, loader) -- .newInstance()); -- providers.put(cn, p); -- return p; -+ c = Class.forName(cn, false, loader); - } catch (ClassNotFoundException x) { - fail(service, - "Provider " + cn + " not found"); -+ } -+ if (!service.isAssignableFrom(c)) { -+ fail(service, -+ "Provider " + cn + " not a subtype"); -+ } -+ try { -+ S p = service.cast(c.newInstance()); -+ providers.put(cn, p); -+ return p; - } catch (Throwable x) { - fail(service, - "Provider " + cn + " could not be instantiated: " + x, -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/TimeZone.java ---- jdk/src/share/classes/java/util/TimeZone.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/TimeZone.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1996, 2012, 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 -@@ -43,7 +43,8 @@ - import java.security.AccessController; - import java.security.PrivilegedAction; - import java.util.concurrent.ConcurrentHashMap; --import sun.awt.AppContext; -+import sun.misc.SharedSecrets; -+import sun.misc.JavaAWTAccess; - import sun.security.action.GetPropertyAction; - import sun.util.TimeZoneNameUtility; - import sun.util.calendar.ZoneInfo; -@@ -161,6 +162,16 @@ - private static final int ONE_HOUR = 60*ONE_MINUTE; - private static final int ONE_DAY = 24*ONE_HOUR; - -+ /* -+ * Provides access implementation-private methods without using reflection -+ * -+ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't -+ * been loaded. If so, it implies that AWTSecurityManager is not our -+ * SecurityManager and we can use a local static variable. -+ * This works around a build time issue. -+ */ -+ private static JavaAWTAccess javaAWTAccess; -+ - // Proclaim serialization compatibility with JDK 1.1 - static final long serialVersionUID = 3581463369166924961L; - -@@ -720,13 +731,19 @@ - * used or if the AppContext doesn't have the default TimeZone. - */ - private synchronized static TimeZone getDefaultInAppContext() { -- if (!hasSetInAppContext) { -- return null; -- } -- -- AppContext ac = AppContext.getAppContext(); -- if (ac != null && !ac.isDisposed()) { -- return (TimeZone) ac.get(TimeZone.class); -+ javaAWTAccess = SharedSecrets.getJavaAWTAccess(); -+ if (javaAWTAccess == null) { -+ return mainAppContextDefault; -+ } else { -+ if (!javaAWTAccess.isDisposed()) { -+ TimeZone tz = (TimeZone) -+ javaAWTAccess.get(TimeZone.class); -+ if (tz == null && javaAWTAccess.isMainAppContext()) { -+ return mainAppContextDefault; -+ } else { -+ return tz; -+ } -+ } - } - return null; - } -@@ -738,17 +755,15 @@ - * AppContext otherwise. - */ - private synchronized static void setDefaultInAppContext(TimeZone tz) { -- if (!hasSetInAppContext && tz == null) { -- return; -- } -- -- AppContext ac = AppContext.getAppContext(); -- if (ac != null && !ac.isDisposed()) { -- if (tz != null) { -- ac.put(TimeZone.class, tz); -- hasSetInAppContext = true; -- } else { -- ac.remove(TimeZone.class); -+ javaAWTAccess = SharedSecrets.getJavaAWTAccess(); -+ if (javaAWTAccess == null) { -+ mainAppContextDefault = tz; -+ } else { -+ if (!javaAWTAccess.isDisposed()) { -+ javaAWTAccess.put(TimeZone.class, tz); -+ if (javaAWTAccess.isMainAppContext()) { -+ mainAppContextDefault = null; -+ } - } - } - } -@@ -804,8 +819,8 @@ - static final String GMT_ID = "GMT"; - private static final int GMT_ID_LENGTH = 3; - -- // true if the default TimeZone has been set in any AppContext -- private static boolean hasSetInAppContext; -+ // a static TimeZone we can reference if no AppContext is in place -+ private static TimeZone mainAppContextDefault; - - /** - * Parses a custom time zone identifier and returns a corresponding zone. -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/concurrent/Executors.java ---- jdk/src/share/classes/java/util/concurrent/Executors.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/concurrent/Executors.java Sun Sep 23 23:43:31 2012 +0400 -@@ -530,18 +530,17 @@ - return AccessController.doPrivileged( - new PrivilegedExceptionAction<T>() { - public T run() throws Exception { -- ClassLoader savedcl = null; - Thread t = Thread.currentThread(); -- try { -- ClassLoader cl = t.getContextClassLoader(); -- if (ccl != cl) { -- t.setContextClassLoader(ccl); -- savedcl = cl; -+ ClassLoader cl = t.getContextClassLoader(); -+ if (ccl == cl) { -+ return task.call(); -+ } else { -+ t.setContextClassLoader(ccl); -+ try { -+ return task.call(); -+ } finally { -+ t.setContextClassLoader(cl); - } -- return task.call(); -- } finally { -- if (savedcl != null) -- t.setContextClassLoader(savedcl); - } - } - }, acc); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/logging/FileHandler.java ---- jdk/src/share/classes/java/util/logging/FileHandler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/logging/FileHandler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -220,7 +220,7 @@ - * @exception NullPointerException if pattern property is an empty String. - */ - public FileHandler() throws IOException, SecurityException { -- checkAccess(); -+ checkPermission(); - configure(); - openFiles(); - } -@@ -246,7 +246,7 @@ - if (pattern.length() < 1 ) { - throw new IllegalArgumentException(); - } -- checkAccess(); -+ checkPermission(); - configure(); - this.pattern = pattern; - this.limit = 0; -@@ -278,7 +278,7 @@ - if (pattern.length() < 1 ) { - throw new IllegalArgumentException(); - } -- checkAccess(); -+ checkPermission(); - configure(); - this.pattern = pattern; - this.limit = 0; -@@ -315,7 +315,7 @@ - if (limit < 0 || count < 1 || pattern.length() < 1) { - throw new IllegalArgumentException(); - } -- checkAccess(); -+ checkPermission(); - configure(); - this.pattern = pattern; - this.limit = limit; -@@ -354,7 +354,7 @@ - if (limit < 0 || count < 1 || pattern.length() < 1) { - throw new IllegalArgumentException(); - } -- checkAccess(); -+ checkPermission(); - configure(); - this.pattern = pattern; - this.limit = limit; -@@ -367,7 +367,7 @@ - // configured instance variables. - private void openFiles() throws IOException { - LogManager manager = LogManager.getLogManager(); -- manager.checkAccess(); -+ manager.checkPermission(); - if (count < 1) { - throw new IllegalArgumentException("file count = " + count); - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/logging/Handler.java ---- jdk/src/share/classes/java/util/logging/Handler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/logging/Handler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 2012, 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 -@@ -111,7 +111,7 @@ - * the caller does not have <tt>LoggingPermission("control")</tt>. - */ - public void setFormatter(Formatter newFormatter) throws SecurityException { -- checkAccess(); -+ checkPermission(); - // Check for a null pointer: - newFormatter.getClass(); - formatter = newFormatter; -@@ -140,7 +140,7 @@ - */ - public void setEncoding(String encoding) - throws SecurityException, java.io.UnsupportedEncodingException { -- checkAccess(); -+ checkPermission(); - if (encoding != null) { - try { - if(!java.nio.charset.Charset.isSupported(encoding)) { -@@ -175,7 +175,7 @@ - * the caller does not have <tt>LoggingPermission("control")</tt>. - */ - public void setFilter(Filter newFilter) throws SecurityException { -- checkAccess(); -+ checkPermission(); - filter = newFilter; - } - -@@ -199,7 +199,7 @@ - * the caller does not have <tt>LoggingPermission("control")</tt>. - */ - public void setErrorManager(ErrorManager em) { -- checkAccess(); -+ checkPermission(); - if (em == null) { - throw new NullPointerException(); - } -@@ -213,7 +213,7 @@ - * the caller does not have <tt>LoggingPermission("control")</tt>. - */ - public ErrorManager getErrorManager() { -- checkAccess(); -+ checkPermission(); - return errorManager; - } - -@@ -253,7 +253,7 @@ - if (newLevel == null) { - throw new NullPointerException(); - } -- checkAccess(); -+ checkPermission(); - logLevel = newLevel; - } - -@@ -296,9 +296,9 @@ - // If "sealed" is true, we check that the caller has - // appropriate security privileges to update Handler - // state and if not throw a SecurityException. -- void checkAccess() throws SecurityException { -+ void checkPermission() throws SecurityException { - if (sealed) { -- manager.checkAccess(); -+ manager.checkPermission(); - } - } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/logging/LogManager.java ---- jdk/src/share/classes/java/util/logging/LogManager.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/logging/LogManager.java Sun Sep 23 23:43:31 2012 +0400 -@@ -314,7 +314,7 @@ - if (l == null) { - throw new NullPointerException(); - } -- checkAccess(); -+ checkPermission(); - changes.addPropertyChangeListener(l); - } - -@@ -333,7 +333,7 @@ - * the caller does not have LoggingPermission("control"). - */ - public void removePropertyChangeListener(PropertyChangeListener l) throws SecurityException { -- checkAccess(); -+ checkPermission(); - changes.removePropertyChangeListener(l); - } - -@@ -772,7 +772,7 @@ - * @exception IOException if there are IO problems reading the configuration. - */ - public void readConfiguration() throws IOException, SecurityException { -- checkAccess(); -+ checkPermission(); - - // if a configuration class is specified, load it and use it. - String cname = System.getProperty("java.util.logging.config.class"); -@@ -830,7 +830,7 @@ - */ - - public void reset() throws SecurityException { -- checkAccess(); -+ checkPermission(); - synchronized (this) { - props = new Properties(); - // Since we are doing a reset we no longer want to initialize -@@ -915,7 +915,7 @@ - * @exception IOException if there are problems reading from the stream. - */ - public void readConfiguration(InputStream ins) throws IOException, SecurityException { -- checkAccess(); -+ checkPermission(); - reset(); - - // Load the properties -@@ -1077,7 +1077,13 @@ - } - - -- private Permission ourPermission = new LoggingPermission("control", null); -+ private final Permission controlPermission = new LoggingPermission("control", null); -+ -+ void checkPermission() { -+ SecurityManager sm = System.getSecurityManager(); -+ if (sm != null) -+ sm.checkPermission(controlPermission); -+ } - - /** - * Check that the current context is trusted to modify the logging -@@ -1090,11 +1096,7 @@ - * the caller does not have LoggingPermission("control"). - */ - public void checkAccess() throws SecurityException { -- SecurityManager sm = System.getSecurityManager(); -- if (sm == null) { -- return; -- } -- sm.checkPermission(ourPermission); -+ checkPermission(); - } - - // Nested class to represent a node in our tree of named loggers. -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/logging/Logger.java ---- jdk/src/share/classes/java/util/logging/Logger.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/logging/Logger.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 2012, 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 -@@ -273,13 +273,13 @@ - this.manager = manager; - } - -- private void checkAccess() throws SecurityException { -+ private void checkPermission() throws SecurityException { - if (!anonymous) { - if (manager == null) { - // Complete initialization of the global Logger. - manager = LogManager.getLogManager(); - } -- manager.checkAccess(); -+ manager.checkPermission(); - } - } - -@@ -482,7 +482,7 @@ - * the caller does not have LoggingPermission("control"). - */ - public void setFilter(Filter newFilter) throws SecurityException { -- checkAccess(); -+ checkPermission(); - filter = newFilter; - } - -@@ -1168,7 +1168,7 @@ - * the caller does not have LoggingPermission("control"). - */ - public void setLevel(Level newLevel) throws SecurityException { -- checkAccess(); -+ checkPermission(); - synchronized (treeLock) { - levelObject = newLevel; - updateEffectiveLevel(); -@@ -1223,7 +1223,7 @@ - public void addHandler(Handler handler) throws SecurityException { - // Check for null handler - handler.getClass(); -- checkAccess(); -+ checkPermission(); - handlers.add(handler); - } - -@@ -1237,7 +1237,7 @@ - * the caller does not have LoggingPermission("control"). - */ - public void removeHandler(Handler handler) throws SecurityException { -- checkAccess(); -+ checkPermission(); - if (handler == null) { - return; - } -@@ -1265,7 +1265,7 @@ - * the caller does not have LoggingPermission("control"). - */ - public void setUseParentHandlers(boolean useParentHandlers) { -- checkAccess(); -+ checkPermission(); - this.useParentHandlers = useParentHandlers; - } - -@@ -1405,7 +1405,7 @@ - if (parent == null) { - throw new NullPointerException(); - } -- manager.checkAccess(); -+ manager.checkPermission(); - doSetParent(parent); - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/logging/MemoryHandler.java ---- jdk/src/share/classes/java/util/logging/MemoryHandler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/logging/MemoryHandler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -238,7 +238,7 @@ - throw new NullPointerException(); - } - LogManager manager = LogManager.getLogManager(); -- checkAccess(); -+ checkPermission(); - pushLevel = newLevel; - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/java/util/logging/StreamHandler.java ---- jdk/src/share/classes/java/util/logging/StreamHandler.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/java/util/logging/StreamHandler.java Sun Sep 23 23:43:31 2012 +0400 -@@ -249,7 +249,7 @@ - } - - private synchronized void flushAndClose() throws SecurityException { -- checkAccess(); -+ checkPermission(); - if (writer != null) { - try { - if (!doneHeader) { -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/javax/management/modelmbean/DescriptorSupport.java ---- jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1245,13 +1245,12 @@ - return s.substring(1, s.length() - 1); - } - final String className = s.substring(1, slash); -+ - final Constructor<?> constr; - try { -+ ReflectUtil.checkPackageAccess(className); - final ClassLoader contextClassLoader = - Thread.currentThread().getContextClassLoader(); -- if (contextClassLoader == null) { -- ReflectUtil.checkPackageAccess(className); -- } - final Class<?> c = - Class.forName(className, false, contextClassLoader); - constr = c.getConstructor(new Class<?>[] {String.class}); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java ---- jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -39,11 +39,17 @@ - import java.rmi.MarshalledObject; - import java.rmi.UnmarshalException; - import java.rmi.server.Unreferenced; -+ - import java.security.AccessControlContext; - import java.security.AccessController; -+import java.security.Permission; -+import java.security.PermissionCollection; -+import java.security.Permissions; - import java.security.PrivilegedAction; - import java.security.PrivilegedActionException; - import java.security.PrivilegedExceptionAction; -+import java.security.ProtectionDomain; -+ - import java.util.Arrays; - import java.util.Collections; - import java.util.Map; -@@ -60,6 +66,7 @@ - import javax.management.MBeanException; - import javax.management.MBeanInfo; - import javax.management.MBeanRegistrationException; -+import javax.management.MBeanPermission; - import javax.management.MBeanServer; - import javax.management.NotCompliantMBeanException; - import javax.management.NotificationFilter; -@@ -143,6 +150,7 @@ - this.mbeanServer = rmiServer.getMBeanServer(); - - final ClassLoader dcl = defaultClassLoader; -+ - this.classLoaderWithRepository = - AccessController.doPrivileged( - new PrivilegedAction<ClassLoaderWithRepository>() { -@@ -151,13 +159,40 @@ - mbeanServer.getClassLoaderRepository(), - dcl); - } -+ }, -+ -+ withPermissions( new MBeanPermission("*", "getClassLoaderRepository"), -+ new RuntimePermission("createClassLoader")) -+ ); -+ -+ -+ this.defaultContextClassLoader = -+ AccessController.doPrivileged( -+ new PrivilegedAction<ClassLoader>() { -+ @Override -+ public ClassLoader run() { -+ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), -+ dcl); -+ } - }); -+ - serverCommunicatorAdmin = new - RMIServerCommunicatorAdmin(EnvHelp.getServerConnectionTimeout(env)); - - this.env = env; - } - -+ private static AccessControlContext withPermissions(Permission ... perms){ -+ Permissions col = new Permissions(); -+ -+ for (Permission thePerm : perms ) { -+ col.add(thePerm); -+ } -+ -+ final ProtectionDomain pd = new ProtectionDomain(null, col); -+ return new AccessControlContext( new ProtectionDomain[] { pd }); -+ } -+ - private synchronized ServerNotifForwarder getServerNotifFwd() { - // Lazily created when first use. Mainly when - // addNotificationListener is first called. -@@ -507,7 +542,7 @@ - "connectionId=" + connectionId - +" unwrapping query with defaultClassLoader."); - -- queryValue = unwrap(query, defaultClassLoader, QueryExp.class); -+ queryValue = unwrap(query, defaultContextClassLoader, QueryExp.class); - - try { - final Object params[] = new Object[] { name, queryValue }; -@@ -542,7 +577,7 @@ - "connectionId=" + connectionId - +" unwrapping query with defaultClassLoader."); - -- queryValue = unwrap(query, defaultClassLoader, QueryExp.class); -+ queryValue = unwrap(query, defaultContextClassLoader, QueryExp.class); - - try { - final Object params[] = new Object[] { name, queryValue }; -@@ -1330,7 +1365,9 @@ - public ClassLoader run() throws InstanceNotFoundException { - return mbeanServer.getClassLoader(name); - } -- }); -+ }, -+ withPermissions(new MBeanPermission("*", "getClassLoader")) -+ ); - } catch (PrivilegedActionException pe) { - throw (InstanceNotFoundException) extractException(pe); - } -@@ -1345,7 +1382,9 @@ - public Object run() throws InstanceNotFoundException { - return mbeanServer.getClassLoaderFor(name); - } -- }); -+ }, -+ withPermissions(new MBeanPermission("*", "getClassLoaderFor")) -+ ); - } catch (PrivilegedActionException pe) { - throw (InstanceNotFoundException) extractException(pe); - } -@@ -1572,7 +1611,8 @@ - ClassLoader orderCL = AccessController.doPrivileged( - new PrivilegedExceptionAction<ClassLoader>() { - public ClassLoader run() throws Exception { -- return new OrderClassLoaders(cl1, cl2); -+ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), -+ new OrderClassLoaders(cl1, cl2)); - } - } - ); -@@ -1664,6 +1704,8 @@ - - private final ClassLoader defaultClassLoader; - -+ private final ClassLoader defaultContextClassLoader; -+ - private final ClassLoaderWithRepository classLoaderWithRepository; - - private boolean terminated = false; -@@ -1746,4 +1788,43 @@ - - private static final ClassLogger logger = - new ClassLogger("javax.management.remote.rmi", "RMIConnectionImpl"); -+ -+ private static final class CombinedClassLoader extends ClassLoader { -+ -+ private final static class ClassLoaderWrapper extends ClassLoader { -+ ClassLoaderWrapper(ClassLoader cl) { -+ super(cl); -+ } -+ -+ @Override -+ protected Class<?> loadClass(String name, boolean resolve) -+ throws ClassNotFoundException { -+ return super.loadClass(name, resolve); -+ } -+ }; -+ -+ final ClassLoaderWrapper defaultCL; -+ -+ private CombinedClassLoader(ClassLoader parent, ClassLoader defaultCL) { -+ super(parent); -+ this.defaultCL = new ClassLoaderWrapper(defaultCL); -+ } -+ -+ @Override -+ protected Class<?> loadClass(String name, boolean resolve) -+ throws ClassNotFoundException { -+ try { -+ super.loadClass(name, resolve); -+ } catch(Exception e) { -+ for(Throwable t = e; t != null; t = t.getCause()) { -+ if(t instanceof SecurityException) { -+ throw t==e?(SecurityException)t:new SecurityException(t.getMessage(), e); -+ } -+ } -+ } -+ final Class<?> cl = defaultCL.loadClass(name, resolve); -+ return cl; -+ } -+ -+ } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/javax/management/remote/rmi/RMIConnector.java ---- jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java Sun Sep 23 23:43:31 2012 +0400 -@@ -277,9 +277,9 @@ - // Check for secure RMIServer stub if the corresponding - // client-side environment property is set to "true". - // -- boolean checkStub = EnvHelp.computeBooleanFromString( -- usemap, -- "jmx.remote.x.check.stub",false); -+ String stringBoolean = (String) usemap.get("jmx.remote.x.check.stub"); -+ boolean checkStub = EnvHelp.computeBooleanFromString(stringBoolean); -+ - if (checkStub) checkStub(stub, rmiServerImplStubClass); - - // Connect IIOP Stub if needed. -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java ---- jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -412,9 +412,8 @@ - if (tracing) - logger.trace("start", "Using external directory: " + jndiUrl); - -- final boolean rebind = EnvHelp.computeBooleanFromString( -- attributes, -- JNDI_REBIND_ATTRIBUTE,false); -+ String stringBoolean = (String) attributes.get(JNDI_REBIND_ATTRIBUTE); -+ final boolean rebind = EnvHelp.computeBooleanFromString( stringBoolean ); - - if (tracing) - logger.trace("start", JNDI_REBIND_ATTRIBUTE + "=" + rebind); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/javax/swing/ClientPropertyKey.java ---- jdk/src/share/classes/javax/swing/ClientPropertyKey.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/javax/swing/ClientPropertyKey.java Sun Sep 23 23:43:31 2012 +0400 -@@ -25,6 +25,8 @@ - - package javax.swing; - -+import sun.awt.AWTAccessor; -+ - /** - * An enumeration for keys used as client properties within the Swing - * implementation. -@@ -86,6 +88,15 @@ - */ - private final boolean reportValueNotSerializable; - -+ static { -+ AWTAccessor.setClientPropertyKeyAccessor( -+ new AWTAccessor.ClientPropertyKeyAccessor() { -+ public Object getJComponent_TRANSFER_HANDLER() { -+ return JComponent_TRANSFER_HANDLER; -+ } -+ }); -+ } -+ - /** - * Constructs a key with the {@code reportValueNotSerializable} property - * set to {@code false}. -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/javax/swing/text/DefaultFormatter.java ---- jdk/src/share/classes/javax/swing/text/DefaultFormatter.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/javax/swing/text/DefaultFormatter.java Sun Sep 23 23:43:31 2012 +0400 -@@ -24,6 +24,8 @@ - */ - package javax.swing.text; - -+import sun.reflect.misc.ConstructorUtil; -+ - import java.io.Serializable; - import java.lang.reflect.*; - import java.text.ParseException; -@@ -245,7 +247,7 @@ - Constructor cons; - - try { -- cons = vc.getConstructor(new Class[] { String.class }); -+ cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class}); - - } catch (NoSuchMethodException nsme) { - cons = null; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/awt/AWTAccessor.java ---- jdk/src/share/classes/sun/awt/AWTAccessor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/awt/AWTAccessor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -27,17 +27,18 @@ - - import java.awt.*; - import java.awt.KeyboardFocusManager; -+import java.awt.DefaultKeyboardFocusManager; - import java.awt.event.InputEvent; -+import java.awt.event.KeyEvent; - import java.awt.geom.Point2D; --import java.awt.image.BufferedImage; - - import sun.misc.Unsafe; - import java.awt.peer.ComponentPeer; - --import java.security.AccessController; - import java.security.AccessControlContext; - - import java.io.File; -+import java.util.Vector; - - /** - * The AWTAccessor utility class. -@@ -317,7 +318,7 @@ - void setTrayIconWindow(Window w, boolean isTrayIconWindow); - } - -- /* -+ /** - * An accessor for the AWTEvent class. - */ - public interface AWTEventAccessor { -@@ -337,12 +338,20 @@ - */ - boolean isSystemGenerated(AWTEvent ev); - -- -- /* -+ /** - * Returns the acc this event was constructed with. - */ - AccessControlContext getAccessControlContext(AWTEvent ev); - -+ /** -+ * Returns binary data associated with this event; -+ */ -+ byte[] getBData(AWTEvent ev); -+ -+ /** -+ * Associates binary data with this event; -+ */ -+ void setBData(AWTEvent ev, byte[] bdata); - } - - public interface InputEventAccessor { -@@ -370,11 +379,11 @@ - Rectangle getMaximizedBounds(Frame frame); - } - -- /* -+ /** - * An interface of accessor for the java.awt.KeyboardFocusManager class. - */ - public interface KeyboardFocusManagerAccessor { -- /* -+ /** - * Indicates whether the native implementation should - * proceed with a pending focus request for the heavyweight. - */ -@@ -384,7 +393,7 @@ - boolean focusedWindowChangeAllowed, - long time, - CausedFocusEvent.Cause cause); -- /* -+ /** - * Delivers focus for the lightweight descendant of the heavyweight - * synchronously. - */ -@@ -393,23 +402,28 @@ - boolean temporary, - boolean focusedWindowChangeAllowed, - long time); -- /* -+ /** - * Removes the last focus request for the heavyweight from the queue. - */ - void removeLastFocusRequest(Component heavyweight); - -- /* -+ /** - * Sets the most recent focus owner in the window. - */ - void setMostRecentFocusOwner(Window window, Component component); - -- /* -+ /** - * Returns current KFM of the specified AppContext. - */ - KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx); -+ -+ /** -+ * Return the current focus cycle root -+ */ -+ Container getCurrentFocusCycleRoot(); - } - -- /* -+ /** - * An accessor for the MenuComponent class. - */ - public interface MenuComponentAccessor { -@@ -427,20 +441,42 @@ - * Returns the menu container of the menu component - */ - MenuContainer getParent(MenuComponent menuComp); -+ -+ /** -+ * Gets the font used for this menu component. -+ */ -+ Font getFont_NoClientCode(MenuComponent menuComp); - } - -- /* -+ /** - * An accessor for the EventQueue class - */ - public interface EventQueueAccessor { -- /* -+ /** - * Gets the event dispatch thread. - */ - Thread getDispatchThread(EventQueue eventQueue); -- /* -+ -+ /** - * Checks if the current thread is EDT for the given EQ. - */ - public boolean isDispatchThreadImpl(EventQueue eventQueue); -+ -+ /** -+ * Removes any pending events for the specified source object. -+ */ -+ void removeSourceEvents(EventQueue eventQueue, Object source, boolean removeAllEvents); -+ -+ /** -+ * Returns whether an event is pending on any of the separate Queues. -+ */ -+ boolean noEvents(EventQueue eventQueue); -+ -+ /** -+ * Called from PostEventQueue.postEvent to notify that a new event -+ * appeared. -+ */ -+ void wakeup(EventQueue eventQueue, boolean isShutdown); - } - - /* -@@ -478,6 +514,159 @@ - boolean isMultipleMode(FileDialog fileDialog); - } - -+ /** -+ * An accessor for the ScrollPaneAdjustable class. -+ */ -+ public interface ScrollPaneAdjustableAccessor { -+ /** -+ * Sets the value of this scrollbar to the specified value. -+ */ -+ void setTypedValue(final ScrollPaneAdjustable adj, final int v, -+ final int type); -+ } -+ -+ /** -+ * An accessor for the CheckboxMenuItem class -+ */ -+ public interface CheckboxMenuItemAccessor { -+ /** -+ * Returns whether menu item is checked -+ */ -+ boolean getState(CheckboxMenuItem cmi); -+ } -+ -+ /** -+ * An accessor for the Cursor class -+ */ -+ public interface CursorAccessor { -+ /** -+ * Returns pData of the Cursor class -+ */ -+ long getPData(Cursor cursor); -+ -+ /** -+ * Sets pData to the Cursor class -+ */ -+ void setPData(Cursor cursor, long pData); -+ -+ /** -+ * Return type of the Cursor class -+ */ -+ int getType(Cursor cursor); -+ } -+ -+ /** -+ * An accessor for the MenuBar class -+ */ -+ public interface MenuBarAccessor { -+ /** -+ * Returns help menu -+ */ -+ Menu getHelpMenu(MenuBar menuBar); -+ -+ /** -+ * Returns menus -+ */ -+ Vector getMenus(MenuBar menuBar); -+ } -+ -+ /** -+ * An accessor for the MenuItem class -+ */ -+ public interface MenuItemAccessor { -+ /** -+ * Returns whether menu item is enabled -+ */ -+ boolean isEnabled(MenuItem item); -+ -+ /** -+ * Gets the command name of the action event that is fired -+ * by this menu item. -+ */ -+ String getActionCommandImpl(MenuItem item); -+ -+ /** -+ * Returns true if the item and all its ancestors are -+ * enabled, false otherwise -+ */ -+ boolean isItemEnabled(MenuItem item); -+ -+ /** -+ * Returns label -+ */ -+ String getLabel(MenuItem item); -+ -+ /** -+ * Returns shortcut -+ */ -+ MenuShortcut getShortcut(MenuItem item); -+ } -+ -+ /** -+ * An accessor for the Menu class -+ */ -+ public interface MenuAccessor { -+ /** -+ * Returns vector of the items that are part of the Menu -+ */ -+ Vector getItems(Menu menu); -+ } -+ -+ /** -+ * An accessor for the KeyEvent class -+ */ -+ public interface KeyEventAccessor { -+ /** -+ * Sets rawCode field for KeyEvent -+ */ -+ void setRawCode(KeyEvent ev, long rawCode); -+ -+ /** -+ * Sets primaryLevelUnicode field for KeyEvent -+ */ -+ void setPrimaryLevelUnicode(KeyEvent ev, long primaryLevelUnicode); -+ -+ /** -+ * Sets extendedKeyCode field for KeyEvent -+ */ -+ void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode); -+ } -+ -+ /** -+ * An accessor for the ClientPropertyKey class -+ */ -+ public interface ClientPropertyKeyAccessor { -+ /** -+ * Retrieves JComponent_TRANSFER_HANDLER enum object -+ */ -+ Object getJComponent_TRANSFER_HANDLER(); -+ } -+ -+ /** -+ * An accessor for the SystemTray class -+ */ -+ public interface SystemTrayAccessor { -+ /** -+ * Support for reporting bound property changes for Object properties. -+ */ -+ void firePropertyChange(SystemTray tray, String propertyName, Object oldValue, Object newValue); -+ } -+ -+ /** -+ * An accessor for the TrayIcon class -+ */ -+ public interface TrayIconAccessor { -+ void addNotify(TrayIcon trayIcon) throws AWTException; -+ void removeNotify(TrayIcon trayIcon); -+ } -+ -+ /** -+ * An accessor for the DefaultKeyboardFocusManager class -+ */ -+ public interface DefaultKeyboardFocusManagerAccessor { -+ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e); -+ } -+ - /* - * Accessor instances are initialized in the static initializers of - * corresponding AWT classes by using setters defined below. -@@ -493,6 +682,17 @@ - private static EventQueueAccessor eventQueueAccessor; - private static PopupMenuAccessor popupMenuAccessor; - private static FileDialogAccessor fileDialogAccessor; -+ private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor; -+ private static CheckboxMenuItemAccessor checkboxMenuItemAccessor; -+ private static CursorAccessor cursorAccessor; -+ private static MenuBarAccessor menuBarAccessor; -+ private static MenuItemAccessor menuItemAccessor; -+ private static MenuAccessor menuAccessor; -+ private static KeyEventAccessor keyEventAccessor; -+ private static ClientPropertyKeyAccessor clientPropertyKeyAccessor; -+ private static SystemTrayAccessor systemTrayAccessor; -+ private static TrayIconAccessor trayIconAccessor; -+ private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor; - - /* - * Set an accessor object for the java.awt.Component class. -@@ -683,4 +883,192 @@ - return fileDialogAccessor; - } - -+ /** -+ * Set an accessor object for the java.awt.ScrollPaneAdjustable class. -+ */ -+ public static void setScrollPaneAdjustableAccessor(ScrollPaneAdjustableAccessor adj) { -+ scrollPaneAdjustableAccessor = adj; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.ScrollPaneAdjustable -+ * class. -+ */ -+ public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() { -+ if (scrollPaneAdjustableAccessor == null) { -+ unsafe.ensureClassInitialized(ScrollPaneAdjustable.class); -+ } -+ return scrollPaneAdjustableAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.CheckboxMenuItem class. -+ */ -+ public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) { -+ checkboxMenuItemAccessor = cmia; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.CheckboxMenuItem class. -+ */ -+ public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() { -+ if (checkboxMenuItemAccessor == null) { -+ unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class); -+ } -+ return checkboxMenuItemAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.Cursor class. -+ */ -+ public static void setCursorAccessor(CursorAccessor ca) { -+ cursorAccessor = ca; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.Cursor class. -+ */ -+ public static CursorAccessor getCursorAccessor() { -+ if (cursorAccessor == null) { -+ unsafe.ensureClassInitialized(CursorAccessor.class); -+ } -+ return cursorAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.MenuBar class. -+ */ -+ public static void setMenuBarAccessor(MenuBarAccessor mba) { -+ menuBarAccessor = mba; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.MenuBar class. -+ */ -+ public static MenuBarAccessor getMenuBarAccessor() { -+ if (menuBarAccessor == null) { -+ unsafe.ensureClassInitialized(MenuBarAccessor.class); -+ } -+ return menuBarAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.MenuItem class. -+ */ -+ public static void setMenuItemAccessor(MenuItemAccessor mia) { -+ menuItemAccessor = mia; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.MenuItem class. -+ */ -+ public static MenuItemAccessor getMenuItemAccessor() { -+ if (menuItemAccessor == null) { -+ unsafe.ensureClassInitialized(MenuItemAccessor.class); -+ } -+ return menuItemAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.Menu class. -+ */ -+ public static void setMenuAccessor(MenuAccessor ma) { -+ menuAccessor = ma; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.Menu class. -+ */ -+ public static MenuAccessor getMenuAccessor() { -+ if (menuAccessor == null) { -+ unsafe.ensureClassInitialized(MenuAccessor.class); -+ } -+ return menuAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.event.KeyEvent class. -+ */ -+ public static void setKeyEventAccessor(KeyEventAccessor kea) { -+ keyEventAccessor = kea; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.event.KeyEvent class. -+ */ -+ public static KeyEventAccessor getKeyEventAccessor() { -+ if (keyEventAccessor == null) { -+ unsafe.ensureClassInitialized(KeyEventAccessor.class); -+ } -+ return keyEventAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the javax.swing.ClientPropertyKey class. -+ */ -+ public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) { -+ clientPropertyKeyAccessor = cpka; -+ } -+ -+ /** -+ * Retrieve the accessor object for the javax.swing.ClientPropertyKey class. -+ */ -+ public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() { -+ if (clientPropertyKeyAccessor == null) { -+ unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class); -+ } -+ return clientPropertyKeyAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.SystemTray class. -+ */ -+ public static void setSystemTrayAccessor(SystemTrayAccessor sta) { -+ systemTrayAccessor = sta; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.SystemTray class. -+ */ -+ public static SystemTrayAccessor getSystemTrayAccessor() { -+ if (systemTrayAccessor == null) { -+ unsafe.ensureClassInitialized(SystemTrayAccessor.class); -+ } -+ return systemTrayAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.TrayIcon class. -+ */ -+ public static void setTrayIconAccessor(TrayIconAccessor tia) { -+ trayIconAccessor = tia; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.TrayIcon class. -+ */ -+ public static TrayIconAccessor getTrayIconAccessor() { -+ if (trayIconAccessor == null) { -+ unsafe.ensureClassInitialized(TrayIconAccessor.class); -+ } -+ return trayIconAccessor; -+ } -+ -+ /** -+ * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class. -+ */ -+ public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) { -+ defaultKeyboardFocusManagerAccessor = dkfma; -+ } -+ -+ /** -+ * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class. -+ */ -+ public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() { -+ if (defaultKeyboardFocusManagerAccessor == null) { -+ unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class); -+ } -+ return defaultKeyboardFocusManagerAccessor; -+ } -+ - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/awt/AppContext.java ---- jdk/src/share/classes/sun/awt/AppContext.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/awt/AppContext.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2012, 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 -@@ -787,6 +787,27 @@ - } - return changeSupport.getPropertyChangeListeners(propertyName); - } -+ -+ // Set up JavaAWTAccess in SharedSecrets -+ static { -+ sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() { -+ public Object get(Object key) { -+ return getAppContext().get(key); -+ } -+ public void put(Object key, Object value) { -+ getAppContext().put(key, value); -+ } -+ public void remove(Object key) { -+ getAppContext().remove(key); -+ } -+ public boolean isDisposed() { -+ return getAppContext().isDisposed(); -+ } -+ public boolean isMainAppContext() { -+ return (numAppContexts == 1); -+ } -+ }); -+ } - } - - final class MostRecentKeyValue { -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/awt/EmbeddedFrame.java ---- jdk/src/share/classes/sun/awt/EmbeddedFrame.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/awt/EmbeddedFrame.java Sun Sep 23 23:43:31 2012 +0400 -@@ -29,12 +29,6 @@ - import java.awt.event.*; - import java.awt.image.*; - import java.awt.peer.*; --import java.security.AccessController; --import java.security.PrivilegedAction; --import java.lang.reflect.Constructor; --import java.lang.reflect.InvocationTargetException; --import java.lang.reflect.Modifier; --import java.lang.reflect.Field; - import java.beans.PropertyChangeListener; - import java.beans.PropertyChangeEvent; - import java.util.Set; -@@ -63,8 +57,6 @@ - implements KeyEventDispatcher, PropertyChangeListener { - - private boolean isCursorAllowed = true; -- private static Field fieldPeer; -- private static Field currentCycleRoot; - private boolean supportsXEmbed = false; - private KeyboardFocusManager appletKFM; - // JDK 1.1 compatibility -@@ -208,39 +200,8 @@ - */ - public boolean dispatchKeyEvent(KeyEvent e) { - -- // We can't guarantee that this is called on the same AppContext as EmbeddedFrame -- // belongs to. That's why we can't use public methods to find current focus cycle -- // root. Instead, we access KFM's private field directly. -- if (currentCycleRoot == null) { -- currentCycleRoot = (Field)AccessController.doPrivileged(new PrivilegedAction() { -- public Object run() { -- try { -- Field unaccessibleRoot = KeyboardFocusManager.class. -- getDeclaredField("currentFocusCycleRoot"); -- if (unaccessibleRoot != null) { -- unaccessibleRoot.setAccessible(true); -- } -- return unaccessibleRoot; -- } catch (NoSuchFieldException e1) { -- assert false; -- } catch (SecurityException e2) { -- assert false; -- } -- return null; -- } -- }); -- } -- -- Container currentRoot = null; -- if (currentCycleRoot != null) { -- try { -- // The field is static, so we can pass null to Field.get() as the argument. -- currentRoot = (Container)currentCycleRoot.get(null); -- } catch (IllegalAccessException e3) { -- // This is impossible: currentCycleRoot would be null if setAccessible failed. -- assert false; -- } -- } -+ Container currentRoot = AWTAccessor.getKeyboardFocusManagerAccessor() -+ .getCurrentFocusCycleRoot(); - - // if we are not in EmbeddedFrame's cycle, we should not try to leave. - if (this != currentRoot) { -@@ -381,32 +342,8 @@ - } - - protected void setPeer(final ComponentPeer p){ -- if (fieldPeer == null) { -- fieldPeer = (Field)AccessController.doPrivileged(new PrivilegedAction() { -- public Object run() { -- try { -- Field lnkPeer = Component.class.getDeclaredField("peer"); -- if (lnkPeer != null) { -- lnkPeer.setAccessible(true); -- } -- return lnkPeer; -- } catch (NoSuchFieldException e) { -- assert false; -- } catch (SecurityException e) { -- assert false; -- } -- return null; -- }//run -- }); -- } -- try{ -- if (fieldPeer !=null){ -- fieldPeer.set(EmbeddedFrame.this, p); -- } -- } catch (IllegalAccessException e) { -- assert false; -- } -- }; //setPeer method ends -+ AWTAccessor.getComponentAccessor().setPeer(EmbeddedFrame.this, p); -+ }; - - /** - * Synthesize native message to activate or deactivate EmbeddedFrame window -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/awt/SunToolkit.java ---- jdk/src/share/classes/sun/awt/SunToolkit.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/awt/SunToolkit.java Sun Sep 23 23:43:31 2012 +0400 -@@ -51,14 +51,8 @@ - import sun.awt.image.*; - import sun.security.action.GetPropertyAction; - import sun.security.action.GetBooleanAction; --import java.lang.reflect.Field; --import java.lang.reflect.Method; --import java.lang.reflect.Constructor; - import java.lang.reflect.InvocationTargetException; - import java.security.AccessController; --import java.security.PrivilegedAction; --import java.security.PrivilegedActionException; --import java.security.PrivilegedExceptionAction; - - public abstract class SunToolkit extends Toolkit - implements WindowClosingSupport, WindowClosingListener, -@@ -80,7 +74,6 @@ - */ - public static final int GRAB_EVENT_MASK = 0x80000000; - -- private static Method wakeupMethod; - /* The key to put()/get() the PostEventQueue into/from the AppContext. - */ - private static final String POST_EVENT_QUEUE_KEY = "PostEventQueue"; -@@ -294,52 +287,8 @@ - return appContext; - } - -- public static Field getField(final Class klass, final String fieldName) { -- return AccessController.doPrivileged(new PrivilegedAction<Field>() { -- public Field run() { -- try { -- Field field = klass.getDeclaredField(fieldName); -- assert (field != null); -- field.setAccessible(true); -- return field; -- } catch (SecurityException e) { -- assert false; -- } catch (NoSuchFieldException e) { -- assert false; -- } -- return null; -- }//run -- }); -- } -- - static void wakeupEventQueue(EventQueue q, boolean isShutdown){ -- if (wakeupMethod == null){ -- wakeupMethod = (Method)AccessController.doPrivileged(new PrivilegedAction(){ -- public Object run(){ -- try { -- Method method = EventQueue.class.getDeclaredMethod("wakeup",new Class [] {Boolean.TYPE} ); -- if (method != null) { -- method.setAccessible(true); -- } -- return method; -- } catch (NoSuchMethodException e) { -- assert false; -- } catch (SecurityException e) { -- assert false; -- } -- return null; -- }//run -- }); -- } -- try{ -- if (wakeupMethod != null){ -- wakeupMethod.invoke(q, new Object[]{Boolean.valueOf(isShutdown)}); -- } -- } catch (InvocationTargetException e){ -- assert false; -- } catch (IllegalAccessException e) { -- assert false; -- } -+ AWTAccessor.getEventQueueAccessor().wakeup(q, isShutdown); - } - - /* -@@ -1455,22 +1404,6 @@ - || comp instanceof Window); - } - -- public static Method getMethod(final Class clz, final String methodName, final Class[] params) { -- Method res = null; -- try { -- res = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() { -- public Method run() throws Exception { -- Method m = clz.getDeclaredMethod(methodName, params); -- m.setAccessible(true); -- return m; -- } -- }); -- } catch (PrivilegedActionException ex) { -- ex.printStackTrace(); -- } -- return res; -- } -- - public static class OperationTimedOut extends RuntimeException { - public OperationTimedOut(String msg) { - super(msg); -@@ -1613,21 +1546,9 @@ - private boolean queueEmpty = false; - private final Object waitLock = "Wait Lock"; - -- static Method eqNoEvents; -- - private boolean isEQEmpty() { - EventQueue queue = getSystemEventQueueImpl(); -- synchronized(SunToolkit.class) { -- if (eqNoEvents == null) { -- eqNoEvents = getMethod(java.awt.EventQueue.class, "noEvents", null); -- } -- } -- try { -- return (Boolean)eqNoEvents.invoke(queue); -- } catch (Exception e) { -- e.printStackTrace(); -- return false; -- } -+ return AWTAccessor.getEventQueueAccessor().noEvents(queue); - } - - /** -@@ -1882,20 +1803,14 @@ - * consumeNextKeyTyped() method is not currently used, - * however Swing could use it in the future. - */ -- private static Method consumeNextKeyTypedMethod = null; - public static synchronized void consumeNextKeyTyped(KeyEvent keyEvent) { -- if (consumeNextKeyTypedMethod == null) { -- consumeNextKeyTypedMethod = getMethod(DefaultKeyboardFocusManager.class, -- "consumeNextKeyTyped", -- new Class[] {KeyEvent.class}); -- } - try { -- consumeNextKeyTypedMethod.invoke(KeyboardFocusManager.getCurrentKeyboardFocusManager(), -- keyEvent); -- } catch (IllegalAccessException iae) { -- iae.printStackTrace(); -- } catch (InvocationTargetException ite) { -- ite.printStackTrace(); -+ AWTAccessor.getDefaultKeyboardFocusManagerAccessor().consumeNextKeyTyped( -+ (DefaultKeyboardFocusManager)KeyboardFocusManager. -+ getCurrentKeyboardFocusManager(), -+ keyEvent); -+ } catch (ClassCastException cce) { -+ cce.printStackTrace(); - } - } - -@@ -1915,25 +1830,6 @@ - return (Window)comp; - } - -- /** -- * Returns the value of the system property indicated by the specified key. -- */ -- public static String getSystemProperty(final String key) { -- return (String)AccessController.doPrivileged(new PrivilegedAction() { -- public Object run() { -- return System.getProperty(key); -- } -- }); -- } -- -- /** -- * Returns the boolean value of the system property indicated by the specified key. -- */ -- protected static Boolean getBooleanSystemProperty(String key) { -- return Boolean.valueOf(AccessController. -- doPrivileged(new GetBooleanAction(key))); -- } -- - private static Boolean sunAwtDisableMixing = null; - - /** -@@ -1942,7 +1838,8 @@ - */ - public synchronized static boolean getSunAwtDisableMixing() { - if (sunAwtDisableMixing == null) { -- sunAwtDisableMixing = getBooleanSystemProperty("sun.awt.disableMixing"); -+ sunAwtDisableMixing = AccessController.doPrivileged( -+ new GetBooleanAction("sun.awt.disableMixing")); - } - return sunAwtDisableMixing.booleanValue(); - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/BooleanEditor.java ---- jdk/src/share/classes/sun/beans/editors/BooleanEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/BooleanEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,51 +26,7 @@ - package sun.beans.editors; - - /** -- * Property editor for a java builtin "boolean" type. -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class BooleanEditor extends PropertyEditorSupport { -- -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- return (value != null) -- ? value.toString() -- : "null"; -- } -- -- public String getAsText() { -- Object value = getValue(); -- return (value instanceof Boolean) -- ? getValidName((Boolean) value) -- : null; -- } -- -- public void setAsText(String text) throws java.lang.IllegalArgumentException { -- if (text == null) { -- setValue(null); -- } else if (isValidName(true, text)) { -- setValue(Boolean.TRUE); -- } else if (isValidName(false, text)) { -- setValue(Boolean.FALSE); -- } else { -- throw new java.lang.IllegalArgumentException(text); -- } -- } -- -- public String[] getTags() { -- return new String[] {getValidName(true), getValidName(false)}; -- } -- -- // the following method should be localized (4890258) -- -- private String getValidName(boolean value) { -- return value ? "True" : "False"; -- } -- -- private boolean isValidName(boolean value, String name) { -- return getValidName(value).equalsIgnoreCase(name); -- } -+public class BooleanEditor extends com.sun.beans.editors.BooleanEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/ByteEditor.java ---- jdk/src/share/classes/sun/beans/editors/ByteEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/ByteEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,23 +26,7 @@ - package sun.beans.editors; - - /** -- * Property editor for a java builtin "byte" type. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class ByteEditor extends NumberEditor { -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- return (value != null) -- ? "((byte)" + value + ")" -- : "null"; -- } -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Byte.decode(text)); -- } -- -+public class ByteEditor extends com.sun.beans.editors.ByteEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/ColorEditor.java ---- jdk/src/share/classes/sun/beans/editors/ColorEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/ColorEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -25,190 +25,8 @@ - - package sun.beans.editors; - --import java.awt.*; --import java.beans.*; -- --public class ColorEditor extends Panel implements PropertyEditor { -- private static final long serialVersionUID = 1781257185164716054L; -- -- public ColorEditor() { -- setLayout(null); -- -- ourWidth = hPad; -- -- // Create a sample color block bordered in black -- Panel p = new Panel(); -- p.setLayout(null); -- p.setBackground(Color.black); -- sample = new Canvas(); -- p.add(sample); -- sample.reshape(2, 2, sampleWidth, sampleHeight); -- add(p); -- p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4); -- ourWidth += sampleWidth + 4 + hPad; -- -- text = new TextField("", 14); -- add(text); -- text.reshape(ourWidth,0,100,30); -- ourWidth += 100 + hPad; -- -- choser = new Choice(); -- int active = 0; -- for (int i = 0; i < colorNames.length; i++) { -- choser.addItem(colorNames[i]); -- } -- add(choser); -- choser.reshape(ourWidth,0,100,30); -- ourWidth += 100 + hPad; -- -- resize(ourWidth,40); -- } -- -- public void setValue(Object o) { -- Color c = (Color)o; -- changeColor(c); -- } -- -- public Dimension preferredSize() { -- return new Dimension(ourWidth, 40); -- } -- -- public boolean keyUp(Event e, int key) { -- if (e.target == text) { -- try { -- setAsText(text.getText()); -- } catch (IllegalArgumentException ex) { -- // Quietly ignore. -- } -- } -- return (false); -- } -- -- public void setAsText(String s) throws java.lang.IllegalArgumentException { -- if (s == null) { -- changeColor(null); -- return; -- } -- int c1 = s.indexOf(','); -- int c2 = s.indexOf(',', c1+1); -- if (c1 < 0 || c2 < 0) { -- // Invalid string. -- throw new IllegalArgumentException(s); -- } -- try { -- int r = Integer.parseInt(s.substring(0,c1)); -- int g = Integer.parseInt(s.substring(c1+1, c2)); -- int b = Integer.parseInt(s.substring(c2+1)); -- Color c = new Color(r,g,b); -- changeColor(c); -- } catch (Exception ex) { -- throw new IllegalArgumentException(s); -- } -- -- } -- -- public boolean action(Event e, Object arg) { -- if (e.target == choser) { -- changeColor(colors[choser.getSelectedIndex()]); -- } -- return false; -- } -- -- public String getJavaInitializationString() { -- return (this.color != null) -- ? "new java.awt.Color(" + this.color.getRGB() + ",true)" -- : "null"; -- } -- -- -- private void changeColor(Color c) { -- -- if (c == null) { -- this.color = null; -- this.text.setText(""); -- return; -- } -- -- color = c; -- -- text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue()); -- -- int active = 0; -- for (int i = 0; i < colorNames.length; i++) { -- if (color.equals(colors[i])) { -- active = i; -- } -- } -- choser.select(active); -- -- sample.setBackground(color); -- sample.repaint(); -- -- support.firePropertyChange("", null, null); -- } -- -- public Object getValue() { -- return color; -- } -- -- public boolean isPaintable() { -- return true; -- } -- -- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { -- Color oldColor = gfx.getColor(); -- gfx.setColor(Color.black); -- gfx.drawRect(box.x, box.y, box.width-3, box.height-3); -- gfx.setColor(color); -- gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4); -- gfx.setColor(oldColor); -- } -- -- public String getAsText() { -- return (this.color != null) -- ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue() -- : null; -- } -- -- public String[] getTags() { -- return null; -- } -- -- public java.awt.Component getCustomEditor() { -- return this; -- } -- -- public boolean supportsCustomEditor() { -- return true; -- } -- -- public void addPropertyChangeListener(PropertyChangeListener l) { -- support.addPropertyChangeListener(l); -- } -- -- public void removePropertyChangeListener(PropertyChangeListener l) { -- support.removePropertyChangeListener(l); -- } -- -- -- private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray", -- "black", "red", "pink", "orange", -- "yellow", "green", "magenta", "cyan", -- "blue"}; -- private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray, -- Color.black, Color.red, Color.pink, Color.orange, -- Color.yellow, Color.green, Color.magenta, Color.cyan, -- Color.blue}; -- -- private Canvas sample; -- private int sampleHeight = 20; -- private int sampleWidth = 40; -- private int hPad = 5; -- private int ourWidth; -- -- private Color color; -- private TextField text; -- private Choice choser; -- -- private PropertyChangeSupport support = new PropertyChangeSupport(this); -+/** -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. -+ */ -+public class ColorEditor extends com.sun.beans.editors.ColorEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/DoubleEditor.java ---- jdk/src/share/classes/sun/beans/editors/DoubleEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/DoubleEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,16 +26,7 @@ - package sun.beans.editors; - - /** -- * Property editor for a java builtin "double" type. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class DoubleEditor extends NumberEditor { -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Double.valueOf(text)); -- } -- -+public class DoubleEditor extends com.sun.beans.editors.DoubleEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/EnumEditor.java ---- jdk/src/share/classes/sun/beans/editors/EnumEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/EnumEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -22,122 +22,14 @@ - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -+ - package sun.beans.editors; - --import java.awt.Component; --import java.awt.Graphics; --import java.awt.Rectangle; --import java.beans.PropertyChangeEvent; --import java.beans.PropertyChangeListener; --import java.beans.PropertyEditor; --import java.util.ArrayList; --import java.util.List; -- - /** -- * Property editor for java.lang.Enum subclasses. -- * -- * @see PropertyEditor -- * -- * @since 1.7 -- * -- * @author Sergey A. Malenkov -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ --public final class EnumEditor implements PropertyEditor { -- private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); -- -- private final Class type; -- private final String[] tags; -- -- private Object value; -- -- public EnumEditor( Class type ) { -- Object[] values = type.getEnumConstants(); -- if ( values == null ) { -- throw new IllegalArgumentException( "Unsupported " + type ); -- } -- this.type = type; -- this.tags = new String[values.length]; -- for ( int i = 0; i < values.length; i++ ) { -- this.tags[i] = ( ( Enum )values[i] ).name(); -- } -- } -- -- public Object getValue() { -- return this.value; -- } -- -- public void setValue( Object value ) { -- if ( ( value != null ) && !this.type.isInstance( value ) ) { -- throw new IllegalArgumentException( "Unsupported value: " + value ); -- } -- Object oldValue; -- PropertyChangeListener[] listeners; -- synchronized ( this.listeners ) { -- oldValue = this.value; -- this.value = value; -- -- if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) { -- return; // do not fire event if value is not changed -- } -- int size = this.listeners.size(); -- if ( size == 0 ) { -- return; // do not fire event if there are no any listener -- } -- listeners = this.listeners.toArray( new PropertyChangeListener[size] ); -- } -- PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value ); -- for ( PropertyChangeListener listener : listeners ) { -- listener.propertyChange( event ); -- } -- } -- -- public String getAsText() { -- return ( this.value != null ) -- ? ( ( Enum )this.value ).name() -- : null; -- } -- -- public void setAsText( String text ) { -- setValue( ( text != null ) -- ? Enum.valueOf( this.type, text ) -- : null ); -- } -- -- public String[] getTags() { -- return this.tags.clone(); -- } -- -- public String getJavaInitializationString() { -- String name = getAsText(); -- return ( name != null ) -- ? this.type.getName() + '.' + name -- : "null"; -- } -- -- public boolean isPaintable() { -- return false; -- } -- -- public void paintValue( Graphics gfx, Rectangle box ) { -- } -- -- public boolean supportsCustomEditor() { -- return false; -- } -- -- public Component getCustomEditor() { -- return null; -- } -- -- public void addPropertyChangeListener( PropertyChangeListener listener ) { -- synchronized ( this.listeners ) { -- this.listeners.add( listener ); -- } -- } -- -- public void removePropertyChangeListener( PropertyChangeListener listener ) { -- synchronized ( this.listeners ) { -- this.listeners.remove( listener ); -- } -+public class EnumEditor extends com.sun.beans.editors.EnumEditor { -+ public EnumEditor(Class type) { -+ super(type); - } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/FloatEditor.java ---- jdk/src/share/classes/sun/beans/editors/FloatEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/FloatEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,23 +26,7 @@ - package sun.beans.editors; - - /** -- * Property editor for a java builtin "float" type. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class FloatEditor extends NumberEditor { -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- return (value != null) -- ? value + "F" -- : "null"; -- } -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Float.valueOf(text)); -- } -- -+public class FloatEditor extends com.sun.beans.editors.FloatEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/FontEditor.java ---- jdk/src/share/classes/sun/beans/editors/FontEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/FontEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -25,195 +25,8 @@ - - package sun.beans.editors; - --import java.awt.*; --import java.beans.*; -- --public class FontEditor extends Panel implements java.beans.PropertyEditor { -- private static final long serialVersionUID = 6732704486002715933L; -- -- public FontEditor() { -- setLayout(null); -- -- toolkit = Toolkit.getDefaultToolkit(); -- fonts = toolkit.getFontList(); -- -- familyChoser = new Choice(); -- for (int i = 0; i < fonts.length; i++) { -- familyChoser.addItem(fonts[i]); -- } -- add(familyChoser); -- familyChoser.reshape(20, 5, 100, 30); -- -- styleChoser = new Choice(); -- for (int i = 0; i < styleNames.length; i++) { -- styleChoser.addItem(styleNames[i]); -- } -- add(styleChoser); -- styleChoser.reshape(145, 5, 70, 30); -- -- sizeChoser = new Choice(); -- for (int i = 0; i < pointSizes.length; i++) { -- sizeChoser.addItem("" + pointSizes[i]); -- } -- add(sizeChoser); -- sizeChoser.reshape(220, 5, 70, 30); -- -- resize(300,40); -- } -- -- -- public Dimension preferredSize() { -- return new Dimension(300, 40); -- } -- -- public void setValue(Object o) { -- font = (Font) o; -- if (this.font == null) -- return; -- -- changeFont(font); -- // Update the current GUI choices. -- for (int i = 0; i < fonts.length; i++) { -- if (fonts[i].equals(font.getFamily())) { -- familyChoser.select(i); -- break; -- } -- } -- for (int i = 0; i < styleNames.length; i++) { -- if (font.getStyle() == styles[i]) { -- styleChoser.select(i); -- break; -- } -- } -- for (int i = 0; i < pointSizes.length; i++) { -- if (font.getSize() <= pointSizes[i]) { -- sizeChoser.select(i); -- break; -- } -- } -- } -- -- private void changeFont(Font f) { -- font = f; -- if (sample != null) { -- remove(sample); -- } -- sample = new Label(sampleText); -- sample.setFont(font); -- add(sample); -- Component p = getParent(); -- if (p != null) { -- p.invalidate(); -- p.layout(); -- } -- invalidate(); -- layout(); -- repaint(); -- support.firePropertyChange("", null, null); -- } -- -- public Object getValue() { -- return (font); -- } -- -- public String getJavaInitializationString() { -- if (this.font == null) -- return "null"; -- -- return "new java.awt.Font(\"" + font.getName() + "\", " + -- font.getStyle() + ", " + font.getSize() + ")"; -- } -- -- public boolean action(Event e, Object arg) { -- String family = familyChoser.getSelectedItem(); -- int style = styles[styleChoser.getSelectedIndex()]; -- int size = pointSizes[sizeChoser.getSelectedIndex()]; -- try { -- Font f = new Font(family, style, size); -- changeFont(f); -- } catch (Exception ex) { -- System.err.println("Couldn't create font " + family + "-" + -- styleNames[style] + "-" + size); -- } -- return (false); -- } -- -- -- public boolean isPaintable() { -- return true; -- } -- -- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { -- // Silent noop. -- Font oldFont = gfx.getFont(); -- gfx.setFont(font); -- FontMetrics fm = gfx.getFontMetrics(); -- int vpad = (box.height - fm.getAscent())/2; -- gfx.drawString(sampleText, 0, box.height-vpad); -- gfx.setFont(oldFont); -- } -- -- public String getAsText() { -- if (this.font == null) { -- return null; -- } -- StringBuilder sb = new StringBuilder(); -- sb.append(this.font.getName()); -- sb.append(' '); -- -- boolean b = this.font.isBold(); -- if (b) { -- sb.append("BOLD"); -- } -- boolean i = this.font.isItalic(); -- if (i) { -- sb.append("ITALIC"); -- } -- if (b || i) { -- sb.append(' '); -- } -- sb.append(this.font.getSize()); -- return sb.toString(); -- } -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Font.decode(text)); -- } -- -- public String[] getTags() { -- return null; -- } -- -- public java.awt.Component getCustomEditor() { -- return this; -- } -- -- public boolean supportsCustomEditor() { -- return true; -- } -- -- public void addPropertyChangeListener(PropertyChangeListener l) { -- support.addPropertyChangeListener(l); -- } -- -- public void removePropertyChangeListener(PropertyChangeListener l) { -- support.removePropertyChangeListener(l); -- } -- -- private Font font; -- private Toolkit toolkit; -- private String sampleText = "Abcde..."; -- -- private Label sample; -- private Choice familyChoser; -- private Choice styleChoser; -- private Choice sizeChoser; -- -- private String fonts[]; -- private String[] styleNames = { "plain", "bold", "italic" }; -- private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC }; -- private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 }; -- -- private PropertyChangeSupport support = new PropertyChangeSupport(this); -- -+/** -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. -+ */ -+public class FontEditor extends com.sun.beans.editors.FontEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/IntegerEditor.java ---- jdk/src/share/classes/sun/beans/editors/IntegerEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/IntegerEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,17 +26,7 @@ - package sun.beans.editors; - - /** -- * Property editor for a java builtin "int" type. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class IntegerEditor extends NumberEditor { -- -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Integer.decode(text)); -- } -- -+public class IntegerEditor extends com.sun.beans.editors.IntegerEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/LongEditor.java ---- jdk/src/share/classes/sun/beans/editors/LongEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/LongEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,23 +26,7 @@ - package sun.beans.editors; - - /** -- * Property editor for a java builtin "long" type. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class LongEditor extends NumberEditor { -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- return (value != null) -- ? value + "L" -- : "null"; -- } -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Long.decode(text)); -- } -- -+public class LongEditor extends com.sun.beans.editors.LongEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/NumberEditor.java ---- jdk/src/share/classes/sun/beans/editors/NumberEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/NumberEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -26,19 +26,7 @@ - package sun.beans.editors; - - /** -- * Abstract Property editor for a java builtin number types. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --abstract public class NumberEditor extends PropertyEditorSupport { -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- return (value != null) -- ? value.toString() -- : "null"; -- } -- -+abstract public class NumberEditor extends com.sun.beans.editors.NumberEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/ShortEditor.java ---- jdk/src/share/classes/sun/beans/editors/ShortEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/ShortEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -23,27 +23,10 @@ - * questions. - */ - -- - package sun.beans.editors; - - /** -- * Property editor for a java builtin "short" type. -- * -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. - */ -- --import java.beans.*; -- --public class ShortEditor extends NumberEditor { -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- return (value != null) -- ? "((short)" + value + ")" -- : "null"; -- } -- -- public void setAsText(String text) throws IllegalArgumentException { -- setValue((text == null) ? null : Short.decode(text)); -- } -- -+public class ShortEditor extends com.sun.beans.editors.ShortEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/editors/StringEditor.java ---- jdk/src/share/classes/sun/beans/editors/StringEditor.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/beans/editors/StringEditor.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -23,52 +23,10 @@ - * questions. - */ - -- - package sun.beans.editors; - --import java.beans.*; -- --public class StringEditor extends PropertyEditorSupport { -- -- public String getJavaInitializationString() { -- Object value = getValue(); -- if (value == null) -- return "null"; -- -- String str = value.toString(); -- int length = str.length(); -- StringBuilder sb = new StringBuilder(length + 2); -- sb.append('"'); -- for (int i = 0; i < length; i++) { -- char ch = str.charAt(i); -- switch (ch) { -- case '\b': sb.append("\\b"); break; -- case '\t': sb.append("\\t"); break; -- case '\n': sb.append("\\n"); break; -- case '\f': sb.append("\\f"); break; -- case '\r': sb.append("\\r"); break; -- case '\"': sb.append("\\\""); break; -- case '\\': sb.append("\\\\"); break; -- default: -- if ((ch < ' ') || (ch > '~')) { -- sb.append("\\u"); -- String hex = Integer.toHexString((int) ch); -- for (int len = hex.length(); len < 4; len++) { -- sb.append('0'); -- } -- sb.append(hex); -- } else { -- sb.append(ch); -- } -- break; -- } -- } -- sb.append('"'); -- return sb.toString(); -- } -- -- public void setAsText(String text) { -- setValue(text); -- } -- -+/** -+ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. -+ */ -+public class StringEditor extends com.sun.beans.editors.StringEditor { - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/beans/infos/ComponentBeanInfo.java ---- jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java Tue Aug 07 12:10:45 2012 -0700 -+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 -@@ -1,62 +0,0 @@ --/* -- * Copyright (c) 1996, 2002, 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 sun.beans.infos; -- --import java.beans.*; -- --/** -- * BeanInfo descriptor for a standard AWT component. -- */ -- --public class ComponentBeanInfo extends SimpleBeanInfo { -- private static final Class beanClass = java.awt.Component.class; -- -- public PropertyDescriptor[] getPropertyDescriptors() { -- try { -- PropertyDescriptor -- name = new PropertyDescriptor("name", beanClass), -- background = new PropertyDescriptor("background", beanClass), -- foreground = new PropertyDescriptor("foreground", beanClass), -- font = new PropertyDescriptor("font", beanClass), -- enabled = new PropertyDescriptor("enabled", beanClass), -- visible = new PropertyDescriptor("visible", beanClass), -- focusable = new PropertyDescriptor("focusable", beanClass); -- -- enabled.setExpert(true); -- visible.setHidden(true); -- -- background.setBound(true); -- foreground.setBound(true); -- font.setBound(true); -- focusable.setBound(true); -- -- PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable }; -- return rv; -- } catch (IntrospectionException e) { -- throw new Error(e.toString()); -- } -- } --} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/invoke/anon/AnonymousClassLoader.java ---- jdk/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -73,74 +73,14 @@ - public class AnonymousClassLoader { - final Class<?> hostClass; - -- // Note: Do not refactor the calls to checkHostClass unless you -- // also adjust this constant: -- private static int CHC_CALLERS = 3; -- -- public AnonymousClassLoader() { -- this.hostClass = checkHostClass(null); -- } -- public AnonymousClassLoader(Class<?> hostClass) { -- this.hostClass = checkHostClass(hostClass); -+ // Privileged constructor. -+ private AnonymousClassLoader(Class<?> hostClass) { -+ this.hostClass = hostClass; - } - -- private static Class<?> getTopLevelClass(Class<?> clazz) { -- for(Class<?> outer = clazz.getDeclaringClass(); outer != null; -- outer = outer.getDeclaringClass()) { -- clazz = outer; -- } -- return clazz; -- } -- -- private static Class<?> checkHostClass(Class<?> hostClass) { -- // called only from the constructor -- // does a context-sensitive check on caller class -- // CC[0..3] = {Reflection, this.checkHostClass, this.<init>, caller} -- Class<?> caller = sun.reflect.Reflection.getCallerClass(CHC_CALLERS); -- -- if (caller == null) { -- // called from the JVM directly -- if (hostClass == null) -- return AnonymousClassLoader.class; // anything central will do -- return hostClass; -- } -- -- if (hostClass == null) -- hostClass = caller; // default value is caller itself -- -- // anonymous class will access hostClass on behalf of caller -- Class<?> callee = hostClass; -- -- if (caller == callee) -- // caller can always nominate itself to grant caller's own access rights -- return hostClass; -- -- // normalize caller and callee to their top-level classes: -- caller = getTopLevelClass(caller); -- callee = getTopLevelClass(callee); -- if (caller == callee) -- return caller; -- -- ClassLoader callerCL = caller.getClassLoader(); -- if (callerCL == null) { -- // caller is trusted code, so accept the proposed hostClass -- return hostClass; -- } -- -- // %%% should do something with doPrivileged, because trusted -- // code should have a way to execute on behalf of -- // partially-trusted clients -- -- // Does the caller have the right to access the private -- // members of the callee? If not, raise an error. -- final int ACC_PRIVATE = 2; -- try { -- sun.reflect.Reflection.ensureMemberAccess(caller, callee, null, ACC_PRIVATE); -- } catch (IllegalAccessException ee) { -- throw new IllegalArgumentException(ee); -- } -- -- return hostClass; -+ public static AnonymousClassLoader make(sun.misc.Unsafe unsafe, Class<?> hostClass) { -+ if (unsafe == null) throw new NullPointerException(); -+ return new AnonymousClassLoader(hostClass); - } - - public Class<?> loadClass(byte[] classFile) { -@@ -249,7 +189,7 @@ - private static int fakeNameCounter = 99999; - - // ignore two warnings on this line: -- static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); -+ private static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); - // preceding line requires that this class be on the boot class path - - static private final Method defineAnonymousClass; -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/misc/JavaAWTAccess.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ jdk/src/share/classes/sun/misc/JavaAWTAccess.java Sun Sep 23 23:43:31 2012 +0400 -@@ -0,0 +1,34 @@ -+/* -+ * Copyright (c) 2012, 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 sun.misc; -+ -+public interface JavaAWTAccess { -+ public Object get(Object key); -+ public void put(Object key, Object value); -+ public void remove(Object key); -+ public boolean isDisposed(); -+ public boolean isMainAppContext(); -+} -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/misc/Service.java ---- jdk/src/share/classes/sun/misc/Service.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/misc/Service.java Sun Sep 23 23:43:31 2012 +0400 -@@ -284,12 +284,20 @@ - } - String cn = nextName; - nextName = null; -+ Class<?> c = null; - try { -- return Class.forName(cn, true, loader).newInstance(); -+ c = Class.forName(cn, false, loader); - } catch (ClassNotFoundException x) { - fail(service, - "Provider " + cn + " not found"); -- } catch (Exception x) { -+ } -+ if (!service.isAssignableFrom(c)) { -+ fail(service, -+ "Provider " + cn + " not a subtype"); -+ } -+ try { -+ return service.cast(c.newInstance()); -+ } catch (Throwable x) { - fail(service, - "Provider " + cn + " could not be instantiated: " + x, - x); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/misc/SharedSecrets.java ---- jdk/src/share/classes/sun/misc/SharedSecrets.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/misc/SharedSecrets.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2002, 2012, 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 -@@ -56,6 +56,7 @@ - private static JavaSecurityAccess javaSecurityAccess; - private static JavaxSecurityAuthKerberosAccess javaxSecurityAuthKerberosAccess; - private static JavaUtilZipAccess javaUtilZipAccess; -+ private static JavaAWTAccess javaAWTAccess; - - public static JavaUtilJarAccess javaUtilJarAccess() { - if (javaUtilJarAccess == null) { -@@ -177,4 +178,14 @@ - } - return javaUtilZipAccess; - } -+ -+ public static void setJavaAWTAccess(JavaAWTAccess jaa) { -+ javaAWTAccess = jaa; -+ } -+ -+ public static JavaAWTAccess getJavaAWTAccess() { -+ // this may return null in which case calling code needs to -+ // provision for. -+ return javaAWTAccess; -+ } - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/rmi/registry/RegistryImpl.java ---- jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java Sun Sep 23 23:43:31 2012 +0400 -@@ -405,7 +405,8 @@ - */ - perms.add(new SocketPermission("*", "connect,accept")); - -- perms.add(new RuntimePermission("accessClassInPackage.sun.*")); -+ perms.add(new RuntimePermission("accessClassInPackage.sun.jvmstat.*")); -+ perms.add(new RuntimePermission("accessClassInPackage.sun.jvm.hotspot.*")); - - perms.add(new FilePermission("<<ALL FILES>>", "read")); - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/security/provider/SecureRandom.java ---- jdk/src/share/classes/sun/security/provider/SecureRandom.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/security/provider/SecureRandom.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2012, 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 -@@ -56,12 +56,6 @@ - - private static final long serialVersionUID = 3581829991155417889L; - -- /** -- * This static object will be seeded by SeedGenerator, and used -- * to seed future instances of SecureRandom -- */ -- private static SecureRandom seeder; -- - private static final int DIGEST_SIZE = 20; - private transient MessageDigest digest; - private byte[] state; -@@ -173,6 +167,28 @@ - } - - /** -+ * This static object will be seeded by SeedGenerator, and used -+ * to seed future instances of SHA1PRNG SecureRandoms. -+ * -+ * Bloch, Effective Java Second Edition: Item 71 -+ */ -+ private static class SeederHolder { -+ -+ private static final SecureRandom seeder; -+ -+ static { -+ /* -+ * Call to SeedGenerator.generateSeed() to add additional -+ * seed material (likely from the Native implementation). -+ */ -+ seeder = new SecureRandom(SeedGenerator.getSystemEntropy()); -+ byte [] b = new byte[DIGEST_SIZE]; -+ SeedGenerator.generateSeed(b); -+ seeder.engineSetSeed(b); -+ } -+ } -+ -+ /** - * Generates a user-specified number of random bytes. - * - * @param bytes the array to be filled in with random bytes. -@@ -183,13 +199,8 @@ - byte[] output = remainder; - - if (state == null) { -- if (seeder == null) { -- seeder = new SecureRandom(SeedGenerator.getSystemEntropy()); -- seeder.engineSetSeed(engineGenerateSeed(DIGEST_SIZE)); -- } -- - byte[] seed = new byte[DIGEST_SIZE]; -- seeder.engineNextBytes(seed); -+ SeederHolder.seeder.engineNextBytes(seed); - state = digest.digest(seed); - } - -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/security/ssl/HandshakeInStream.java ---- jdk/src/share/classes/sun/security/ssl/HandshakeInStream.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/security/ssl/HandshakeInStream.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1996, 2012, 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 -@@ -190,6 +190,7 @@ - - byte[] getBytes8() throws IOException { - int len = getInt8(); -+ verifyLength(len); - byte b[] = new byte[len]; - - read(b, 0, len); -@@ -198,6 +199,7 @@ - - public byte[] getBytes16() throws IOException { - int len = getInt16(); -+ verifyLength(len); - byte b[] = new byte[len]; - - read(b, 0, len); -@@ -206,10 +208,19 @@ - - byte[] getBytes24() throws IOException { - int len = getInt24(); -+ verifyLength(len); - byte b[] = new byte[len]; - - read(b, 0, len); - return b; - } - -+ // Is a length greater than available bytes in the record? -+ private void verifyLength(int len) throws SSLException { -+ if (len > available()) { -+ throw new SSLException( -+ "Not enough data to fill declared vector size"); -+ } -+ } -+ - } -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/security/ssl/Handshaker.java ---- jdk/src/share/classes/sun/security/ssl/Handshaker.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/security/ssl/Handshaker.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1996, 2012, 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 -@@ -1063,7 +1063,6 @@ - if (debug != null && Debug.isOn("handshake")) { - System.out.println("RSA master secret generation error:"); - e.printStackTrace(System.out); -- System.out.println("Generating new random premaster secret"); - } - - if (requestedVersion != null) { -@@ -1130,7 +1129,6 @@ - System.out.println("RSA PreMasterSecret version error: expected" - + protocolVersion + " or " + requestedVersion + ", decrypted: " - + premasterVersion); -- System.out.println("Generating new random premaster secret"); - } - preMasterSecret = - RSAClientKeyExchange.generateDummySecret(requestedVersion); -diff -r 1c775da99873 -r ffad06d70095 src/share/classes/sun/security/ssl/RSAClientKeyExchange.java ---- jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -36,6 +36,7 @@ - import javax.net.ssl.*; - - import sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec; -+import sun.security.util.KeyLength; - - /** - * This is the client key exchange message (CLIENT --> SERVER) used with -@@ -192,26 +193,38 @@ - "unable to get the plaintext of the premaster secret"); - } - -- // We are not always able to get the encoded key of the -- // premaster secret. Pass the cheking to master secret -+ int keySize = KeyLength.getKeySize(secretKey); -+ if (keySize > 0 && keySize != 384) { // 384 = 48 * 8 -+ if (debug != null && Debug.isOn("handshake")) { -+ System.out.println( -+ "incorrect length of premaster secret: " + -+ (keySize/8)); -+ } -+ -+ return generateDummySecret(clientHelloVersion); -+ } -+ -+ // The key size is exactly 48 bytes or not accessible. -+ // -+ // Conservatively, pass the checking to master secret - // calculation. - return secretKey; - } else if (encoded.length == 48) { - // check the version - if (clientHelloVersion.major == encoded[0] && - clientHelloVersion.minor == encoded[1]) { -+ - return secretKey; -- } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v) { -+ } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v && -+ currentVersion.major == encoded[0] && -+ currentVersion.minor == encoded[1]) { - /* -- * we never checked the client_version in server side -- * for TLS v1.0 and SSL v3.0. For compatibility, we -- * maintain this behavior. -+ * For compatibility, we maintain the behavior that the -+ * version in pre_master_secret can be the negotiated -+ * version for TLS v1.0 and SSL v3.0. - */ -- if (currentVersion.major == encoded[0] && -- currentVersion.minor == encoded[1]) { -- this.protocolVersion = currentVersion; -- return secretKey; -- } -+ this.protocolVersion = currentVersion; -+ return secretKey; - } - - if (debug != null && Debug.isOn("handshake")) { -@@ -220,22 +233,23 @@ - ", while PreMasterSecret.client_version is " + - ProtocolVersion.valueOf(encoded[0], encoded[1])); - } -+ -+ return generateDummySecret(clientHelloVersion); - } else { - if (debug != null && Debug.isOn("handshake")) { - System.out.println( - "incorrect length of premaster secret: " + - encoded.length); - } -+ -+ return generateDummySecret(clientHelloVersion); - } - } - -- if (debug != null && Debug.isOn("handshake")) { -- if (failoverException != null) { -- System.out.println("Error decrypting premaster secret:"); -- failoverException.printStackTrace(System.out); -- } -- -- System.out.println("Generating random secret"); -+ if (debug != null && Debug.isOn("handshake") && -+ failoverException != null) { -+ System.out.println("Error decrypting premaster secret:"); -+ failoverException.printStackTrace(System.out); - } - - return generateDummySecret(clientHelloVersion); -@@ -243,6 +257,10 @@ - - // generate a premaster secret with the specified version number - static SecretKey generateDummySecret(ProtocolVersion version) { -+ if (debug != null && Debug.isOn("handshake")) { -+ System.out.println("Generating a random fake premaster secret"); -+ } -+ - try { - String s = ((version.v >= ProtocolVersion.TLS12.v) ? - "SunTls12RsaPremasterSecret" : "SunTlsRsaPremasterSecret"); -diff -r 1c775da99873 -r ffad06d70095 src/share/lib/security/java.security ---- jdk/src/share/lib/security/java.security Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/lib/security/java.security Sun Sep 23 23:43:31 2012 +0400 -@@ -123,7 +123,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. - - # - # List of comma-separated packages that start with or equal this string -@@ -135,7 +135,7 @@ - # by default, none of the class loaders supplied with the JDK call - # checkPackageDefinition. - # --package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. -+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. - - # - # Determines whether this properties file can be appended to -diff -r 1c775da99873 -r ffad06d70095 src/share/lib/security/java.security-macosx ---- jdk/src/share/lib/security/java.security-macosx Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/lib/security/java.security-macosx Sun Sep 23 23:43:31 2012 +0400 -@@ -124,7 +124,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,apple. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,apple. - - # - # List of comma-separated packages that start with or equal this string -@@ -136,7 +136,7 @@ - # by default, none of the class loaders supplied with the JDK call - # checkPackageDefinition. - # --package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,apple. -+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,apple. - - # - # Determines whether this properties file can be appended to -diff -r 1c775da99873 -r ffad06d70095 src/share/lib/security/java.security-solaris ---- jdk/src/share/lib/security/java.security-solaris Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/lib/security/java.security-solaris Sun Sep 23 23:43:31 2012 +0400 -@@ -125,7 +125,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. - - # - # List of comma-separated packages that start with or equal this string -@@ -137,7 +137,7 @@ - # by default, none of the class loaders supplied with the JDK call - # checkPackageDefinition. - # --package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. -+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. - - # - # Determines whether this properties file can be appended to -diff -r 1c775da99873 -r ffad06d70095 src/share/lib/security/java.security-windows ---- jdk/src/share/lib/security/java.security-windows Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/share/lib/security/java.security-windows Sun Sep 23 23:43:31 2012 +0400 -@@ -124,7 +124,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. - - # - # List of comma-separated packages that start with or equal this string -@@ -136,7 +136,7 @@ - # by default, none of the class loaders supplied with the JDK call - # checkPackageDefinition. - # --package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. -+package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. - - # - # Determines whether this properties file can be appended to -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -29,27 +29,12 @@ - import java.awt.peer.*; - import java.awt.event.*; - --import java.lang.reflect.Field; --import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - - class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPeer { - - /************************************************ - * -- * Data members -- * -- ************************************************/ -- -- /* -- * CheckboxMenuItem's fields -- */ -- private final static Field f_state; -- static { -- f_state = SunToolkit.getField(CheckboxMenuItem.class, "state"); -- } -- -- /************************************************ -- * - * Construction - * - ************************************************/ -@@ -74,16 +59,8 @@ - * - ************************************************/ - boolean getTargetState() { -- MenuItem target = getTarget(); -- if (target == null) { -- return false; -- } -- try { -- return f_state.getBoolean(target); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -- return false; -+ return AWTAccessor.getCheckboxMenuItemAccessor() -+ .getState((CheckboxMenuItem)getTarget()); - } - - /************************************************ -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -29,14 +29,8 @@ - import java.awt.dnd.DropTarget; - import java.awt.dnd.DropTargetListener; - import java.awt.event.*; --import java.awt.image.ColorModel; --import java.awt.image.ImageObserver; --import java.awt.image.ImageProducer; --import java.awt.image.VolatileImage; --import java.awt.peer.*; - import sun.awt.*; --import sun.awt.motif.X11FontMetrics; --import java.lang.reflect.*; -+import sun.awt.AWTAccessor; - import sun.util.logging.PlatformLogger; - import java.util.*; - import static sun.awt.X11.XEmbedHelper.*; -@@ -455,16 +449,8 @@ - } - } - -- static Field bdataField; - static byte[] getBData(KeyEvent e) { -- try { -- if (bdataField == null) { -- bdataField = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); -- } -- return (byte[])bdataField.get(e); -- } catch (IllegalAccessException ex) { -- return null; -- } -+ return AWTAccessor.getAWTEventAccessor().getBData(e); - } - - void forwardKeyEvent(KeyEvent e) { -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java ---- jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -29,7 +29,7 @@ - import java.util.HashMap; - import java.awt.event.KeyEvent; - import java.lang.reflect.*; --import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - - public class XEmbeddingContainer extends XEmbedHelper implements XEventDispatcher { - HashMap children = new HashMap(); -@@ -127,20 +127,8 @@ - } - } - -- static Field bdata; -- byte[] getBData(KeyEvent e) { -- try { -- if (bdata == null) { -- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); -- } -- return (byte[])bdata.get(e); -- } catch (IllegalAccessException ex) { -- return null; -- } -- } -- - void forwardKeyEvent(long child, KeyEvent e) { -- byte[] bdata = getBData(e); -+ byte[] bdata = AWTAccessor.getAWTEventAccessor().getBData(e); - long data = Native.toData(bdata); - if (data == 0) { - return; -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java ---- jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java Sun Sep 23 23:43:31 2012 +0400 -@@ -27,10 +27,7 @@ - - import java.awt.*; - import java.awt.peer.ComponentPeer; --import java.awt.peer.LightweightPeer; - import java.lang.ref.WeakReference; --import java.lang.reflect.Field; --import java.lang.reflect.Method; - import sun.awt.AWTAccessor; - - import sun.awt.GlobalCursorManager; -@@ -38,23 +35,6 @@ - - public final class XGlobalCursorManager extends GlobalCursorManager { - -- private static Field field_pData; -- private static Field field_type; -- private static Class cursorClass; -- private static Method method_setPData; -- static { -- cursorClass = java.awt.Cursor.class; -- field_pData = SunToolkit.getField(cursorClass, "pData"); -- field_type = SunToolkit.getField(cursorClass, "type"); -- method_setPData = SunToolkit.getMethod(cursorClass, "setPData", new Class[] {long.class}); -- if (field_pData == null || field_type == null || method_setPData == null) { -- System.out.println("Unable to initialize XGlobalCursorManager: "); -- Thread.dumpStack(); -- -- } -- } -- -- - // cached nativeContainer - private WeakReference<Component> nativeContainer; - -@@ -213,8 +193,8 @@ - long pData = 0; - int type = 0; - try { -- pData = field_pData.getLong(c); -- type = field_type.getInt(c); -+ pData = AWTAccessor.getCursorAccessor().getPData(c); -+ type = AWTAccessor.getCursorAccessor().getType(c); - } - catch (Exception e) - { -@@ -284,7 +264,7 @@ - - static void setPData(Cursor c, long pData) { - try { -- method_setPData.invoke(c, pData); -+ AWTAccessor.getCursorAccessor().setPData(c, pData); - } - catch (Exception e) - { -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XMenuBarPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -28,10 +28,9 @@ - import java.awt.peer.*; - import java.awt.event.*; - --import java.lang.reflect.Field; - import java.util.Vector; - import sun.util.logging.PlatformLogger; --import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - - public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer { - -@@ -67,15 +66,6 @@ - private final static int BAR_ITEM_MARGIN_TOP = 2; - private final static int BAR_ITEM_MARGIN_BOTTOM = 2; - -- //fields -- private static Field f_helpMenu; -- private static Field f_menus; -- -- static { -- f_helpMenu = SunToolkit.getField(MenuBar.class, "helpMenu"); -- f_menus = SunToolkit.getField(MenuBar.class, "menus"); -- } -- - /************************************************ - * - * Mapping data -@@ -204,16 +194,12 @@ - */ - void postInit(XCreateWindowParams params) { - super.postInit(params); -- Vector targetMenuVector = null; -- Menu targetHelpMenu = null; -- try { -- // Get menus from the target. -- targetMenuVector = (Vector)f_menus.get(menuBarTarget); -- targetHelpMenu = (Menu)f_helpMenu.get(menuBarTarget); -- reloadItems(targetMenuVector); -- } catch (IllegalAccessException iae) { -- iae.printStackTrace(); -- } -+ // Get menus from the target. -+ Vector targetMenuVector = AWTAccessor.getMenuBarAccessor() -+ .getMenus(menuBarTarget); -+ Menu targetHelpMenu = AWTAccessor.getMenuBarAccessor() -+ .getHelpMenu(menuBarTarget); -+ reloadItems(targetMenuVector); - if (targetHelpMenu != null) { - addHelpMenu(targetHelpMenu); - } -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XMenuItemPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -28,10 +28,7 @@ - import java.awt.peer.*; - import java.awt.event.*; - --import java.lang.reflect.Field; --import java.lang.reflect.Method; --import java.lang.reflect.InvocationTargetException; --import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - - public class XMenuItemPeer implements MenuItemPeer { - -@@ -81,24 +78,6 @@ - private final static int SEPARATOR_WIDTH = 20; - private final static int SEPARATOR_HEIGHT = 5; - -- /* -- * MenuItem's fields & methods -- */ -- private final static Field f_enabled; -- private final static Field f_label; -- private final static Field f_shortcut; -- private final static Method m_getFont; -- private final static Method m_isItemEnabled; -- private final static Method m_getActionCommand; -- static { -- f_enabled = SunToolkit.getField(MenuItem.class, "enabled"); -- f_label = SunToolkit.getField(MenuItem.class, "label"); -- f_shortcut = SunToolkit.getField(MenuItem.class, "shortcut"); -- -- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null); -- m_getActionCommand = SunToolkit.getMethod(MenuItem.class, "getActionCommandImpl", null); -- m_isItemEnabled = SunToolkit.getMethod(MenuItem.class, "isItemEnabled", null); -- } - /************************************************ - * - * Text Metrics -@@ -216,39 +195,22 @@ - if (target == null) { - return XWindow.getDefaultFont(); - } -- try { -- return (Font)m_getFont.invoke(target, new Object[0]); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } catch (InvocationTargetException e) { -- e.printStackTrace(); -- } -- return XWindow.getDefaultFont(); -+ return AWTAccessor.getMenuComponentAccessor().getFont_NoClientCode(target); - } - - String getTargetLabel() { - if (target == null) { - return ""; - } -- try { -- String label = (String)f_label.get(target); -- return (label == null) ? "" : label; -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -- return ""; -+ String label = AWTAccessor.getMenuItemAccessor().getLabel(target); -+ return (label == null) ? "" : label; - } - - boolean isTargetEnabled() { - if (target == null) { - return false; - } -- try { -- return f_enabled.getBoolean(target); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -- return false; -+ return AWTAccessor.getMenuItemAccessor().isEnabled(target); - } - - /** -@@ -260,40 +222,21 @@ - if (target == null) { - return false; - } -- try { -- return ((Boolean)m_isItemEnabled.invoke(target, new Object[0])).booleanValue(); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } catch (InvocationTargetException e) { -- e.printStackTrace(); -- } -- return false; -+ return AWTAccessor.getMenuItemAccessor().isItemEnabled(target); - } - - String getTargetActionCommand() { - if (target == null) { - return ""; - } -- try { -- return (String) m_getActionCommand.invoke(target,(Object[]) null); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } catch (InvocationTargetException e) { -- e.printStackTrace(); -- } -- return ""; -+ return AWTAccessor.getMenuItemAccessor().getActionCommandImpl(target); - } - - MenuShortcut getTargetShortcut() { - if (target == null) { - return null; - } -- try { -- return (MenuShortcut)f_shortcut.get(target); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -- return null; -+ return AWTAccessor.getMenuItemAccessor().getShortcut(target); - } - - String getShortcutText() { -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XMenuPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -27,10 +27,9 @@ - import java.awt.*; - import java.awt.peer.*; - --import java.lang.reflect.Field; - import java.util.Vector; - import sun.util.logging.PlatformLogger; --import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - - public class XMenuPeer extends XMenuItemPeer implements MenuPeer { - -@@ -46,16 +45,6 @@ - */ - XMenuWindow menuWindow; - -- -- /* -- * Menu's fields & methods -- */ -- private final static Field f_items; -- -- static { -- f_items = SunToolkit.getField(Menu.class, "items"); -- } -- - /************************************************ - * - * Construction -@@ -153,12 +142,7 @@ - * - ************************************************/ - Vector getTargetItems() { -- try { -- return (Vector)f_items.get(getTarget()); -- } catch (IllegalAccessException iae) { -- iae.printStackTrace(); -- return null; -- } -+ return AWTAccessor.getMenuAccessor().getItems((Menu)getTarget()); - } - - /************************************************ -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -28,15 +28,10 @@ - import java.awt.peer.*; - import java.awt.event.*; - --import java.lang.reflect.Field; --import java.lang.reflect.Method; --import java.lang.reflect.InvocationTargetException; -- - import java.util.Vector; -+import sun.awt.AWTAccessor; - import sun.util.logging.PlatformLogger; - --import sun.awt.SunToolkit; -- - public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer { - - /************************************************ -@@ -66,24 +61,6 @@ - private final static int CAPTION_MARGIN_TOP = 4; - private final static int CAPTION_SEPARATOR_HEIGHT = 6; - -- /* -- * Menu's fields & methods -- */ -- //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false) -- private final static Field f_enabled; -- //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit -- private final static Field f_label; -- private final static Method m_getFont; -- private final static Field f_items; -- -- static { -- f_enabled = SunToolkit.getField(MenuItem.class, "enabled"); -- f_label = SunToolkit.getField(MenuItem.class, "label"); -- f_items = SunToolkit.getField(Menu.class, "items"); -- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null); -- } -- -- - /************************************************ - * - * Construction -@@ -96,7 +73,7 @@ - - /************************************************ - * -- * Implementaion of interface methods -+ * Implementation of interface methods - * - ************************************************/ - /* -@@ -189,27 +166,16 @@ - if (popupMenuTarget == null) { - return XWindow.getDefaultFont(); - } -- try { -- return (Font)m_getFont.invoke(popupMenuTarget, new Object[0]); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } catch (InvocationTargetException e) { -- e.printStackTrace(); -- } -- return XWindow.getDefaultFont(); -+ return AWTAccessor.getMenuComponentAccessor() -+ .getFont_NoClientCode(popupMenuTarget); - } - -+ //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit - String getTargetLabel() { - if (target == null) { - return ""; - } -- try { -- String label = (String)f_label.get(popupMenuTarget); -- return (label == null) ? "" : label; -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -- return ""; -+ return AWTAccessor.getMenuItemAccessor().getLabel(popupMenuTarget); - } - - //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false) -@@ -217,21 +183,14 @@ - if (popupMenuTarget == null) { - return false; - } -- try { -- return f_enabled.getBoolean(popupMenuTarget); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -- return false; -+ return AWTAccessor.getMenuItemAccessor().isEnabled(popupMenuTarget); - } - - Vector getMenuTargetItems() { -- try { -- return (Vector)f_items.get(popupMenuTarget); -- } catch (IllegalAccessException iae) { -- iae.printStackTrace(); -+ if (popupMenuTarget == null) { - return null; - } -+ return AWTAccessor.getMenuAccessor().getItems(popupMenuTarget); - } - - /************************************************ -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XScrollPanePeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -29,7 +29,7 @@ - import java.awt.event.*; - import java.awt.peer.*; - import java.lang.reflect.*; --import sun.awt.SunToolkit; -+import sun.awt.AWTAccessor; - - class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollbarClient { - -@@ -41,9 +41,7 @@ - public final static int VERTICAL = 1 << 0; - public final static int HORIZONTAL = 1 << 1; - -- private static Method m_setValue; - static { -- m_setValue = SunToolkit.getMethod(ScrollPaneAdjustable.class, "setTypedValue", new Class[] {Integer.TYPE, Integer.TYPE}); - SCROLLBAR = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth"); - } - -@@ -316,19 +314,9 @@ - } - - void setAdjustableValue(ScrollPaneAdjustable adj, int value, int type) { -- try { -- m_setValue.invoke(adj, new Object[] {Integer.valueOf(value), Integer.valueOf(type)}); -- } catch (IllegalAccessException iae) { -- adj.setValue(value); -- } catch (IllegalArgumentException iae2) { -- adj.setValue(value); -- } catch (InvocationTargetException ite) { -- adj.setValue(value); -- ite.getCause().printStackTrace(); -- } -+ AWTAccessor.getScrollPaneAdjustableAccessor().setTypedValue(adj, value, type); - } - -- - public void paint(Graphics g) { - paintComponent(g); - } -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -27,10 +27,9 @@ - - import java.awt.*; - import java.awt.peer.SystemTrayPeer; --import java.lang.reflect.Method; --import java.lang.reflect.InvocationTargetException; - import sun.awt.SunToolkit; - import sun.awt.AppContext; -+import sun.awt.AWTAccessor; - import sun.util.logging.PlatformLogger; - - public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener { -@@ -42,11 +41,6 @@ - private volatile boolean available; - private final XMSelection selection = new XMSelection("_NET_SYSTEM_TRAY"); - -- private static final Method firePropertyChangeMethod = -- XToolkit.getMethod(SystemTray.class, "firePropertyChange", new Class[] {String.class, Object.class, Object.class}); -- private static final Method addNotifyMethod = XToolkit.getMethod(TrayIcon.class, "addNotify", null); -- private static final Method removeNotifyMethod = XToolkit.getMethod(TrayIcon.class, "removeNotify", null); -- - private static final int SCREEN = 0; - private static final String SYSTEM_TRAY_PROPERTY_NAME = "systemTray"; - private static final XAtom _NET_SYSTEM_TRAY = XAtom.get("_NET_SYSTEM_TRAY_S" + SCREEN); -@@ -157,44 +151,43 @@ - return peerInstance; - } - -- private void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) { -+ private void firePropertyChange(final String propertyName, -+ final Object oldValue, -+ final Object newValue) { - Runnable runnable = new Runnable() { - public void run() { -- Object[] args = new Object[] {propertyName, oldValue, newValue}; -- invokeMethod(firePropertyChangeMethod, target, args); -+ AWTAccessor.getSystemTrayAccessor() -+ .firePropertyChange(target, propertyName, oldValue, newValue); - } - }; - invokeOnEachAppContext(runnable); - } - - private void createTrayPeers() { -- invokeOnEachTrayIcon(addNotifyMethod); -- } -- -- private void removeTrayPeers() { -- invokeOnEachTrayIcon(removeNotifyMethod); -- } -- -- private void invokeOnEachTrayIcon(final Method method) { - Runnable runnable = new Runnable() { - public void run() { - TrayIcon[] icons = target.getTrayIcons(); -- for (TrayIcon ti : icons) { -- invokeMethod(method, ti, (Object[]) null); -+ try { -+ for (TrayIcon ti : icons) { -+ AWTAccessor.getTrayIconAccessor().addNotify(ti); -+ } -+ } catch (AWTException e) { - } - } - }; - invokeOnEachAppContext(runnable); - } - -- private void invokeMethod(Method method, Object obj, Object[] args) { -- try{ -- method.invoke(obj, args); -- } catch (InvocationTargetException e){ -- e.printStackTrace(); -- } catch (IllegalAccessException e) { -- e.printStackTrace(); -- } -+ private void removeTrayPeers() { -+ Runnable runnable = new Runnable() { -+ public void run() { -+ TrayIcon[] icons = target.getTrayIcons(); -+ for (TrayIcon ti : icons) { -+ AWTAccessor.getTrayIconAccessor().removeNotify(ti); -+ } -+ } -+ }; -+ invokeOnEachAppContext(runnable); - } - - private void invokeOnEachAppContext(Runnable runnable) { -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XTextAreaPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -1015,8 +1015,10 @@ - // loading SystemFlavorMap and associated classes. - public void setTransferHandler(TransferHandler newHandler) { - TransferHandler oldHandler = (TransferHandler) -- getClientProperty(XTextTransferHelper.getTransferHandlerKey()); -- putClientProperty(XTextTransferHelper.getTransferHandlerKey(), -+ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor() -+ .getJComponent_TRANSFER_HANDLER()); -+ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor() -+ .getJComponent_TRANSFER_HANDLER(), - newHandler); - - firePropertyChange("transferHandler", oldHandler, newHandler); -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XTextFieldPeer.java ---- jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -716,8 +716,10 @@ - // loading SystemFlavorMap and associated classes. - public void setTransferHandler(TransferHandler newHandler) { - TransferHandler oldHandler = (TransferHandler) -- getClientProperty(XTextTransferHelper.getTransferHandlerKey()); -- putClientProperty(XTextTransferHelper.getTransferHandlerKey(), -+ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor() -+ .getJComponent_TRANSFER_HANDLER()); -+ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor() -+ .getJComponent_TRANSFER_HANDLER(), - newHandler); - - firePropertyChange("transferHandler", oldHandler, newHandler); -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XTextTransferHelper.java ---- jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java Tue Aug 07 12:10:45 2012 -0700 -+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 -@@ -1,47 +0,0 @@ --/* -- * Copyright (c) 2003, 2007, 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 sun.awt.X11; -- --import java.lang.reflect.Field; --import sun.awt.SunToolkit; -- --class XTextTransferHelper { -- private static Object transferHandlerKey = null; -- static Object getTransferHandlerKey() { -- if (transferHandlerKey == null) { -- try { -- Class clazz = Class.forName("javax.swing.ClientPropertyKey"); -- Field field = SunToolkit.getField(clazz, "JComponent_TRANSFER_HANDLER"); -- transferHandlerKey = field.get(null); -- } catch (IllegalAccessException ex) { -- return null; -- } catch (ClassNotFoundException cnfe) { -- cnfe.printStackTrace(); -- } -- } -- return transferHandlerKey; -- } --} -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XToolkit.java ---- jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Sun Sep 23 23:43:31 2012 +0400 -@@ -41,8 +41,6 @@ - import java.awt.image.ColorModel; - import java.awt.peer.*; - import java.beans.PropertyChangeListener; --import java.lang.reflect.InvocationTargetException; --import java.lang.reflect.Method; - import java.security.AccessController; - import java.security.PrivilegedAction; - import java.util.*; -@@ -50,9 +48,9 @@ - import javax.swing.UIDefaults; - import sun.awt.*; - import sun.font.FontConfigManager; --import sun.font.FontManager; - import sun.misc.PerformanceLogger; - import sun.print.PrintJob2D; -+import sun.security.action.GetPropertyAction; - import sun.security.action.GetBooleanAction; - import sun.util.logging.PlatformLogger; - -@@ -112,7 +110,6 @@ - private static int screenWidth = -1, screenHeight = -1; // Dimensions of default screen - static long awt_defaultFg; // Pixel - private static XMouseInfoPeer xPeer; -- private static Method m_removeSourceEvents; - - static { - initSecurityWarning(); -@@ -130,8 +127,6 @@ - initIDs(); - setBackingStoreType(); - } -- m_removeSourceEvents = SunToolkit.getMethod(EventQueue.class, "removeSourceEvents", new Class[] {Object.class, Boolean.TYPE}) ; -- - noisyAwtHandler = AccessController.doPrivileged(new GetBooleanAction("sun.awt.noisyerrorhandler")); - } - -@@ -222,7 +217,8 @@ - - static void initSecurityWarning() { - // Enable warning only for internal builds -- String runtime = getSystemProperty("java.runtime.version"); -+ String runtime = AccessController.doPrivileged( -+ new GetPropertyAction("java.runtime.version")); - securityWarningEnabled = (runtime != null && runtime.contains("internal")); - } - -@@ -1067,8 +1063,8 @@ - */ - public synchronized static boolean getSunAwtDisableGtkFileDialogs() { - if (sunAwtDisableGtkFileDialogs == null) { -- sunAwtDisableGtkFileDialogs = -- getBooleanSystemProperty("sun.awt.disableGtkFileDialogs"); -+ sunAwtDisableGtkFileDialogs = AccessController.doPrivileged( -+ new GetBooleanAction("sun.awt.disableGtkFileDialogs")); - } - return sunAwtDisableGtkFileDialogs.booleanValue(); - } -@@ -2056,17 +2052,11 @@ - return null; - } - -- static void removeSourceEvents(EventQueue queue, Object source, boolean removeAllEvents) { -- try { -- m_removeSourceEvents.invoke(queue, source, removeAllEvents); -- } -- catch (IllegalAccessException e) -- { -- e.printStackTrace(); -- } -- catch (InvocationTargetException e) { -- e.printStackTrace(); -- } -+ static void removeSourceEvents(EventQueue queue, -+ Object source, -+ boolean removeAllEvents) { -+ AWTAccessor.getEventQueueAccessor() -+ .removeSourceEvents(queue, source, removeAllEvents); - } - - public boolean isAlwaysOnTopSupported() { -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XWindow.java ---- jdk/src/solaris/classes/sun/awt/X11/XWindow.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XWindow.java Sun Sep 23 23:43:31 2012 +0400 -@@ -126,10 +126,6 @@ - native void getWindowBounds(long window, long x, long y, long width, long height); - private native static void initIDs(); - -- private static Field isPostedField; -- private static Field rawCodeField; -- private static Field primaryLevelUnicodeField; -- private static Field extendedKeyCodeField; - static { - initIDs(); - } -@@ -398,20 +394,11 @@ - - static Method m_sendMessage; - static void sendEvent(final AWTEvent e) { -- if (isPostedField == null) { -- isPostedField = SunToolkit.getField(AWTEvent.class, "isPosted"); -- } - // The uses of this method imply that the incoming event is system-generated - SunToolkit.setSystemGenerated(e); - PeerEvent pe = new PeerEvent(Toolkit.getDefaultToolkit(), new Runnable() { - public void run() { -- try { -- isPostedField.setBoolean(e, true); -- } catch (IllegalArgumentException e) { -- assert(false); -- } catch (IllegalAccessException e) { -- assert(false); -- } -+ AWTAccessor.getAWTEventAccessor().setPosted(e); - ((Component)e.getSource()).dispatchEvent(e); - } - }, PeerEvent.ULTIMATE_PRIORITY_EVENT); -@@ -1427,16 +1414,8 @@ - } - - -- static Field bdata; - static void setBData(KeyEvent e, byte[] data) { -- try { -- if (bdata == null) { -- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); -- } -- bdata.set(e, data); -- } catch (IllegalAccessException ex) { -- assert false; -- } -+ AWTAccessor.getAWTEventAccessor().setBData(e, data); - } - - public void postKeyEvent(int id, long when, int keyCode, int keyChar, -@@ -1446,15 +1425,6 @@ - { - long jWhen = XToolkit.nowMillisUTC_offset(when); - int modifiers = getModifiers(state, 0, keyCode); -- if (rawCodeField == null) { -- rawCodeField = XToolkit.getField(KeyEvent.class, "rawCode"); -- } -- if (primaryLevelUnicodeField == null) { -- primaryLevelUnicodeField = XToolkit.getField(KeyEvent.class, "primaryLevelUnicode"); -- } -- if (extendedKeyCodeField == null) { -- extendedKeyCodeField = XToolkit.getField(KeyEvent.class, "extendedKeyCode"); -- } - - KeyEvent ke = new KeyEvent((Component)getEventSource(), id, jWhen, - modifiers, keyCode, (char)keyChar, keyLocation); -@@ -1462,15 +1432,11 @@ - byte[] data = Native.toBytes(event, eventSize); - setBData(ke, data); - } -- try { -- rawCodeField.set(ke, rawCode); -- primaryLevelUnicodeField.set(ke, (long)unicodeFromPrimaryKeysym); -- extendedKeyCodeField.set(ke, (long)extendedKeyCode); -- } catch (IllegalArgumentException e) { -- assert(false); -- } catch (IllegalAccessException e) { -- assert(false); -- } -+ -+ AWTAccessor.KeyEventAccessor kea = AWTAccessor.getKeyEventAccessor(); -+ kea.setRawCode(ke, rawCode); -+ kea.setPrimaryLevelUnicode(ke, (long)unicodeFromPrimaryKeysym); -+ kea.setExtendedKeyCode(ke, (long)extendedKeyCode); - postEventToEventQueue(ke); - } - -diff -r 1c775da99873 -r ffad06d70095 src/solaris/classes/sun/awt/X11/XlibWrapper.java ---- jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java Sun Sep 23 23:43:31 2012 +0400 -@@ -27,6 +27,7 @@ - - import java.security.AccessController; - import java.security.PrivilegedAction; -+import sun.security.action.GetPropertyAction; - import sun.misc.*; - - final public class XlibWrapper -@@ -590,12 +591,8 @@ - static final boolean isBuildInternal; - - static { -- String dataModelProp = (String)AccessController.doPrivileged( -- new PrivilegedAction() { -- public Object run() { -- return System.getProperty("sun.arch.data.model"); -- } -- }); -+ String dataModelProp = AccessController.doPrivileged( -+ new GetPropertyAction("sun.arch.data.model")); - try { - dataModel = Integer.parseInt(dataModelProp); - } catch (Exception e) { -@@ -647,7 +644,8 @@ - } - - private static boolean getBuildInternal() { -- String javaVersion = XToolkit.getSystemProperty("java.version"); -+ String javaVersion = AccessController.doPrivileged( -+ new GetPropertyAction("java.version")); - return javaVersion != null && javaVersion.contains("internal"); - } - -diff -r 1c775da99873 -r ffad06d70095 src/windows/classes/sun/awt/windows/WCanvasPeer.java ---- jdk/src/windows/classes/sun/awt/windows/WCanvasPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/windows/classes/sun/awt/windows/WCanvasPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -27,7 +27,6 @@ - import java.awt.*; - import java.awt.peer.*; - import java.lang.ref.WeakReference; --import java.lang.reflect.Method; - import sun.awt.SunToolkit; - import sun.awt.Win32GraphicsDevice; - import sun.awt.PaintEventDispatcher; -diff -r 1c775da99873 -r ffad06d70095 src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java ---- jdk/src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -39,8 +39,6 @@ - import java.awt.event.MouseListener; - import java.awt.event.MouseMotionListener; - --import java.lang.reflect.*; -- - import sun.awt.dnd.SunDragSourceContextPeer; - - /** -diff -r 1c775da99873 -r ffad06d70095 src/windows/classes/sun/awt/windows/WPopupMenuPeer.java ---- jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -26,9 +26,7 @@ - - import java.awt.*; - import java.awt.peer.*; --import java.lang.reflect.Field; - --import sun.awt.SunToolkit; - import sun.awt.AWTAccessor; - - public class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer { -diff -r 1c775da99873 -r ffad06d70095 src/windows/classes/sun/awt/windows/WWindowPeer.java ---- jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java Tue Aug 07 12:10:45 2012 -0700 -+++ jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java Sun Sep 23 23:43:31 2012 +0400 -@@ -31,8 +31,6 @@ - - import java.beans.*; - --import java.lang.reflect.*; -- - import java.util.*; - import java.util.List; - import sun.util.logging.PlatformLogger; -diff -r 6aac89e84fc9 -r 1de4a0865a71 .hgtags ---- langtools/.hgtags Tue Aug 07 12:11:16 2012 -0700 -+++ langtools/.hgtags Thu Sep 20 14:23:55 2012 -0700 -@@ -197,3 +197,17 @@ - a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u6-b21 - 4f3aafa690d1fcb18693fc4085049eeffe4778f7 jdk7u6-b22 - dd3e29d8892fcaba6d76431d5fa9d49e7c088f76 jdk7u6-b23 -+6aac89e84fc96d15bb78b13aa71c9e6b73d7237e jdk7u6-b24 -+bcd1d067d525065630deb98b678bc00b499adbe1 jdk7u6-b30 -+2d6017454236d4e95aad7feaff5fc92a612598f4 jdk7u7-b10 -+27041587508dbc4e08c956ba98a11ce0d5608dc4 jdk7u7-b30 -+b92a9f4f6bce4ec500ed3adb8203e6424b579f94 jdk7u7-b11 -+f0fd7463f02ea681ca53022d6d0d425ec1584b34 jdk7u7-b31 -+6bfc26fc14a0650805dd6583048db0b4f8669844 jdk7u7-b01 -+0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u7-b02 -+04848e261e42c697cb70401f8059186434855f33 jdk7u9-b03 -+0000000000000000000000000000000000000000 jdk7u7-b01 -+6bfc26fc14a0650805dd6583048db0b4f8669844 jdk7u9-b01 -+0000000000000000000000000000000000000000 jdk7u7-b02 -+0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u9-b02 -+9148cdb9a18b55ad7d51bb9644b6db812de34eea jdk7u9-b04 diff --git a/java/openjdk7/files/patch-make-java-java-genlocales.gmk b/java/openjdk7/files/patch-make-java-java-genlocales.gmk deleted file mode 100644 index 4430bcdf626b..000000000000 --- a/java/openjdk7/files/patch-make-java-java-genlocales.gmk +++ /dev/null @@ -1,40 +0,0 @@ -$FreeBSD$ - ---- jdk/make/java/java/genlocales.gmk.orig 2012-05-03 04:15:03.000000000 -0700 -+++ jdk/make/java/java/genlocales.gmk 2012-06-15 23:06:56.000000000 -0700 -@@ -93,6 +93,26 @@ - - else - -+ifeq ($(PLATFORM), bsd) -+ -+$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) -+ @$(RM) $@.tmp.euro $@.tmp.noneuro; -+ @$(prep-target) -+ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\ -+'@g > $@.tmp.euro; -+ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\ -+'@g >> $@.tmp.euro; -+ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\ -+'@g > $@.tmp.noneuro; -+ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\ -+'@g >> $@.tmp.noneuro; -+ NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \ -+ $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \ -+ $@.tmp.noneuro $< $@ -+ @$(RM) $@.tmp.euro $@.tmp.noneuro; -+ -+else -+ - $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) - @$(RM) $@.tmp.euro $@.tmp.noneuro; - @$(prep-target) -@@ -105,6 +125,8 @@ - $@.tmp.noneuro $< $@ - @$(RM) $@.tmp.euro $@.tmp.noneuro; - endif -+ -+endif - - genlocales : $(LocaleDataMetaInfo_Dest) - diff --git a/java/openjdk7/files/patch-set b/java/openjdk7/files/patch-set index 7cdf9941ddf1..4395cff3629d 100644 --- a/java/openjdk7/files/patch-set +++ b/java/openjdk7/files/patch-set @@ -1,5 +1,5 @@ --- .hgtags 2012-08-10 09:07:00.000000000 -0700 -+++ .hgtags 2012-08-19 11:38:54.000000000 -0700 ++++ .hgtags 2013-01-16 08:57:46.000000000 -0800 @@ -123,6 +123,7 @@ 2d38c2a79c144c30cd04d143d83ee7ec6af40771 jdk7-b146 3ac30b3852876ccad6bd61697b5f9efa91ca7bc6 jdk7u1-b01 @@ -8,15 +8,38 @@ 34451dc0580d5c95d97b95a564e6198f36545d68 jdk7u1-b02 bf735d852f79bdbb3373c777eec3ff27e035e7ba jdk7u1-b03 f66a2bada589f4157789e6f66472954d2f1c114e jdk7u1-b04 -@@ -197,5 +198,4 @@ +@@ -197,5 +198,27 @@ 29f6fb1833eb2a696b95e8985126f2d70f511a82 jdk7u6-b21 31cdab09d719fe60876c7f3a472386c1455d93e2 jdk7u6-b22 d1c709f1196a73d1df10d04a221b10e30fd2eb48 jdk7u6-b23 -1ab3edf5061fdde3a6f6510373a92444445af710 jdk7u8-b01 -d7a94c8cbbbfadbd9e2f3e4737eb7deb572dedc9 jdk7u8-b02 +e4def733cc8c58e83b7cefa7edd89a3e2b793520 jdk7u6-b24 ++f5f546dba006778854e7a81141fc1b44acd257a4 jdk7u6-b30 ++43775eae8df6c874fb3631c86009505cf3821b1f jdk7u7-b10 ++a380c75873bfb578e605d4362edb18c08698cc3e jdk7u7-b30 ++d7f2b3949f9c9ff1115ea61c496d3cd4c62e2759 jdk7u7-b11 ++82c51e6a3bea0dd8feb1bd3033e847dbdc5d9f99 jdk7u7-b31 ++5ca487420f9c2cf6d39acf1e842d13bf8ef0ca07 jdk7u7-b01 ++dbfa9c57853c2dd9cd4e4a139d83b519573d8031 jdk7u7-b02 ++bae912f95f2aa1d22dbc0ff62816b71861965cd6 jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++5ca487420f9c2cf6d39acf1e842d13bf8ef0ca07 jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++dbfa9c57853c2dd9cd4e4a139d83b519573d8031 jdk7u9-b02 ++3159fbe20e2d9501007aae8ca3db58978d754561 jdk7u9-b04 ++d9c8fa0606fdfff242175ce904c525a6fc40d6e5 jdk7u9-b05 ++d934ce27cddbc9ba7236791f177872491204a41e jdk7u10-b10 ++5a5ee5b70d563d5817b6ec023d275e9b17256459 jdk7u10-b11 ++48b58c2d665c9a1d3598b981e46f87f9bcdd5b46 jdk7u10-b12 ++1b9618b61e29c09b92f83956c613acf36ccabb38 jdk7u10-b13 ++c50e1a044e4fcc1a94b79b42f3629beb07624010 jdk7u10-b14 ++137087461db28f935493940658f31be760098f00 jdk7u10-b15 ++c8a37a49fc90ae31b864544d6d4a9f6137d4995d jdk7u10-b16 ++494e838439db7f0f4e36f7dcfeba06d2bef78c8d jdk7u10-b17 ++dce9058d2151e6b5c84898c13cfd1521a627a296 jdk7u10-b18 --- corba/.hgtags 2012-08-10 09:09:50.000000000 -0700 -+++ corba/.hgtags 2012-08-19 11:44:59.000000000 -0700 ++++ corba/.hgtags 2013-01-16 08:57:47.000000000 -0800 @@ -123,6 +123,7 @@ 770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146 36f0efbc66ef8ace3cca8aa8d0c88f3334080f8a jdk7u1-b01 @@ -25,15 +48,38 @@ 9515a2d034b4727c11aeea36354a549fbc469c4f jdk7u1-b02 dd71cb354c573c1addcda269a7dd9144bfce9587 jdk7u1-b03 eaee830124aa453627591d8f9eccb39d7e040876 jdk7u1-b04 -@@ -197,5 +198,4 @@ +@@ -197,5 +198,27 @@ 353c15c4bc371f2f8258344c988d1403477cc140 jdk7u6-b21 793b80c0316fcafa18668bced26acb41af3be07d jdk7u6-b22 2a8376123fbb81bc4b2f643ff7cfaf7f87b21c35 jdk7u6-b23 -353c15c4bc371f2f8258344c988d1403477cc140 jdk7u8-b01 -d17ca8d088f7cc0dd42230472f534c8d1e415bcb jdk7u8-b02 +02512f61591f55d84458d1ea4ce84eecb7324f89 jdk7u6-b24 ++8b20875b3faa01ef56331045de88747df278eaeb jdk7u6-b30 ++d7fe6c13adf9e06d98c061449d171bc06c2ba0a3 jdk7u7-b10 ++496baf62d0550c704505b0ff6f390279f6a569e0 jdk7u7-b30 ++e57e4274a3575f278115cc8ef03c5bdf3c43a7ed jdk7u7-b11 ++06cbc4af754ea8f2e3b7d0b1701d1a69ce9d5075 jdk7u7-b31 ++8737f43e092ea52dd85dcf164736eea3b9b364e6 jdk7u7-b01 ++ec602836c4e173927911673d253bb8baa1e3d170 jdk7u7-b02 ++a163e56c6679d10dc64ec48f35e67c3a5942afba jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++8737f43e092ea52dd85dcf164736eea3b9b364e6 jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++ec602836c4e173927911673d253bb8baa1e3d170 jdk7u9-b02 ++268470f3f0d0d7e9b04c579c551571097f0b0305 jdk7u9-b04 ++a5dced409c4b7f940db80846f6efabac74523b0e jdk7u9-b05 ++ba68d4ad02c465a36344a34eba34491466ec17d4 jdk7u10-b10 ++a738921b001a92381bf355a2bb1ecd742ecee352 jdk7u10-b11 ++e52708ecb2c32b366c251e4083fbb37e22a425c3 jdk7u10-b12 ++5cd2ef642635a7d0a79a7c28343b2ddfd0e6aa4a jdk7u10-b13 ++2d53a2c7e4b989ceba356abfc8dc2129269a134f jdk7u10-b14 ++c488cd628db35eb09d8ef9e10ffd00c9a93d0778 jdk7u10-b15 ++64f09d7549d304fbfd3c29b4f148bf44e8e3e979 jdk7u10-b16 ++57c3355153d1624fd98618097c1a82ab3ffc66f8 jdk7u10-b17 ++f2a347637a55fa4de9542a8dcab72ad6fac44d2b jdk7u10-b18 --- get_source.sh 2012-08-10 09:07:01.000000000 -0700 -+++ get_source.sh 2012-08-19 11:38:54.000000000 -0700 ++++ get_source.sh 2013-01-15 23:01:23.000000000 -0800 @@ -1,7 +1,7 @@ #!/bin/sh @@ -53,7 +99,7 @@ # Update all existing repositories to the latest sources sh ./make/scripts/hgforest.sh pull -u --- hotspot/.hgtags 2012-08-10 09:20:36.000000000 -0700 -+++ hotspot/.hgtags 2012-08-19 12:11:03.000000000 -0700 ++++ hotspot/.hgtags 2013-01-16 09:04:00.000000000 -0800 @@ -182,6 +182,7 @@ 38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16 81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147 @@ -62,26 +108,38 @@ 9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01 0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01 31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02 -@@ -318,5 +319,4 @@ +@@ -318,5 +319,27 @@ 02a6c89432d724119565f9ba25672829b136fc5f jdk7u6-b21 a79d86eef6ac995a1fc35554f082f3a61abe9ae0 jdk7u6-b22 df57f6208cb76b4e8d1a0bd0eea3d2ad577cb79b jdk7u6-b23 -02a6c89432d724119565f9ba25672829b136fc5f jdk7u8-b01 -528502f930967f70c320472a002418f1e38029e0 jdk7u8-b02 +b03c2687fb16514652e79261ad68d2c601dcee62 jdk7u6-b24 ---- hotspot/agent/src/os/bsd/symtab.c 2012-08-10 09:21:04.000000000 -0700 -+++ hotspot/agent/src/os/bsd/symtab.c 2012-08-19 12:11:03.000000000 -0700 -@@ -94,7 +94,7 @@ - if (cursct->sh_type == SHT_SYMTAB || - cursct->sh_type == SHT_STRTAB || - cursct->sh_type == SHT_DYNSYM) { -- if ( (scn_cache[cnt].c_data = read_section_data(fd, &ehdr, cursct)) == NULL) { -+ if ((scn_cache[cnt].c_data = read_section_data(fd, &ehdr, cursct)) == NULL) { - goto quit; - } - } ++cffde29ea7cc8647f17002a4d0e94065dcd82839 jdk7u6-b30 ++f7933fecea9aa494e4032e17ff07e5fcec4b5961 jdk7u7-b10 ++eeef33dc4b40f9ba50c4c9b1ac61b30f0f2523bf jdk7u7-b30 ++f1551c70c7f598b7049bcc33e530fc738a81c7a4 jdk7u7-b11 ++6b9db7216dd4b7846faf372f19566a418c8e391f jdk7u7-b31 ++b66bb0e3224ff15259361a5b501bf8fa6b346113 jdk7u7-b01 ++ca6943c94e6075fc28353d52ac6ea52c80aef9bb jdk7u7-b02 ++e043d96d767d8ba4d74d53c477af8e07b78b6128 jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++b66bb0e3224ff15259361a5b501bf8fa6b346113 jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++ca6943c94e6075fc28353d52ac6ea52c80aef9bb jdk7u9-b02 ++ed42837374ac730ddaf2fd28814017c665634a8b jdk7u9-b04 ++da4aa289ac100017f850ed4d492e8054db6a1e28 jdk7u9-b05 ++d2e25680db9d4209b3f0f51e5c848284cedea508 jdk7u10-b10 ++d37fd995683ab5bc2d941648ce7bf8bd194732f2 jdk7u10-b11 ++f26f3d92e6d9ef7842b2d785f92439dbb15e670e jdk7u10-b12 ++58881c615a5179bcea69148d0b3eb47a1f1a7de8 jdk7u10-b13 ++cdbf4d442b56ece8ac521c65b59087682e5ae918 jdk7u10-b14 ++63e8b49b329e4b50547b13f5c732665bed535732 jdk7u10-b15 ++1cb34ef50bddc334c8538cf85d8612383debc74f jdk7u10-b16 ++5c154a591de987d515f5b102a988bcf96d439f53 jdk7u10-b17 ++78c7e1b4a006342230e04fbb73f637834207abef jdk7u10-b18 --- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2012-08-10 09:21:14.000000000 -0700 -+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2012-08-19 12:11:03.000000000 -0700 ++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2013-01-16 09:04:00.000000000 -0800 @@ -33,6 +33,7 @@ import sun.jvm.hotspot.debugger.remote.*; import sun.jvm.hotspot.debugger.windbg.*; @@ -91,7 +149,7 @@ import sun.jvm.hotspot.oops.*; import sun.jvm.hotspot.runtime.*; --- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2012-08-10 09:21:38.000000000 -0700 -+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2012-08-19 12:11:03.000000000 -0700 ++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2013-01-16 09:04:00.000000000 -0800 @@ -35,6 +35,7 @@ import sun.jvm.hotspot.debugger.windbg.*; import sun.jvm.hotspot.debugger.linux.*; @@ -101,7 +159,7 @@ import sun.jvm.hotspot.livejvm.*; import sun.jvm.hotspot.memory.*; --- hotspot/make/bsd/Makefile 2012-08-10 09:22:55.000000000 -0700 -+++ hotspot/make/bsd/Makefile 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/Makefile 2013-01-16 09:04:00.000000000 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. @@ -132,7 +190,7 @@ # Synonyms for win32-like targets. compiler2: jvmg product --- hotspot/make/bsd/makefiles/buildtree.make 2012-08-10 09:22:57.000000000 -0700 -+++ hotspot/make/bsd/makefiles/buildtree.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/buildtree.make 2013-01-16 09:04:00.000000000 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. @@ -167,7 +225,7 @@ .dbxrc: $(BUILDTREE_MAKE) @echo Creating $@ ... --- hotspot/make/bsd/makefiles/defs.make 2012-08-10 09:22:57.000000000 -0700 -+++ hotspot/make/bsd/makefiles/defs.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/defs.make 2013-01-16 09:04:00.000000000 -0800 @@ -86,7 +86,7 @@ VM_PLATFORM = bsd_i486 HS_ARCH = x86 @@ -342,7 +400,7 @@ ADD_SA_BINARIES/ia64 = ADD_SA_BINARIES/arm = --- hotspot/make/bsd/makefiles/gcc.make 2012-08-10 09:22:57.000000000 -0700 -+++ hotspot/make/bsd/makefiles/gcc.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/gcc.make 2013-01-16 09:04:00.000000000 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. @@ -400,7 +458,7 @@ + STRIP = strip +endif --- hotspot/make/bsd/makefiles/jsig.make 2012-08-10 09:22:58.000000000 -0700 -+++ hotspot/make/bsd/makefiles/jsig.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/jsig.make 2013-01-16 09:04:00.000000000 -0800 @@ -36,9 +36,16 @@ LIBJSIG_G = lib$(JSIG_G).so endif @@ -454,7 +512,7 @@ .PHONY: install_jsig --- hotspot/make/bsd/makefiles/launcher.make 2012-08-10 09:22:58.000000000 -0700 -+++ hotspot/make/bsd/makefiles/launcher.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/launcher.make 2013-01-16 09:04:00.000000000 -0800 @@ -50,7 +50,7 @@ LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) else @@ -465,7 +523,7 @@ # The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a # freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting --- hotspot/make/bsd/makefiles/mapfile-vers-debug 2012-08-10 09:22:58.000000000 -0700 -+++ hotspot/make/bsd/makefiles/mapfile-vers-debug 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/mapfile-vers-debug 2013-01-16 09:04:00.000000000 -0800 @@ -221,6 +221,7 @@ JVM_SetArrayElement; JVM_SetClassSigners; @@ -500,7 +558,7 @@ JVM_AccessVMBooleanFlag; JVM_AccessVMIntFlag; --- hotspot/make/bsd/makefiles/mapfile-vers-product 2012-08-10 09:22:58.000000000 -0700 -+++ hotspot/make/bsd/makefiles/mapfile-vers-product 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/mapfile-vers-product 2013-01-16 09:04:00.000000000 -0800 @@ -221,6 +221,7 @@ JVM_SetArrayElement; JVM_SetClassSigners; @@ -535,7 +593,7 @@ jio_fprintf; jio_printf; --- hotspot/make/bsd/makefiles/ppc.make 2012-08-10 09:22:58.000000000 -0700 -+++ hotspot/make/bsd/makefiles/ppc.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/ppc.make 2013-01-16 09:04:00.000000000 -0800 @@ -28,3 +28,6 @@ # Must also specify if CPU is big endian CFLAGS += -DVM_BIG_ENDIAN @@ -544,7 +602,7 @@ +ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1 +endif --- hotspot/make/bsd/makefiles/saproc.make 2012-08-10 09:22:59.000000000 -0700 -+++ hotspot/make/bsd/makefiles/saproc.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/saproc.make 2013-01-16 09:04:00.000000000 -0800 @@ -36,6 +36,11 @@ LIBSAPROC_G = lib$(SAPROC_G).so endif @@ -602,7 +660,7 @@ fi --- hotspot/make/bsd/makefiles/vm.make 2012-08-10 09:22:59.000000000 -0700 -+++ hotspot/make/bsd/makefiles/vm.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/bsd/makefiles/vm.make 2013-01-16 09:04:00.000000000 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. @@ -709,8 +767,21 @@ $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" #---------------------------------------------------------------------- +--- hotspot/make/hotspot_version 2012-08-10 09:23:01.000000000 -0700 ++++ hotspot/make/hotspot_version 2013-01-16 08:57:49.000000000 -0800 +@@ -34,8 +34,8 @@ + HOTSPOT_VM_COPYRIGHT=Copyright 2012 + + HS_MAJOR_VER=23 +-HS_MINOR_VER=2 +-HS_BUILD_NUMBER=09 ++HS_MINOR_VER=6 ++HS_BUILD_NUMBER=04 + + JDK_MAJOR_VER=1 + JDK_MINOR_VER=7 --- hotspot/make/solaris/makefiles/defs.make 2012-08-10 09:23:12.000000000 -0700 -+++ hotspot/make/solaris/makefiles/defs.make 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/make/solaris/makefiles/defs.make 2013-01-16 09:04:00.000000000 -0800 @@ -194,8 +194,8 @@ endif ifeq ($(ARCH_DATA_MODEL), 32) @@ -723,7 +794,7 @@ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) --- hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2012-08-10 09:23:56.000000000 -0700 -+++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2012-08-19 12:11:04.000000000 -0700 ++++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2013-01-16 09:04:00.000000000 -0800 @@ -71,7 +71,11 @@ define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); @@ -736,22 +807,139 @@ // GC Ergo Flags define_pd_global(intx, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread ---- hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2012-08-10 09:24:15.000000000 -0700 -+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2012-08-19 12:11:05.000000000 -0700 -@@ -212,7 +212,10 @@ - // (this is the default on linux, but not on mac os) - RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res); - if (res == 0) { -- res = ::rename(initial_path, path); -+ RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res); -+ if (res == 0) { -+ res = ::rename(initial_path, path); +--- hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp 2012-08-10 09:23:58.000000000 -0700 ++++ hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp 2013-01-16 08:57:49.000000000 -0800 +@@ -698,6 +698,17 @@ + if (arg_slots.is_constant() && arg_slots.as_constant() == 0) + return; + ++ // We have to insert at least one word, so bang the stack. ++ if (UseStackBanging) { ++ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register ++ __ mov(G3_method_handle, temp_reg); ++ int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); ++ if (frame_size <= 0) ++ frame_size = 256 * Interpreter::stackElementSize; // conservative ++ __ generate_stack_overflow_check(frame_size); ++ __ mov(temp_reg, G3_method_handle); ++ } ++ + assert_different_registers(argslot_reg, temp_reg, temp2_reg, temp3_reg, + (!arg_slots.is_register() ? Gargs : arg_slots.as_register())); + +@@ -1702,6 +1713,14 @@ + "copied argument(s) must fall within current frame"); + } + ++ if (UseStackBanging) { ++ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register ++ __ mov(G3_method_handle, O3_scratch); ++ // Bang the stack before pushing args. ++ int frame_size = 256 * Interpreter::stackElementSize; // conservative ++ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); ++ __ mov(O3_scratch, G3_method_handle); ++ } + // insert location is always the bottom of the argument list: + __ neg(O1_stack_move); + push_arg_slots(_masm, O0_argslot, O1_stack_move, O2_scratch, O3_scratch); +@@ -2118,6 +2137,18 @@ + // The return handler will further cut back the stack when it takes + // down the RF. Perhaps there is a way to streamline this further. + ++ if (UseStackBanging) { ++ // Save G3_method_handle since bang_stack_with_offset uses it as a temp register ++ __ mov(G3_method_handle, O4_scratch); ++ // Bang the stack before recursive call. ++ // Even if slots == 0, we are inside a RicochetFrame. ++ int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; ++ if (frame_size < 0) { ++ frame_size = 256 * Interpreter::stackElementSize; // conservative + } ++ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); ++ __ mov(O4_scratch, G3_method_handle); ++ } + // State during recursive call: + // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | + __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); +--- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp 2012-08-10 09:24:07.000000000 -0700 ++++ hotspot/src/cpu/x86/vm/methodHandles_x86.cpp 2013-01-16 08:57:49.000000000 -0800 +@@ -691,6 +691,14 @@ + if (VerifyMethodHandles) + verify_stack_move(_masm, arg_slots, -1); + ++ // We have to insert at least one word, so bang the stack. ++ if (UseStackBanging) { ++ int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); ++ if (frame_size <= 0) ++ frame_size = 256 * Interpreter::stackElementSize; // conservative ++ __ generate_stack_overflow_check(frame_size); ++ } ++ + // Make space on the stack for the inserted argument(s). + // Then pull down everything shallower than rax_argslot. + // The stacked return address gets pulled down with everything else. +@@ -1769,6 +1777,11 @@ + "copied argument(s) must fall within current frame"); } - } - } + ++ if (UseStackBanging) { ++ // Bang the stack before pushing args. ++ int frame_size = 256 * Interpreter::stackElementSize; // conservative ++ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); ++ } + // insert location is always the bottom of the argument list: + Address insert_location = __ argument_address(constant(0)); + int pre_arg_words = insert_location.disp() / wordSize; // return PC is pushed +@@ -2206,6 +2219,15 @@ + // The return handler will further cut back the stack when it takes + // down the RF. Perhaps there is a way to streamline this further. + ++ if (UseStackBanging) { ++ // Bang the stack before recursive call. ++ // Even if slots == 0, we are inside a RicochetFrame. ++ int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; ++ if (frame_size < 0) { ++ frame_size = 256 * Interpreter::stackElementSize; // conservative ++ } ++ __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); ++ } + // State during recursive call: + // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | + __ jump_to_method_handle_entry(rcx_recv, rdx_temp); +@@ -2366,10 +2388,15 @@ + // case in a 32-bit version of the VM) we have to save 'rsi' + // on the stack because later on (at 'L_array_is_empty') 'rsi' + // will be overwritten. +- { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } ++ if (rsi_temp == saved_last_sp) { ++ __ push(saved_last_sp); ++ // Need to re-push return PC to keep it on stack top. ++ __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); ++ __ push(saved_last_sp); ++ } + // Also prepare a handy macro which restores 'rsi' if required. + #define UNPUSH_RSI \ +- { if (rsi_temp == saved_last_sp) __ pop(saved_last_sp); } ++ { if (rsi_temp == saved_last_sp) { __ pop(saved_last_sp); __ pop(saved_last_sp); } } + + __ jmp(L_array_is_empty); + __ bind(L_skip); +@@ -2382,7 +2409,12 @@ + // called in the case of a null pointer exception will not be + // confused by the extra value on the stack (it expects the + // return pointer on top of the stack) +- { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } ++ if (rsi_temp == saved_last_sp) { ++ __ push(saved_last_sp); ++ // Need to re-push return PC to keep it on stack top. ++ __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); ++ __ push(saved_last_sp); ++ } + + // Check the array type. + Register rbx_klass = rbx_temp; --- hotspot/src/os/bsd/vm/decoder_bsd.cpp 1969-12-31 16:00:00.000000000 -0800 -+++ hotspot/src/os/bsd/vm/decoder_bsd.cpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os/bsd/vm/decoder_bsd.cpp 2013-01-16 09:04:00.000000000 -0800 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. @@ -800,7 +988,7 @@ +} + --- hotspot/src/os/bsd/vm/os_bsd.cpp 2012-08-10 09:24:18.000000000 -0700 -+++ hotspot/src/os/bsd/vm/os_bsd.cpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os/bsd/vm/os_bsd.cpp 2013-01-16 09:04:00.000000000 -0800 @@ -2341,14 +2341,14 @@ } @@ -907,7 +1095,7 @@ void os::numa_make_global(char *addr, size_t bytes) { --- hotspot/src/os/bsd/vm/os_bsd.hpp 2012-08-10 09:24:18.000000000 -0700 -+++ hotspot/src/os/bsd/vm/os_bsd.hpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os/bsd/vm/os_bsd.hpp 2013-01-16 09:04:00.000000000 -0800 @@ -103,6 +103,12 @@ static bool hugetlbfs_sanity_check(bool warn, size_t page_size); @@ -922,7 +1110,7 @@ static void init_thread_fpu_state(); --- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2012-08-10 09:24:18.000000000 -0700 -+++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2013-01-16 09:04:00.000000000 -0800 @@ -31,10 +31,22 @@ # include "atomic_bsd_x86.inline.hpp" # include "orderAccess_bsd_x86.inline.hpp" @@ -947,7 +1135,7 @@ // System includes --- hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2012-08-10 09:24:18.000000000 -0700 -+++ hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2013-01-16 09:04:00.000000000 -0800 @@ -34,11 +34,26 @@ # include "orderAccess_bsd_x86.inline.hpp" # include "prefetch_bsd_x86.inline.hpp" @@ -975,8 +1163,30 @@ // Contains inlined functions for class Thread and ThreadLocalStorage +--- hotspot/src/os/posix/vm/os_posix.cpp 2012-08-10 09:24:20.000000000 -0700 ++++ hotspot/src/os/posix/vm/os_posix.cpp 2013-01-16 09:04:00.000000000 -0800 +@@ -110,11 +110,19 @@ + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%d", rlim.rlim_cur); + ++#ifdef __OpenBSD__ ++ st->print(", DATA "); ++ getrlimit(RLIMIT_DATA, &rlim); ++ if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); ++ else st->print("%uk", rlim.rlim_cur >> 10); ++ st->cr(); ++#else + st->print(", AS "); + getrlimit(RLIMIT_AS, &rlim); + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%uk", rlim.rlim_cur >> 10); + st->cr(); ++#endif + } + + void os::Posix::print_uname_info(outputStream* st) { --- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2012-08-10 09:24:32.000000000 -0700 -+++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2013-01-16 09:04:00.000000000 -0800 @@ -52,7 +52,7 @@ /* Posix Thread IDs */ \ /**********************/ \ @@ -987,7 +1197,7 @@ \ /* This must be the last entry, and must be present */ \ --- hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2012-08-10 09:24:33.000000000 -0700 -+++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2012-08-19 12:11:05.000000000 -0700 ++++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2013-01-16 09:04:00.000000000 -0800 @@ -24,7 +24,7 @@ */ @@ -997,8 +1207,68 @@ # include <pthread_np.h> /* For pthread_attr_get_np */ #endif +--- hotspot/src/share/vm/compiler/compilerOracle.cpp 2012-08-10 09:26:19.000000000 -0700 ++++ hotspot/src/share/vm/compiler/compilerOracle.cpp 2013-01-16 08:57:49.000000000 -0800 +@@ -575,7 +575,7 @@ + char token[1024]; + int pos = 0; + int c = getc(stream); +- while(c != EOF) { ++ while(c != EOF && pos < (int)(sizeof(token)-1)) { + if (c == '\n') { + token[pos++] = '\0'; + parse_from_line(token); +@@ -596,7 +596,7 @@ + int pos = 0; + const char* sp = str; + int c = *sp++; +- while (c != '\0') { ++ while (c != '\0' && pos < (int)(sizeof(token)-1)) { + if (c == '\n') { + token[pos++] = '\0'; + parse_line(token); +--- hotspot/src/share/vm/opto/loopTransform.cpp 2012-08-10 09:27:38.000000000 -0700 ++++ hotspot/src/share/vm/opto/loopTransform.cpp 2013-01-16 08:57:50.000000000 -0800 +@@ -2733,6 +2733,8 @@ + result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); + _igvn.register_new_node_with_optimizer(result_mem); + ++/* Disable following optimization until proper fix (add missing checks). ++ + // If this fill is tightly coupled to an allocation and overwrites + // the whole body, allow it to take over the zeroing. + AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this); +@@ -2756,6 +2758,7 @@ + #endif + } + } ++*/ + + // Redirect the old control and memory edges that are outside the loop. + Node* exit = head->loopexit()->proj_out(0); +--- hotspot/src/share/vm/runtime/arguments.cpp 2012-08-10 09:27:53.000000000 -0700 ++++ hotspot/src/share/vm/runtime/arguments.cpp 2013-01-16 09:04:00.000000000 -0800 +@@ -829,6 +829,9 @@ + } else { + jio_fprintf(defaultStream::error_stream(), "%s", locked_message_buf); + } ++ } else { ++ jio_fprintf(defaultStream::error_stream(), ++ "Unrecognized VM option '%s'\n", argname); + } + + // allow for commandline "commenting out" options like -XX:#+Verbose +@@ -857,7 +860,7 @@ + bool result = true; + + int c = getc(stream); +- while(c != EOF) { ++ while(c != EOF && pos < (int)(sizeof(token)-1)) { + if (in_white_space) { + if (in_comment) { + if (c == '\n') in_comment = false; --- hotspot/src/share/vm/runtime/atomic.cpp 2012-08-10 09:27:53.000000000 -0700 -+++ hotspot/src/share/vm/runtime/atomic.cpp 2012-08-19 12:11:07.000000000 -0700 ++++ hotspot/src/share/vm/runtime/atomic.cpp 2013-01-16 09:04:00.000000000 -0800 @@ -54,6 +54,12 @@ #ifdef TARGET_OS_ARCH_windows_x86 # include "atomic_windows_x86.inline.hpp" @@ -1013,7 +1283,7 @@ # include "atomic_linux_arm.inline.hpp" #endif --- hotspot/src/share/vm/runtime/os.hpp 2012-08-10 09:28:05.000000000 -0700 -+++ hotspot/src/share/vm/runtime/os.hpp 2012-08-19 12:11:07.000000000 -0700 ++++ hotspot/src/share/vm/runtime/os.hpp 2013-01-16 09:04:00.000000000 -0800 @@ -30,6 +30,9 @@ #include "runtime/extendedPC.hpp" #include "runtime/handles.hpp" @@ -1035,7 +1305,7 @@ #ifdef TARGET_OS_ARCH_linux_x86 # include "os_linux_x86.hpp" --- hotspot/test/compiler/5091921/Test7005594.sh 2012-08-10 09:28:58.000000000 -0700 -+++ hotspot/test/compiler/5091921/Test7005594.sh 2012-08-19 12:11:07.000000000 -0700 ++++ hotspot/test/compiler/5091921/Test7005594.sh 2013-01-16 09:04:00.000000000 -0800 @@ -71,6 +71,9 @@ # Windows/MKS MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'` @@ -1046,8 +1316,77 @@ else echo "Unable to determine amount of physical memory on the machine" fi +--- hotspot/test/compiler/7158807/Test7158807.java 1969-12-31 16:00:00.000000000 -0800 ++++ hotspot/test/compiler/7158807/Test7158807.java 2013-01-16 08:57:50.000000000 -0800 +@@ -0,0 +1,66 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ * ++ */ ++ ++/** ++ * @test ++ * @bug 7158807 ++ * @summary Revise stack management with volatile call sites ++ * @author Marc Schonefeld ++ * ++ * @run main/othervm -XX:CompileThreshold=100 -Xbatch -Xss248k Test7158807 ++ */ ++ ++import java.lang.invoke.MethodHandle; ++import java.lang.invoke.MethodType; ++import java.lang.invoke.VolatileCallSite; ++ ++public class Test7158807 { ++ /** ++ * @param args the command line arguments ++ */ ++ public static void main(String[] args) throws Throwable { ++ for (int i = 0; i < 25600; i++) { ++ MethodType mt = MethodType.methodType(java.lang.String.class); ++ System.out.println(mt); ++ MethodType mt3 = null; ++ try { ++ mt3 = MethodType.genericMethodType(i); ++ } catch (IllegalArgumentException e) { ++ System.out.println("Passed"); ++ System.exit(95); ++ } ++ System.out.println(i+":"); ++ try { ++ VolatileCallSite vcs = new VolatileCallSite(mt3); ++ System.out.println(vcs); ++ MethodHandle mh = vcs.dynamicInvoker(); ++ vcs.setTarget(mh); ++ // System.out.println(mh); ++ mh.invoke(mt, mh); ++ } catch (Throwable e) { ++ } ++ } ++ } ++} ++ --- hotspot/test/gc/6941923/test6941923.sh 2012-08-10 09:29:15.000000000 -0700 -+++ hotspot/test/gc/6941923/test6941923.sh 2012-08-19 12:11:08.000000000 -0700 ++++ hotspot/test/gc/6941923/test6941923.sh 2013-01-16 09:04:00.000000000 -0800 @@ -9,7 +9,7 @@ ## skip on windows OS=`uname -s` @@ -1058,7 +1397,7 @@ PS=":" FS="/" --- hotspot/test/runtime/7020373/Test7020373.sh 2012-08-10 09:29:17.000000000 -0700 -+++ hotspot/test/runtime/7020373/Test7020373.sh 2012-08-19 12:11:08.000000000 -0700 ++++ hotspot/test/runtime/7020373/Test7020373.sh 2013-01-16 09:04:00.000000000 -0800 @@ -32,7 +32,7 @@ # set platform-dependent variables OS=`uname -s` @@ -1069,7 +1408,7 @@ PS=":" FS="/" --- hotspot/test/runtime/7110720/Test7110720.sh 2012-08-10 09:29:18.000000000 -0700 -+++ hotspot/test/runtime/7110720/Test7110720.sh 2012-08-19 12:11:08.000000000 -0700 ++++ hotspot/test/runtime/7110720/Test7110720.sh 2013-01-16 09:04:00.000000000 -0800 @@ -37,7 +37,7 @@ # set platform-dependent variables OS=`uname -s` @@ -1079,8 +1418,1472 @@ FS="/" RM=/bin/rm CP=/bin/cp +--- hotspot/test/runtime/7158800/BadUtf8.java 2012-08-10 09:29:18.000000000 -0700 ++++ hotspot/test/runtime/7158800/BadUtf8.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,1254 +0,0 @@ +-/* +- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * This code is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. +- * +- * This code is distributed in the hope that it will be useful, but WITHOUT +- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +- * version 2 for more details (a copy is included in the LICENSE file that +- * accompanied this code). +- * +- * You should have received a copy of the GNU General Public License version +- * 2 along with this work; if not, write to the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +- * or visit www.oracle.com if you need additional information or have any +- * questions. +- */ +- +-/* +- * @test +- * @bug 7158800 +- * @summary Test that 1200 symbols that hash to the same value triggers +- * the symbol table alternate hashing mechanism. There isn't actually a +- * way to verify this. +- */ +-// +-// Generate large number of strings that hash to the same value +-// to slow down symbol table lookup. +- +-import java.io.BufferedOutputStream; +-import java.io.FileOutputStream; +- +-public class BadUtf8 { +-static String[] strings = { +- "EOcLKvbddZyPxYpb", +- "DncLKvbdPxmAGrqj", +- "DoCjjvbdpxoIHQdY", +- "EPCkKvbdqYoHfqEY", +- "DnbkKvbdezvYdiUX", +- "DnbjjvbdeEoRbXCj", +- "EObkKvbdbsCkUEKB", +- "EOcLKvbdnUtyjiqf", +- "DncLKvbdRWnDcMHc", +- "DoCkKvbdrSUkOLAm", +- "DncLKvbdfNFwGmJk", +- "EPDLKvbdvAdYroFI", +- "DoDLKvbdiGibyViu", +- "DncLKvbdYqNEhmFR", +- "DoCkKvbdEARhlzXX", +- "DncLKvbdSZjHsCvA", +- "DncKjvbdqTsgRqkU", +- "DnbjjvbdqAiFAXHd", +- "EPDKjvbdGcjvJaij", +- "DnbkKvbdwtldpxkn", +- "DoDKjvbdYkrETnMN", +- "EPCjjvbdbBWEfQQX", +- "EPCjjvbduMXwAtBX", +- "DncLKvbdbsCkTcia", +- "DoCjjvbdczYpYZRC", +- "EOcKjvbdFeiqmhsq", +- "DoCkKvbdKCicQibx", +- "EOcKjvbdZLrEUOLm", +- "DoCjjvbdaNKbStmH", +- "DoDKjvbdJbjDQjDY", +- "EPCkKvbdemFwGmKL", +- "EPDKjvbdZQleImEq", +- "DncKjvbdZjShPfbG", +- "DnbjjvbdqYnhHREY", +- "DoCkKvbdaRfDIUGL", +- "DoDKjvbdLrWlyuQz", +- "DnbjjvbdZisHofaf", +- "EObjjvbdhtydvrUb", +- "DnbjjvbdRotHKGEX", +- "EObjjvbdNeEThhkE", +- "EPCjjvbdZtJJZESn", +- "DoDKjvbdnPyxvLYb", +- "EPDKjvbdeEoRbWbj", +- "EOcLKvbdFxttaEXb", +- "EObjjvbddwystRez", +- "EPCjjvbdJpzEnenF", +- "DnbkKvbdTppntuIN", +- "EPCkKvbdTukpKUBR", +- "DnbkKvbdhlFEOUcZ", +- "EObkKvbdlhdUQuRa", +- "DnbjjvbdkClKqHUg", +- "EOcKjvbdqTtGqqkU", +- "DncKjvbdtkwvaUBX", +- "DoDKjvbdsQWOjCuf", +- "DncLKvbdEKIJuwjA", +- "DncKjvbdGLErcIMu", +- "EOcLKvbdNPwpumfs", +- "EObkKvbdnVUzLJrG", +- "DoCkKvbdcTDKsdKB", +- "DncKjvbdKRZdoFme", +- "EOcLKvbdemFvgNKL", +- "EPCkKvbdznopdblY", +- "EPDLKvbdOYPVzdOU", +- "DnbjjvbdsZlPsAhO", +- "DoDLKvbdKCjDRKDY", +- "DoCkKvbdhuZeXSVC", +- "EPDKjvbdOStVgEtp", +- "DncLKvbdvwMAvBWV", +- "EPDKjvbdBcoaWJlf", +- "EOcKjvbdZxdKODMS", +- "DoCjjvbdbsCkTcjB", +- "EOcLKvbdwWlAuaWV", +- "DnbjjvbdFejRnJUR", +- "DnbjjvbdmIdTqVSB", +- "DnbkKvbdqBIeAWhE", +- "DncKjvbdrMzJyMIJ", +- "DoCkKvbdZGvdAOsJ", +- "DncLKvbdjggLfFnL", +- "DoCjjvbdYqNFJMdq", +- "DoCkKvbdqZPHfqDx", +- "DncLKvbdOEdThiLE", +- "DoCkKvbdZirgpGaf", +- "EPDLKvbdziuQPdSt", +- "EObkKvbdKQyeOenF", +- "DoDLKvbduaDySndh", +- "DoCjjvbdVUNUGLvK", +- "DncKjvbdAMhYrvzY", +- "DnbkKvbdnQZxvKxb", +- "EPCjjvbdBhjakJFj", +- "DncLKvbdmfeYNNfy", +- "DoDLKvbdjlbLydfo", +- "DoDLKvbdpyPIGpcx", +- "EOcLKvbdnVUzLJqf", +- "DoCjjvbdmJETqVSB", +- "DoDLKvbdJTZAsMxM", +- "DoCkKvbdnQZxvLZC", +- "DoDKjvbdACqwizJQ", +- "DncKjvbdvBEZSoFI", +- "DncKjvbdGckVjCJj", +- "DncLKvbdiMFENtcZ", +- "Dnbjjvbdjuvmcaww", +- "DnbkKvbdZyEKNblS", +- "DoCjjvbduMYXBUBX", +- "DnbjjvbdFWYopNJe", +- "DoDKjvbdelfXGljL", +- "DnbjjvbdakLenmcA", +- "EPDKjvbdfILWRmpg", +- "EObjjvbdSLYeuHLT", +- "DoCjjvbdMfbolotk", +- "EPDLKvbdrRuKnKaN", +- "EOcKjvbdyzdnRhIh", +- "DoDLKvbdGAoRZJzm", +- "DoCjjvbdhlFDnUcZ", +- "EPDLKvbdmpZyVkYb", +- "DncKjvbdTpqPUuIN", +- "DncLKvbdHDjvJaij", +- "EPDLKvbdYlRcsmkm", +- "EPDLKvbdvlvAMdFN", +- "DncKjvbdIsZArmYM", +- "EOcLKvbdegjuqnQg", +- "EOcLKvbdZQmFJNFR", +- "DoCjjvbdZxdJmcMS", +- "EPCkKvbdlZTSTYgU", +- "DoDKjvbdqceJPnWB", +- "DncLKvbdVgwuxGxz", +- "DncKjvbdDnbkLXDE", +- "EPDLKvbdatbHYKsh", +- "DncKjvbdEzsqFLbi", +- "EPDLKvbdnVVZkKRf", +- "EOcKjvbdKeegbBQu", +- "EPCkKvbdKfGHaaRV", +- "EPDKjvbdmIctRVRa", +- "EPCjjvbdRMxBxnUz", +- "DnbjjvbdJYTbILpp", +- "EPCkKvbdTAEiHbPE", +- "EOcLKvbdfelZnGgA", +- "DoCjjvbdOStWGeUp", +- "EOcLKvbdemGXHNJk", +- "DoDKjvbdYTMAmUOx", +- "EPCkKvbdpyOhGpcx", +- "EPCkKvbdAMgxsWzY", +- "DnbjjvbdYkrETnMN", +- "EPDLKvbdUQqPUtgm", +- "DncKjvbdehKurNqH", +- "DoCjjvbdZMSETnLm", +- "DoDKjvbdIHGyyXwg", +- "EObjjvbdXGYzUAPT", +- "DoCjjvbdhbPCeWqR", +- "DoCkKvbdKNADzGuB", +- "DnbjjvbdFeirOJTq", +- "DncLKvbdaRecHtFk", +- "DnbkKvbdzoPpeClY", +- "EObkKvbdZRMeJMeR", +- "DnbjjvbdYfvdAPSi", +- "DncLKvbdJcKCqJcY", +- "EOcLKvbdqvokbhyR", +- "DoDLKvbdrRuLNjaN", +- "DoCjjvbdTlWPBWOi", +- "DoCkKvbdjvWnEBxX", +- "DoDLKvbdTkunaVoJ", +- "DoCkKvbdQZNAHTSK", +- "EObjjvbdqwPkbhyR", +- "EOcLKvbdNHDPlpUk", +- "DncLKvbdIHHZxxYH", +- "DncLKvbdtkxXAtAw", +- "DncLKvbdSCEFMJZL", +- "DnbjjvbdZQmEhldq", +- "DoCjjvbdNGbolotk", +- "DnbjjvbdnCKWwnmu", +- "DncLKvbdzHZMANEw", +- "DoDKjvbdmttykJrG", +- "DnbkKvbdlrZUzSci", +- "EPDKjvbdSKyGVHKs", +- "DoCjjvbdKVuGEFGi", +- "EPCjjvbdCIkBkIej", +- "DncLKvbdzHZMAMeX", +- "DnbkKvbdaSFbgsek", +- "DncLKvbdHDjujBij", +- "DoDKjvbdGZVUaDwb", +- "DnbjjvbdZnnJFEzK", +- "DoCkKvbdtcDUwWOo", +- "DoCkKvbdlBMoNALA", +- "EOcKjvbdNsUWHFUp", +- "DoDLKvbdVUNUFlVj", +- "DnbkKvbdhkdcnUcZ", +- "DncLKvbdLiBkqYAS", +- "EOcKjvbdzoPpdcLx", +- "EPDKjvbdijGIJmXr", +- "EOcKjvbdZisHofaf", +- "DoDLKvbdeOdrkUUS", +- "DoDLKvbdnPyxvKxb", +- "EPDKjvbdIxUBhMRQ", +- "DncLKvbdlhctRUqa", +- "DoDLKvbdmgFXlnGy", +- "DncKjvbdCJKbKiGK", +- "EOcLKvbddndrjtUS", +- "DnbjjvbdkDLjqGuH", +- "DncKjvbdmIcsptqa", +- "DoCkKvbdvvlAvBWV", +- "EObjjvbdjblLQftg", +- "DnbjjvbdCEQBWKMf", +- "DnbjjvbdBdPaVilf", +- "DoCkKvbdZxcjODLr", +- "DoCkKvbdEObjjwCd", +- "EPDKjvbdyTNhlqbH", +- "EPCkKvbdUMVoAvPJ", +- "DncKjvbdUxhUZjoO", +- "DncKjvbdqqtjmkAm", +- "DncKjvbdKfGICBRV", +- "EPCjjvbdVrOXaeLc", +- "EPDLKvbdwXLaWBWV", +- "EPCkKvbdjblKqHUg", +- "DnbjjvbduDCuWuoP", +- "EPDKjvbdNGbpMouL", +- "EObjjvbdBcoaVjNG", +- "DncLKvbdrWpMDIxq", +- "DncLKvbdhaoCdwRR", +- "DnbkKvbdFxtuBDwb", +- "DncKjvbdIjEAKPgE", +- "EOcLKvbduCbuXVoP", +- "DoDKjvbdZtIiZDsO", +- "DnbjjvbdEztRElCi", +- "DncLKvbdxmsHwsJD", +- "DnbjjvbdRbEElIxk", +- "DoDKjvbdWHwvXgYz", +- "EOcKjvbdQlwbYnUz", +- "EOcLKvbdVTltFkuj", +- "DncKjvbdliETptqa", +- "DnbkKvbddoErjtTr", +- "DoCkKvbdgPazvdXh", +- "DncKjvbdySmhlqag", +- "DoCjjvbdbPgHDkzd", +- "DoCkKvbdFWZPomKF", +- "EObjjvbdssSSxydc", +- "EObjjvbdzQnliJwA", +- "EObkKvbdKCjCpibx", +- "EPCjjvbdpyOhHREY", +- "DncLKvbddjJqutzn", +- "EObkKvbdBdQAujMf", +- "EPCkKvbdLAjflbXq", +- "DncLKvbdLBLGlaxR", +- "DoDLKvbdrpWPJbuf", +- "DoCjjvbdEKHiuxKA", +- "DoCjjvbdXsMAlsnx", +- "EObkKvbdptTgSSLU", +- "DoDKjvbdnHFXmNfy", +- "DncKjvbdCJKbKhej", +- "EPCjjvbdhlEdOUby", +- "EOcKjvbdKWUfEFGi", +- "DoDKjvbdZQmFJMdq", +- "EPCjjvbdiGjDZWKV", +- "EObkKvbdVAbQrprZ", +- "DoDKjvbdfekzNgHA", +- "DoDLKvbdnHEwlmgZ", +- "DncKjvbdwzHeexEr", +- "DoCjjvbdmpZxujyC", +- "EPDKjvbdwMvAMcdm", +- "DoCjjvbdfHkVrNqH", +- "EPCkKvbdYzbfRiuy", +- "EPCkKvbdZtIiZDrn", +- "DnbjjvbdjvWnDbYX", +- "DoCjjvbdOStVgEtp", +- "EPDLKvbdZMSETmlN", +- "EPDKjvbdBhjajhej", +- "EPCjjvbddoFTLUUS", +- "DnbkKvbdsQVoJcWG", +- "EPCjjvbdrEFJQNvB", +- "DoCjjvbdMpYRWOGs", +- "EOcLKvbdZirgpHBf", +- "EPDLKvbdyOTIXsJD", +- "DoCkKvbdKRZdnfNe", +- "DnbjjvbdbBWFFoow", +- "EPCjjvbdgFlZnHHA", +- "DnbkKvbdGGJrOIsq", +- "DoDLKvbduDCtwWPP", +- "EObjjvbdNddUIhjd", +- "DnbjjvbdxsNiMqag", +- "EObjjvbddeOrCWbj", +- "EObjjvbdPxmAGsRj", +- "EOcLKvbddeOrCXDK", +- "DoDLKvbddeOrBwCj", +- "DoCjjvbdVqnYCElD", +- "DnbkKvbdUyIUZjoO", +- "EObjjvbdeFOrCXDK", +- "EObkKvbdVrNxCFLc", +- "EObjjvbdTfzmkwWF", +- "EOcKjvbdIHGzZYYH", +- "EPDKjvbdtbbuXWPP", +- "DoCjjvbdZisIQHBf", +- "EObjjvbdbsCkUDjB", +- "EPCkKvbdVwJXudFH", +- "EPDKjvbdrouoKDVf", +- "EPCkKvbdFyVVBEYC", +- "DncLKvbdZnnIeEzK", +- "EPDLKvbdxVNFQxkn", +- "DoDKjvbdpxnggRDx", +- "DoDLKvbdqZOgfpcx", +- "DncKjvbdCIjakJGK", +- "EPCkKvbdCJLBjhej", +- "DoDLKvbdnPzYvKxb", +- "EOcKjvbdqTsgSRkU", +- "EOcLKvbdLBLGlaxR", +- "DoDLKvbdcbTMrAUN", +- "DncLKvbdzitoodSt", +- "DoDKjvbdJvUfDdfi", +- "EOcLKvbdHDjvKCJj", +- "EPCkKvbdeOeTKssr", +- "DnbkKvbdlYrqsYft", +- "DncLKvbdiiehKMxS", +- "DncKjvbdURQoVUhN", +- "DnbkKvbduMYXBUAw", +- "DoDLKvbdSPtHJfEX", +- "EObkKvbdqBJFAWgd", +- "EOcKjvbdFpATWgFy", +- "DoDLKvbdBsBDTfXS", +- "DncKjvbdjhHLfFmk", +- "DoCjjvbdCJKakIfK", +- "DnbkKvbddoFSjtTr", +- "EObkKvbdANIYsWzY", +- "EObjjvbdCTAbtFvr", +- "EObjjvbdrRtkOLAm", +- "DnbkKvbdkxsSTYgU", +- "DoCjjvbdnBiwXnmu", +- "EObjjvbdwtmEqYlO", +- "EPDKjvbdrylQTAhO", +- "DoDLKvbdtbbtvvOo", +- "EPCjjvbdZLrETmlN", +- "EPDLKvbdWXJYWDdg", +- "DoCkKvbdKQzFOfOF", +- "EPCjjvbdwzIFfXeS", +- "DncKjvbdRjyFuHLT", +- "EPDLKvbdULunaWPJ", +- "DncKjvbdUxhTykOn", +- "DnbkKvbdJcKCqKDY", +- "EPDLKvbdcbSmSATm", +- "DnbkKvbdegjurNqH", +- "EPDKjvbdZjTIQGbG", +- "EPCjjvbdiLddNuCy", +- "DoCjjvbdZQldiNEq", +- "EOcLKvbdakMGPODA", +- "EObjjvbdnHEwlmgZ", +- "EOcLKvbdBsAcUGXS", +- "EPCkKvbdiVZdwSUb", +- "EOcLKvbddCTNSAUN", +- "DnbkKvbdEXxMUUUM", +- "DncKjvbdYpldiMeR", +- "DoDKjvbdNddTiIjd", +- "DoDLKvbdZLqdUNlN", +- "EPCkKvbdiBncFWpq", +- "DncLKvbdiCPDEvqR", +- "EOcKjvbdUyHszKoO", +- "DncKjvbdhtydvqtb", +- "EPCjjvbdpxoHgQcx", +- "EObkKvbdkWWnDaxX", +- "DnbjjvbdBhkBkJFj", +- "DoCkKvbdRacdkhyL", +- "EOcLKvbdZjTHpHCG", +- "EPCkKvbdMowqWOGs", +- "DncLKvbdegjurNpg", +- "EObjjvbdfMfWfmKL", +- "EPDLKvbdZirgpGaf", +- "DoDLKvbdiZuFlQnG", +- "DncLKvbdFxuVAcxC", +- "EObkKvbdZisHofaf", +- "EOcKjvbdJSyBSmYM", +- "EPDLKvbdVYgtZkPO", +- "EOcKjvbdRbEFMJYk", +- "DncLKvbdrEFIonWB", +- "DncKjvbdKDJbqJcY", +- "EOcLKvbdhfjCxuiu", +- "EObjjvbdLLAhWAKZ", +- "DoCkKvbdRXNcblID", +- "DoDLKvbdcbSmSATm", +- "EOcLKvbdwWlAvAuu", +- "EObkKvbdiBnbdvpq", +- "DoCkKvbdNQXpumgT", +- "DncLKvbdkVwOECYX", +- "DnbkKvbdfoazwDxI", +- "DoDLKvbdbBWFFpPw", +- "DoDLKvbdvBDxsPEh", +- "EPDKjvbdJqZdoFme", +- "DoDLKvbdIryArmXl", +- "EPCjjvbdANIZSwZx", +- "EPCkKvbdVhYVxGxz", +- "DncKjvbdLAjgNCYR", +- "DncKjvbdxxIjCQZk", +- "DncKjvbdbiNKKewY", +- "EPCjjvbdlrZVZsEJ", +- "EPDKjvbdIryAsMwl", +- "DoCkKvbdtAHRIAAr", +- "EPDKjvbdJmAEZfuB", +- "EPCkKvbdZjSgogBf", +- "DoDLKvbdOXnuzcnU", +- "DnbkKvbdehKvRnQg", +- "EObjjvbdZyDimbkr", +- "DoDKjvbdmajWwoOV", +- "EOcKjvbdkMalZeHP", +- "EOcKjvbdIjEAJpHE", +- "EPCkKvbdDihKVxKA", +- "DncKjvbdNddUIiKd", +- "EObjjvbdqdFIpOWB", +- "DoCkKvbdxnShXsJD", +- "DoDLKvbdjmBkzEfo", +- "EOcLKvbdatagYLTh", +- "DoCjjvbdVhYVxHYz", +- "DnbjjvbdJbjDRKDY", +- "EPCjjvbdLBLHNCYR", +- "DnbjjvbdnGeYNOGy", +- "EOcLKvbdUsmTekvK", +- "EPCjjvbdtkxXBTaX", +- "EPCjjvbdzoPqFCkx", +- "DncKjvbdCIjbKhej", +- "DncKjvbdZLqdTmkm", +- "DoDKjvbdsPunicVf", +- "EOcKjvbdmgFXmNgZ", +- "EObkKvbdiMFENuCy", +- "DoDKjvbdhanbeXRR", +- "EObkKvbdACqwiyhp", +- "DncKjvbdZisIQHBf", +- "EPCjjvbdgQBzwDwh", +- "DnbjjvbdyYJJaoyk", +- "DoDKjvbdxUldqZMO", +- "EObkKvbdkClLQgVH", +- "EPCjjvbdZQldiMeR", +- "EPDLKvbdZyEKOClS", +- "EPDLKvbdcIlikFvx", +- "DoDKjvbdrzMQTBHn", +- "DnbjjvbdVYgtZkPO", +- "DoDLKvbdHEKuiajK", +- "EPCkKvbdczZQXxqC", +- "DoDKjvbdrDdiQNua", +- "DncLKvbdcImKLGWx", +- "DoCjjvbdVYgtZkPO", +- "EPDLKvbdZnnIeFZj", +- "EPDKjvbdMIakqYAS", +- "DoCkKvbdSLYfUgLT", +- "EPDLKvbdiCObdvpq", +- "DnbjjvbdRpUHKFcw", +- "DoDLKvbdIHHZyYXg", +- "EPCjjvbdypoMhiwA", +- "DnbkKvbdCEPaVjMf", +- "DnbkKvbderAvzlDP", +- "DnbkKvbdZQleImFR", +- "EOcKjvbdKRZdneme", +- "DoDLKvbdiBnbeXQq", +- "DncLKvbdEPDKjvcE", +- "EOcLKvbdauCGwkTh", +- "DncLKvbdEvZQPmJe", +- "EPCkKvbdURQnuVIN", +- "DncLKvbdegjvSOQg", +- "EPCjjvbdKaKgMawq", +- "DnbkKvbdRzKISbvA", +- "DncLKvbdiLdcnUcZ", +- "EPDLKvbdkDMKpfuH", +- "DoDLKvbdRbDdkhyL", +- "DnbjjvbdDwxMUUTl", +- "DnbkKvbdrpWPKCuf", +- "DnbkKvbdNVSqjmAX", +- "DoDKjvbdRbDeMIxk", +- "EOcLKvbdcyxpXyRC", +- "DncLKvbdRMwbYnUz", +- "EObjjvbdqlzJxlHi", +- "DoCkKvbdJYUCIMQp", +- "DncLKvbdLZQjSzuG", +- "EOcKjvbdxVNEqYkn", +- "DnbkKvbdZoOIeFZj", +- "DoCjjvbdBraCtFwS", +- "EOcLKvbdliDsqVSB", +- "EPCkKvbdeATqNXif", +- "DncLKvbdkMbLydgP", +- "EObjjvbdZxdJmbkr", +- "DoCjjvbdraellHLZ", +- "EObkKvbduDCuWvPP", +- "DoCkKvbdpstGrSLU", +- "DoCjjvbdLGFgbBQu", +- "DnbkKvbdhtzFWquC", +- "EObjjvbdoAKztHdO", +- "EPDLKvbdatafxKtI", +- "EPDKjvbdkWXNcaww", +- "DoCkKvbdwkXEHzzG", +- "EObkKvbdmgEwmNgZ", +- "DncKjvbdBiLCLJFj", +- "DoCjjvbdeOdsKssr", +- "EOcLKvbdfILWSORH", +- "EObkKvbdCDpAujMf", +- "EPDKjvbdKDKDQibx", +- "DoDKjvbdVUMtGLuj", +- "EObkKvbdrXQMCiYq", +- "DncKjvbdePEsLTtS", +- "DncLKvbdDxYLtUTl", +- "EPCkKvbdGYuVBEYC", +- "DncLKvbdNeEUIiKd", +- "EPCkKvbdpxoIHRDx", +- "EObjjvbdFkEsDHlu", +- "EObjjvbdssSSxzFD", +- "DoCkKvbdUtNTfMVj", +- "DnbjjvbdJcKDRKDY", +- "DncKjvbdqiAKEmOe", +- "DoDKjvbdtlXwAtBX", +- "DnbkKvbdxmsIYTIc", +- "EObkKvbdLrXMzUpz", +- "DoCjjvbdkxsSSxft", +- "DncKjvbdQlwaxnUz", +- "EObkKvbdjhGlFfNk", +- "EPCkKvbdxsNhmRag", +- "DoDLKvbdMfcPmQUk", +- "DoDKjvbdQvnEDLhD", +- "EObjjvbdVgxVxHYz", +- "DoDLKvbdlrYtyrdJ", +- "DoCjjvbdezvYeIsw", +- "DncLKvbdNddTiIjd", +- "EPDLKvbdGGJrNiUR", +- "EPDLKvbdRzJhTDWA", +- "EPCjjvbdvvkaWBVu", +- "EOcKjvbdRXNdCkgc", +- "EOcKjvbdQZNAHTSK", +- "EPCkKvbdsCGNLfkZ", +- "EOcLKvbdDwwktTsl", +- "EOcLKvbdqlzJyLgi", +- "EOcLKvbdxsNiMqag", +- "EOcLKvbdhzVFlROG", +- "EOcKjvbdEztRFMCi", +- "DnbkKvbdqiAJdmPF", +- "EPDLKvbdjcMKqGtg", +- "EObkKvbdTlWOaWOi", +- "EPDLKvbdURRPUuHm", +- "DoDKjvbdelfWgNKL", +- "EOcLKvbdGAnqZJzm", +- "EObjjvbdGZUuAdXb", +- "DoDLKvbduLwwAtAw", +- "DoCjjvbdZjTIQGbG", +- "EPCjjvbdRNXbYnUz", +- "EPDLKvbdiLeENtby", +- "EObjjvbdMowpunGs", +- "EOcKjvbdbiNJjevx", +- "DoDKjvbdEYYLstTl", +- "DoDLKvbdqUTfrRjt", +- "DoDKjvbdbsCkUEJa", +- "DoDKjvbdXsMBNUPY", +- "EPCjjvbdRNXaxnUz", +- "DoDLKvbdNGcQNQUk", +- "DnbjjvbdEARiMywX", +- "EPDKjvbdSKxfUfkT", +- "DncKjvbdhtyeXRtb", +- "DncKjvbdZLqcsnLm", +- "EObkKvbdZnmheEzK", +- "EObjjvbdtbcUvuno", +- "DnbjjvbdrzMQTBHn", +- "DnbjjvbdDwwktTsl", +- "EPDKjvbdkxsSTYgU", +- "DoDKjvbdIryArlxM", +- "DoDKjvbdnBivxOnV", +- "DoDKjvbdeATplwif", +- "EOcLKvbdKeegbApu", +- "EPCjjvbdMgDQMotk", +- "DoCjjvbduCbtwWOo", +- "DnbkKvbdyNsHwrhc", +- "DnbkKvbdtvNxJpsA", +- "EOcLKvbdqAheAWgd", +- "DoCkKvbdURQoUtgm", +- "EOcKjvbdqceIpOWB", +- "DoCkKvbdVwIwudFH", +- "DnbkKvbdbLMFnmcA", +- "EOcLKvbdZjTHpHBf", +- "EOcKjvbdRXNdCkhD", +- "EPDLKvbdiHJcZViu", +- "DoCjjvbdxxIjCPzL", +- "DnbkKvbdBcpBWJmG", +- "EPCkKvbdZyEKOCkr", +- "EPDKjvbdOTUWHFVQ", +- "DoCjjvbdIGgZxwwg", +- "EPDLKvbdFjeSbhMu", +- "EPDLKvbdhgKCxvJu", +- "EOcLKvbdNsUWGdtp", +- "EPDKjvbduVnXipsA", +- "DncLKvbdGYuVBEXb", +- "EPDLKvbdZtIhyESn", +- "DoDKjvbdZxdJmcLr", +- "DoCjjvbdUsltGLuj", +- "DoDKjvbdDoDLKvbd", +- "DncLKvbdrDdhpNvB", +- "EPDLKvbdKCjDRJbx", +- "DoDLKvbdxLWdHzyf", +- "EObkKvbdrzMQTAhO", +- "EOcLKvbdOFDtJJKd", +- "EPCkKvbdrSVKmjaN", +- "EOcKjvbdWWiYVdEg", +- "EOcKjvbdWWhwvDdg", +- "DncKjvbdpstHRqjt", +- "EPCkKvbdKWVFceGi", +- "DoCkKvbdZjShPfbG", +- "DoCkKvbdSxKlNzkY", +- "EPDLKvbdIwtCHkqQ", +- "EOcKjvbdsCGNLgLZ", +- "DncKjvbdzaAOfgCM", +- "DoDLKvbdxmrhYSiD", +- "DncLKvbdfMfWgMjL", +- "EPDKjvbdqFdEsuaI", +- "EOcLKvbdiLeDnUcZ", +- "DoCjjvbdKVuFceHJ", +- "DoCjjvbdfekzNgHA", +- "EOcKjvbdOFEThiLE", +- "EPDLKvbdqceJPnWB", +- "DoDLKvbduCbtwWOo", +- "DncKjvbdTqROtuIN", +- "DncKjvbdpedFUWBI", +- "DoDLKvbdrEFJQNua", +- "DoDLKvbdyXhjCPyk", +- "EPCkKvbdJYUBhLqQ", +- "EPCkKvbdtcCuXVno", +- "DoDLKvbdZLrEUOLm", +- "EPCkKvbdpstGrRjt", +- "DncLKvbddePSCXCj", +- "EObkKvbdauCHXjsh", +- "DoDLKvbdkHfkefNk", +- "EObjjvbdMRwMzUpz", +- "EObjjvbdaMkCTVNH", +- "DoCkKvbdGGJrNhtR", +- "EPDLKvbdvBDxrneI", +- "EPDLKvbdIHHZxwxH", +- "EOcLKvbdrJAJdmPF", +- "EOcKjvbdGZUuAdXb", +- "EOcLKvbdbUbHYLUI", +- "DnbjjvbdJzofYEAN", +- "EPDKjvbdFxtuBDxC", +- "DnbkKvbdQvnDbkgc", +- "EPDKjvbdJmADzGta", +- "DoDKjvbdZRMdhleR", +- "DnbkKvbdsrqsZZeD", +- "EObkKvbdrovPJbuf", +- "EPCjjvbddeOqbXCj", +- "EObjjvbdtcDVXVoP", +- "DncKjvbdMfbpNQVL", +- "DoCkKvbdhbPCeXQq", +- "DoCkKvbdNHComQVL", +- "EObjjvbdvBDxroFI", +- "EPCjjvbdnBivwoNu", +- "EObjjvbdbhljKewY", +- "EPDKjvbdZyDimcMS", +- "EObkKvbdWSOXbElD", +- "EOcKjvbdTfznMXVe", +- "EPCjjvbdZtJJYcsO", +- "DoCjjvbdRjxfVHLT", +- "DoCkKvbdVTltGMVj", +- "DncKjvbdYfwEAOri", +- "DncKjvbdYkrEUOMN", +- "EObkKvbdqGEEsuaI", +- "DncLKvbdjJfHimXr", +- "EPDLKvbddndsLUTr", +- "DnbkKvbdqBJFAWhE", +- "EPDLKvbdEOcKjwDE", +- "EPCkKvbdtvOYJqTA", +- "DncLKvbdkyTRsZHU", +- "DoCjjvbdTppnuVIN", +- "DncLKvbdwyhFeweS", +- "DncKjvbdsBelkgKy", +- "DoCjjvbdKDKCqJcY", +- "DoCjjvbdkClKqHVH", +- "DoCjjvbdcTCjtDia", +- "EPDLKvbdUVkpJtAq", +- "EPDLKvbdRyjITCvA", +- "DnbjjvbdJuuFcdgJ", +- "DoDKjvbdrJAJdmOe", +- "DncKjvbdJcJbqKCx", +- "DoDLKvbdJcJbqJcY", +- "DoDKjvbdeEoSCXDK", +- "DoDLKvbdSwjlNzkY", +- "EObjjvbdzitopDrt", +- "DoCkKvbdKWVGEEgJ", +- "DncKjvbdpssfqrKt", +- "EOcLKvbdUMWPBVoJ", +- "DncKjvbdyzdmrIIh", +- "EPCjjvbdxUldqZLn", +- "DoDLKvbdySnImRbH", +- "DoCjjvbdGdKvJaij", +- "DoCkKvbdxZgeewdr", +- "EObkKvbdiLddNuDZ", +- "DnbjjvbdSCDdkiZL", +- "DncKjvbdznpREcMY", +- "EOcLKvbdaRebhTfL", +- "DnbjjvbdZQldiMdq", +- "EPCjjvbdbrbjtEKB", +- "EOcKjvbdEARiMzXX", +- "DoDLKvbdXrkaNTnx", +- "EPCkKvbdQZNAHTRj", +- "DoDLKvbdEzspeLcJ", +- "EPCjjvbduVnYKRTA", +- "EObjjvbdJXtBhMQp", +- "EPDKjvbdeOdrjssr", +- "EPCjjvbdLqwMytpz", +- "EPDKjvbdUMVoBVoJ", +- "DncKjvbdRpUGifDw", +- "EPDLKvbdZyDinDLr", +- "DnbkKvbdNrsufeVQ", +- "EPCkKvbdZMSDtNlN", +- "EPCkKvbdySnJNSCH", +- "EPCjjvbdfMevfljL", +- "DncLKvbdXsMBNTnx", +- "DnbkKvbdpxoHfqDx", +- "DncLKvbdUQpntthN", +- "DncKjvbdIsZArlwl", +- "DoDLKvbdZGwEAOsJ", +- "EOcKjvbdVvhwvDdg", +- "EOcLKvbduWNxJqTA", +- "EPCjjvbdHEKvJaij", +- "DoDKjvbdrpWOjCuf", +- "DncLKvbdrpWOjDVf", +- "DoCjjvbdIHGzYwwg", +- "DoDLKvbdpxoIGqEY", +- "DoDLKvbdJcJbqKDY", +- "DoCjjvbdRWmdClHc", +- "EPCjjvbdFWYopNJe", +- "DncKjvbdmfdwlmfy", +- "DoCkKvbdxUleQxlO", +- "EObjjvbdnGdxMnGy", +- "EPCjjvbdvvlAvBVu", +- "DncLKvbddndsKssr", +- "EObjjvbdZMRcsnLm", +- "EOcKjvbdFxttaEXb", +- "DncKjvbdVUNTfMVj", +- "EOcLKvbdNrtWHFUp", +- "DoDKjvbdwuMdqYlO", +- "EPDLKvbdrXPkbhxq", +- "EObjjvbdrEFIpNua", +- "EObjjvbdziuQQDrt", +- "EOcLKvbdqYoIGpcx", +- "DnbjjvbdsQVoJcVf", +- "EObkKvbdkDMKpgUg", +- "EObjjvbdvBDyTPFI", +- "DncKjvbduCbuWvOo", +- "EPCjjvbdkVvnECYX", +- "DncLKvbdZGvdAOri", +- "DoCkKvbdrXPlDJZR", +- "EOcLKvbduCcVWvOo", +- "DoDKjvbdCEPaWJlf", +- "EPDKjvbddoErjssr", +- "DncKjvbdACqxKZiQ", +- "EPCjjvbdUVlPitAq", +- "EPDKjvbdjJfHjMxS", +- "EObkKvbdAMhYsWzY", +- "DoDKjvbdnBivxOmu", +- "EOcLKvbdbiNKKfXY", +- "EPDKjvbdYqMeIleR", +- "EObkKvbdJmADygUa", +- "EObjjvbdEPDLLWcE", +- "EPCjjvbdrXPkcIxq", +- "EOcLKvbdliDtQtqa", +- "DoCjjvbdmoyxujyC", +- "EPDLKvbddoFTLTsr", +- "EOcLKvbdCWzdJEpW", +- "DnbjjvbdrEEhpOWB", +- "DoDKjvbdZLrDtNkm", +- "EOcLKvbdLFfHbAqV", +- "EOcKjvbdmttzLKSG", +- "EOcLKvbdmbJvwoOV", +- "EOcKjvbdUaCQrqSZ", +- "DnbjjvbdmgExMnGy", +- "EPDKjvbddndrkUUS", +- "EObkKvbdDwwkstTl", +- "DoCkKvbdcJMjLFwY", +- "DnbjjvbdaNLBruMg", +- "DoDLKvbdQYmAHTRj", +- "DnbkKvbdsQWOicWG", +- "EObkKvbdMRwMzUpz", +- "DoDLKvbdZshiZDrn", +- "EPDLKvbdnPzYujxb", +- "EOcKjvbdCEQAujMf", +- "EPDLKvbdKefHbApu", +- "DoDLKvbdYpldiNFR", +- "DoCkKvbdFWZQQNJe", +- "DncLKvbdznpQeCkx", +- "EOcKjvbdnQZxvKxb", +- "DoCkKvbdVBBprpqy", +- "DnbkKvbdZirhPfaf", +- "DnbkKvbdegjvSNqH", +- "EOcLKvbdqdEiPnWB", +- "EObjjvbdBhkCKiGK", +- "EObjjvbdxZgfGYFS", +- "DnbjjvbdNQYQumgT", +- "EPCjjvbdxsNhlrBg", +- "DoCkKvbdQdDApRDr", +- "DoCkKvbdxxIiaoyk", +- "EPDKjvbdFeirNhtR", +- "DoCjjvbdegjvSOQg", +- "EObkKvbdqcdiQNvB", +- "DncLKvbdiMEdNtcZ", +- "DncLKvbdTqRPUthN", +- "EPCkKvbdwygeexFS", +- "DoDKjvbdyTOJMrBg", +- "DncLKvbdeEoRavbj", +- "EPCjjvbdtbcUvvOo", +- "EObjjvbdKCicRJcY", +- "EObjjvbdZyEKODMS", +- "DnbjjvbdmJDtQtrB", +- "DncLKvbdEARhlyvw", +- "DnbjjvbdIxTbILqQ", +- "EOcLKvbdwygefYFS", +- "DoCjjvbdznoqFCkx", +- "DoCjjvbdRpUGjGDw", +- "DncKjvbdhzVGMQnG", +- "EPCjjvbdhkeDnVCy", +- "EObkKvbdOEdUIiKd", +- "DncKjvbdrDeIomua", +- "DncLKvbdiHJbxuiu", +- "EPDKjvbddxZstRez", +- "EPDLKvbdmSYuZrdJ", +- "EObkKvbdVUNUFkvK", +- "EPDLKvbdNeEUJIjd", +- "DoCkKvbdiMEdNuCy", +- "DoDLKvbdRDcApQcr", +- "EPCjjvbdTlVoBVoJ", +- "EObjjvbdLBKgNBwq", +- "EPCkKvbdsCFllHKy", +- "EObjjvbdnVUzLJqf", +- "DoDKjvbdqrVLNkBN", +- "DoCkKvbdqFcdtWBI", +- "DncLKvbdbVCGxLTh", +- "EOcLKvbdeFPSCXCj", +- "EOcLKvbdRpTgKFdX", +- "EObjjvbdznpQeDLx", +- "EOcKjvbdjvXNcaxX", +- "DnbjjvbdHDkWJbJj", +- "DncKjvbdhkeENuDZ", +- "DnbkKvbdnUtyjjSG", +- "DoDKjvbdSQUHJfDw", +- "DncKjvbdbUbHYLUI", +- "EOcLKvbdNsTvGduQ", +- "EPDLKvbdSZigsCvA", +- "DncKjvbdMfcPlpUk", +- "DoDLKvbdxrnIlrBg", +- "DncKjvbdiLdcnVCy", +- "EPCjjvbdmfeYNOHZ", +- "DoCkKvbdjvWmcaxX", +- "DoDKjvbdbUbHXkUI", +- "DncKjvbdBhkBjiFj", +- "DoDLKvbdNHColpVL", +- "EOcKjvbdrykosAhO", +- "DncLKvbdqGDeUVaI", +- "DnbkKvbdhgJcZViu", +- "DnbjjvbduLxXAtBX", +- "EPCjjvbdYpleJNFR", +- "EPDLKvbdQvmdClHc", +- "DnbjjvbdJYTbIMRQ", +- "DncLKvbdznpRFDMY", +- "EOcLKvbdZnmiFEyj", +- "DnbkKvbdrRuLOLAm", +- "EObkKvbdhkeEOUby", +- "DncLKvbdYlSEUOLm", +- "DoCjjvbdhkdcmtby", +- "DncLKvbdddnrCXDK", +- "DoDLKvbdKaLHNCYR", +- "EOcKjvbdcyxpYZQb", +- "EPDLKvbdACqwjZhp", +- "DoCkKvbdBsBDTevr", +- "EObkKvbdeKJqvUzn", +- "EObkKvbdcImJkGWx", +- "DncLKvbdYSlAltOx", +- "DncLKvbdlrYtyrdJ", +- "EObkKvbdKxqJrztf", +- "EOcKjvbdsQWPJcVf", +- "DoDKjvbdkySqrxgU", +- "EObjjvbdeEoRbXCj", +- "EOcKjvbdHDkVjBij", +- "DoDLKvbdCTBCsfXS", +- "DoCjjvbdKCjDQibx", +- "DoCjjvbdlhdTqUrB", +- "DoDKjvbdTulQKTaR", +- "DoCkKvbdRjxetfkT", +- "EPCjjvbdEuyQQNKF", +- "EPCjjvbdDoDKkXDE", +- "DoCjjvbdsQWPJbuf", +- "DoDKjvbdhuZdvqtb", +- "EPDLKvbdiHKCyWJu", +- "EPDLKvbdLFegaaQu", +- "DoCjjvbdqZPHgRDx", +- "DncKjvbdUWMPjUAq", +- "DoDLKvbdTYKkmzjx", +- "DoDKjvbdegjvSOQg", +- "DnbkKvbdUtNTekvK", +- "EObkKvbdNsTvGeVQ", +- "DoDLKvbdfNFvgMjL", +- "EOcLKvbdZQmEiNEq", +- "EPDKjvbdBraDTfWr", +- "EPDKjvbdNGcQNQVL", +- "EPDLKvbdZyEKODMS", +- "EOcKjvbdBvzdIdpW", +- "EPCjjvbdACqwiyiQ", +- "DoCjjvbddePRawCj", +- "EPDKjvbdWWiXucdg", +- "DoDKjvbdWexzUAPT", +- "DnbjjvbdwXMBWBWV", +- "EOcLKvbdUyHszLOn", +- "EPCkKvbdOYOuzcnU", +- "EPCkKvbdhancEwQq", +- "DnbkKvbdjggLefOL", +- "EPCkKvbdFjdsDIMu", +- "DoDKjvbdrSUjmkBN", +- "DoDLKvbdZjTIQGaf", +- "DoDKjvbdMgDPmPtk", +- "EPDLKvbdWRmwbFMD", +- "DoCkKvbdzROmJKXA", +- "DnbkKvbdrDdiQNvB", +- "DnbjjvbduDCtwVoP", +- "EOcLKvbdCIjbLJFj", +- "EPDKjvbdXrkaMsnx", +- "EPDKjvbdVhXvXfxz", +- "DncKjvbdhbPDEwRR", +- "DoCkKvbdpxoHgQcx", +- "DoCkKvbduMXwBUBX", +- "EObjjvbdNeEThhjd", +- "DoCjjvbdirzhrkJz", +- "DoDLKvbdaMkCTUlg", +- "DncLKvbdWRnYBeLc", +- "DnbjjvbdGBPRZJzm", +- "EOcLKvbdeOeSjstS", +- "DoDLKvbdmIctRVSB", +- "DoCjjvbdZxdJnDMS", +- "DoCkKvbdRpTgKFcw", +- "DncLKvbdTukojTaR", +- "DnbjjvbdKRZdoFme", +- "DnbkKvbdURQoVUhN", +- "DoDLKvbdyYJKBozL", +- "EObkKvbdfNFwHMjL", +- "DoDLKvbdZisIQHBf", +- "EObkKvbdqFcdsuaI", +- "DncLKvbdzoPqFDLx", +- "DoDKjvbdSKxeuHLT", +- "EPDKjvbdsBemLfjy", +- "DoCjjvbdJbjCqJcY", +- "DoCjjvbdNPxRVnGs", +- "DncLKvbdGcjvJbKK", +- "EOcKjvbdrWpMDIxq", +- "EOcLKvbdQdDApQcr", +- "DoDKjvbdZMRdTnLm", +- "EOcLKvbddxZssrFz", +- "EObjjvbdUtNTfLuj", +- "EPCjjvbdLLBIWAKZ", +- "DoCkKvbdgFlZmfgA", +- "EPCjjvbdUVkoitAq", +- "DoDKjvbdDncKjvcE", +- "DoDLKvbdRpUHJfEX", +- "EPDKjvbdLqvlzVQz", +- "EPDKjvbdZMRdUOLm", +- "EOcLKvbdCJLBkIfK", +- "DncKjvbdaSFbhUFk", +- "EPDLKvbdZoNheEzK", +- "DncKjvbdUVlPjUAq", +- "DnbkKvbdKNADyfuB", +- "EObkKvbdZdwfzghb", +- "EPDLKvbdZtIhxcrn", +- "EObkKvbdGckViajK", +- "DncLKvbdFfJqmiUR", +- "DncKjvbdKWUfDdgJ", +- "DoDKjvbdMtrqjmAX", +- "EOcLKvbdsQWPKDVf", +- "DoCjjvbdwtleRZMO", +- "EObjjvbduaDxsPEh", +- "EPDLKvbdKxqJrzuG", +- "EOcKjvbdVAaprprZ", +- "EObjjvbdEuxopMjF", +- "DnbjjvbdyOTHwriD", +- "EPDLKvbdrpVnibvG", +- "EPDKjvbdkWWnDaww", +- "DncLKvbdrXPkbiYq", +- "DoDLKvbddxZssqez", +- "EOcLKvbdHDkWJbJj", +- "DncLKvbdEPCkLWcE", +- "DnbkKvbdEXwkstTl", +- "EObjjvbdqiAKEmOe", +- "DncLKvbdjAQGaQGj", +- "EPCjjvbdNeDtJJKd", +- "EPCjjvbdvwMBWBVu", +- "EPDKjvbdFejSOItR", +- "EOcLKvbdNPwqWOHT", +- "EPDKjvbdbsCjscia", +- "EObkKvbdyYIiaoyk", +- "DoDKjvbdLZQirzuG", +- "EObjjvbdSLZGVGjs", +- "DoCjjvbdAMgxsWzY", +- "DoDLKvbdEObjjwCd", +- "DnbkKvbdsPvOicWG", +- "EPCkKvbdrJAKElne", +- "EPCkKvbdauCGwjsh", +- "DncLKvbdegkWRnQg", +- "EPCkKvbdYpmEiNFR", +- "DoDKjvbduaDxsPFI", +- "DoCjjvbdcyxoxYqC", +- "DoCkKvbdkMakzFHP", +- "DnbjjvbdJbibqJbx", +- "DnbkKvbdWWhxWDeH", +- "DoCjjvbdssRsYzFD", +- "DoDKjvbdpyPIHRDx", +- "DncLKvbdwNWANDeN", +- "DoDKjvbdJYUBglRQ", +- "EObkKvbdXnRAYVVt", +- "DoCjjvbdUWLpKTaR", +- "DoDKjvbdTqROttgm", +- "EPCkKvbdVqnXaeMD", +- "EObjjvbdADRwiyiQ", +- "DoDKjvbdlrZUyrci", +- "EPDKjvbdvAdZSndh", +- "DoCkKvbdzoQQeDLx", +- "DnbkKvbdSQUGjFdX", +- "EOcLKvbdqBJFAXIE", +- "EObkKvbdSCEFLiZL", +- "DnbjjvbdzoQQdcMY", +- "DnbkKvbdpxngfqEY", +- "DncLKvbdbsDLUEKB", +- "DoCjjvbdXrlBMtOx", +- "EObjjvbdKCjDQicY", +- "DncLKvbdLrWlzUpz", +- "EObjjvbdaaWEfQQX", +- "EObjjvbdtlYWaTaX", +- "DnbkKvbdMowpunGs", +- "EObkKvbdSLYeuHKs", +- "EObkKvbdTAEhhCOd", +- "EPCkKvbdmSYtyrci", +- "DncLKvbdYkqcsnLm", +- "DoDLKvbdrylQTAgn", +- "DncLKvbdJXtCIMRQ", +- "EObkKvbdSBdElIyL", +- "DoDLKvbdwygefYFS", +- "DncKjvbdyXhibPzL", +- "EPCjjvbduaDxsPFI", +- "EObjjvbdZoNiFEzK", +- "EPCjjvbdkNBkyeHP", +- "EPCkKvbdWRnXadlD", +- "DncLKvbdRWmdDLhD", +- "DnbkKvbdmSYtzTDi", +- "EOcKjvbdkVwODbXw", +- "DncLKvbdQlxCZOUz", +- "EObjjvbdbhlijfXY", +- "EOcLKvbdXmqAXtut", +- "EOcLKvbdmbKXXnnV", +- "DoDKjvbdkHgMFfOL", +- "EPCkKvbdfekymgHA", +- "DoCjjvbdeKKRvUzn", +- "DoDKjvbdkHfkefNk", +- "DoCjjvbdyqPMiKXA", +- "DnbjjvbdUQqOtuIN", +- "EOcKjvbdEPCkKwDE", +- "DoDLKvbdZRNFIleR", +- "DnbjjvbdRacdlJZL", +- "EOcLKvbdTukoitAq", +- "EOcLKvbdZLrDtOMN", +- "EOcLKvbdgKfzcGAE", +- "EObjjvbdzjVQQESt", +- "EOcLKvbdcIlijevx", +- "EOcKjvbdGKdsDHmV", +- "DncLKvbdKkBHvAJy", +- "EOcKjvbdZMRctOLm", +- "EPCkKvbdADRxKZiQ", +- "EObjjvbdDwxLsssl", +- "EPDLKvbdUxgszLPO", +- "EPCkKvbdSQTfiedX", +- "EPCjjvbdNeEUJIkE", +- "DoDLKvbdpyPHfqDx", +- "DnbkKvbdyOShXsJD", +- "DncLKvbdLiBkpxAS", +- "DoDKjvbdaaWEepQX", +- "DoCjjvbdWSOYBeLc", +- "EOcKjvbdLFegbAqV", +- "EPDKjvbdffLzOGgA", +- "EObkKvbdFkErbglu", +- "DncLKvbdiZuFlROG", +- "DncKjvbdegkWRnQg", +- "DoDLKvbdQdDApRDr", +- "EOcLKvbdeYZtURez", +- "EObjjvbdrXQLcIxq", +- "DoDLKvbdxZhGGXeS", +- "DoDLKvbdGGKSOItR", +- "EObjjvbdjhHLfFnL", +- "EOcLKvbdUQpoUuHm", +- "DoCkKvbdXrlBNUPY", +- "DoDKjvbdJXtCIMRQ", +- "DnbkKvbdZMSDsnLm", +- "DncKjvbdCTBDUGWr", +- "DncKjvbdbhlikGXY", +- "DoDKjvbdXmqAYVWU", +- "DnbjjvbdliDsqVRa", +- "DnbkKvbdmajXYOnV", +- "EObjjvbdJpyePGNe", +- "DnbkKvbdCTAcUGXS", +- "DoDLKvbdCDpBVjNG", +- "EOcLKvbdxwhiaoyk", +- "DoDKjvbdxVNFQyMO", +- "EPCkKvbdVvhwvEEg", +- "DnbkKvbdFWYoomJe", +- "EOcKjvbdlrZUysEJ", +- "EPDKjvbdqquKnKaN", +- "DoCkKvbdTkunaVoJ", +- "EOcLKvbdfHkVrOQg", +- "EPDLKvbdiUzFWrUb", +- "DoDLKvbdtAGqIABS", +- "DoCkKvbdZRMdhmEq", +- "DnbkKvbdNsUVfeVQ", +- "EPDLKvbdqwPkbiZR", +- "DoCkKvbdNUsSLNAX", +- "DncKjvbdmpZxvKyC", +- "EPCkKvbdLYqKSztf", +- "EPDKjvbdZyEKODMS", +- "EPDKjvbdNGbomPuL", +- "DncKjvbdZMSDtNlN", +- "EPCjjvbdTXjkmzjx", +- "EObkKvbdBdQAvKMf", +- "EOcLKvbdkySrTYgU", +- "DnbkKvbdZoOIddzK", +- "DoCkKvbdZMSDsmkm", +- "EPCkKvbdCWzdIdpW", +- "DncLKvbdBvzdIdov", +- "DoCjjvbdaRfDHtFk", +- "DnbkKvbdWeyZtAOs", +- "DoDLKvbdnCJwYPOV", +- "DoCjjvbdEYYLstUM", +- "EOcLKvbdwtldqZMO", +- "EPCjjvbdFVxoomKF", +- "EObkKvbdyqPMhiwA", +- "DoDLKvbdkxrrSxgU", +- "DoCjjvbdeATqNYKG", +- "DncLKvbdJKEAJpHE", +- "DoCkKvbddndsLUTr", +- "DnbjjvbdqFceUWBI", +- "DoDLKvbdhkddOUby", +- "DncKjvbdGKdrcIMu", +- "EPCkKvbdelevflik", +- "DoDKjvbdhaoDFWqR", +- "DoCjjvbdYlSDsmlN", +- "EPCjjvbdiZuGLpmf", +- "EObkKvbdnCJvxPNu", +- "DnbkKvbdhzUelRNf", +- "DnbkKvbdZeYGzgiC", +- "DoCkKvbdDnbkLWbd", +- "DnbkKvbdnHFYMmfy", +- "DoCjjvbdePEsKtTr", +- "DnbjjvbdZQmEhleR", +- "DnbkKvbdTkunaVoJ", +- "DnbkKvbdFWZPpMjF", +- "DoDKjvbdSwkMNzkY", +- "EOcLKvbdwtldpyMO", +- "EOcKjvbdhkdcmtby", +- "DoCjjvbdNQXqWNfs", +- "EPDKjvbdzjUpPdTU", +- "DnbjjvbdqceJPnWB", +- "EPDKjvbdUyHsyjoO", +- "EPCkKvbdZshhxcsO", +- "DncKjvbdqAiFAWgd", +- "EObkKvbdgFkzOGgA", +- "DncKjvbdmgFYNNgZ", +- "DoDLKvbdDjHjWYKA", +- "DnbjjvbdJbicRKCx", +- "DnbkKvbdfNFwHMjL", +- "EPCkKvbdWSNxBdlD", +- "EPDLKvbdCJKbLJFj", +- "EPDKjvbdEOcKkXDE", +- "EPCkKvbdVrOYCElD", +- "DnbjjvbdCIkBjhej", +- "DoDLKvbddoFTKstS", +- "DnbjjvbduDDVXVoP", +- "EObkKvbdxwiKCPzL", +- "DnbkKvbdZGvdAPTJ", +- "DoDLKvbdBdPaVjNG", +- "EOcKjvbdIHGzYwxH", +- "DoCjjvbdGFjSNhsq", +- "DnbjjvbdlYsSSxgU", +- "EPCjjvbdqrUjnKaN", +- "EOcLKvbdtvOXipsA", +- "DoDLKvbdrounjCuf", +- "DoCkKvbdFVyPomKF", +- "EOcKjvbdNHCpNPtk", +- "EPDLKvbdWeyZtAPT", +- "EPDKjvbdjcLkQfuH", +- "EOcLKvbdzHZMAMeX", +- "DoCjjvbdUMWPBVni", +- "EOcKjvbdHELWKBjK", +- "DoDKjvbdMgComQUk", +- "DnbkKvbdiGjDZWJu", +- "DncKjvbdyqOmJKXA", +- "DoDKjvbdVZITyjoO", +- "DoCjjvbdzQoNJJwA", +- "EOcLKvbdGAoQxizm", +- "DoDKjvbdatagYKsh", +- "EPDKjvbdSBceMJYk", +- "DoDLKvbdMpYQvOHT", +- "DncKjvbdiCOcFWpq", +- "DoCjjvbdUGznLvvF", +- "EPDLKvbdANIYrvyx", +- "EPCjjvbdIwtCHkpp", +- "EObkKvbdJSyBSmYM", +- "EObkKvbdwuMdqYlO", +- "EObjjvbdmuVZkKSG", +- "DncLKvbdSPsfjFdX", +- "DoDLKvbdSQUHJedX", +- "DoDKjvbdiVZdwSUb", +- "EPDLKvbdRjxfVGkT", +- "EObjjvbdmpZyVkZC", +- "DncLKvbdhzUelROG", +- "EPCkKvbdxVMeRZMO", +- "EOcKjvbdxxIiapZk", +- "EOcKjvbdJSyBTNYM", +- "EPDKjvbdMSXMzUpz", +- "EObkKvbdJmADzHVB" }; +- +- public static void main(java.lang.String[] unused) { +- try { +- BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("bad.out")); +- for (int i = 0; i < strings.length; i++) { +- out.write(strings[i].getBytes()); +- out.write("\n".getBytes()); +- } +- out.close(); +- } catch (Exception e) { +- System.out.println("Some exception occurred"); +- } +- } +-} +--- hotspot/test/runtime/7158800/InternTest.java 2012-08-10 09:29:18.000000000 -0700 ++++ hotspot/test/runtime/7158800/InternTest.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,80 +0,0 @@ +-/* +- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * This code is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. +- * +- * This code is distributed in the hope that it will be useful, but WITHOUT +- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +- * version 2 for more details (a copy is included in the LICENSE file that +- * accompanied this code). +- * +- * You should have received a copy of the GNU General Public License version +- * 2 along with this work; if not, write to the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +- * or visit www.oracle.com if you need additional information or have any +- * questions. +- */ +- +-/* +- * @test +- * @bug 7158800 +- * @run shell/timeout=400 Test7158800.sh +- * @summary This test performs poorly if alternate hashing isn't used for +- * string table. +- * The timeout is handled by the shell file (which kills the process) +- */ +-import java.util.*; +-import java.io.*; +- +-public class InternTest { +- public static void main (String args[]) throws Exception { +- final String badStringsFilename = "badstrings.txt"; +- +- if (args.length == 0 || (!args[0].equals("bad") && !args[0].equals("normal"))) { +- System.out.println("Usage: java InternTest [normal|bad]"); +- System.exit(1); +- } +- +- FileInputStream fstream = new FileInputStream(badStringsFilename); +- DataInputStream in = new DataInputStream(fstream); +- BufferedReader br = new BufferedReader(new InputStreamReader(in)); +- String toIntern, toDiscard; +- int count = 0; +- long current = 0L; +- long last = System.currentTimeMillis(); +- +- if (args[0].equals("bad")) { +- while ((toIntern = br.readLine()) != null) { +- toDiscard = new String((new Integer((int)(Math.random() * Integer.MAX_VALUE))).toString()); +- toIntern.intern(); +- count++; +- if (count % 10000 == 0 && count != 0) { +- current = System.currentTimeMillis(); +- System.out.println(new Date(current) + ": interned " + count + " 0-hash strings - last 10000 took " + ((float)(current - last))/1000 + "s (" + ((float)(current - last))/10000000 + "s per String)"); +- last = current; +- } +- } +- } +- if (args[0].equals("normal")) { +- while ((toDiscard = br.readLine()) != null) { // do the same read from the file to try and make the test fair +- toIntern = new String((new Integer((int)(Math.random() * Integer.MAX_VALUE))).toString()); +- toIntern.intern(); +- count++; +- if (count % 10000 == 0 && count != 0) { +- current = System.currentTimeMillis(); +- System.out.println(new Date(current) + ": interned " + count + " normal strings - last 10000 took " + ((float)(current - last))/1000 + "s (" + ((float)(current - last))/10000000 + "s per String)"); +- last = current; +- } +- } +- } +- in.close(); +- } +-} +- +- +--- hotspot/test/runtime/7158800/Test7158800.sh 2012-08-10 09:29:19.000000000 -0700 ++++ hotspot/test/runtime/7158800/Test7158800.sh 2013-01-16 09:04:00.000000000 -0800 +@@ -46,7 +46,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux ) ++ SunOS | Linux | *BSD ) + NULL=/dev/null + PS=":" + FS="/" +--- hotspot/test/runtime/7158804/Test7158804.sh 1969-12-31 16:00:00.000000000 -0800 ++++ hotspot/test/runtime/7158804/Test7158804.sh 2013-01-16 08:57:50.000000000 -0800 +@@ -0,0 +1,30 @@ ++#!/bin/sh ++# ++# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++ ++## ++## @test Test7158804.sh ++## @bug 7158804 ++## @summary Improve config file parsing ++## @run shell Test7158804.sh ++## ++ ++if [ "${TESTJAVA}" = "" ] ++then ++ echo "TESTJAVA not set. Test cannot execute. Failed." ++ exit 1 ++fi ++echo "TESTJAVA=${TESTJAVA}" ++ ++rm -f .hotspotrc ++echo -XX:+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >.hotspotrc ++${TESTJAVA}/bin/java ${TESTVMOPTS} -XX:+IgnoreUnrecognizedVMOptions -XX:Flags=.hotspotrc -version ++if [ $? -ne 0 ] ++then ++ echo "Test Failed" ++ exit 1 ++fi ++rm -f .hotspotrc ++exit 0 +--- hotspot/test/runtime/7162488/Test7162488.sh 1969-12-31 16:00:00.000000000 -0800 ++++ hotspot/test/runtime/7162488/Test7162488.sh 2013-01-16 08:57:50.000000000 -0800 +@@ -0,0 +1,77 @@ ++# ++# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This code is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License version 2 only, as ++# published by the Free Software Foundation. ++# ++# This code is distributed in the hope that it will be useful, but WITHOUT ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# version 2 for more details (a copy is included in the LICENSE file that ++# accompanied this code). ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++# ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++# or visit www.oracle.com if you need additional information or have any ++# questions. ++# ++ ++ ++# @test Test7162488.sh ++# @bug 7162488 ++# @summary VM not printing unknown -XX options ++# @run shell Test7162488.sh ++# ++ ++if [ "${TESTSRC}" = "" ] ++ then TESTSRC=. ++fi ++ ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ printf "TESTJAVA not set, selecting " ${TESTJAVA} ++ printf " If this is incorrect, try setting the variable manually.\n" ++fi ++ ++# set platform-dependent variables ++OS=`uname -s` ++case "$OS" in ++ Windows_* ) ++ FS="\\" ++ ;; ++ * ) ++ FS="/" ++ ;; ++esac ++ ++JAVA=${TESTJAVA}${FS}bin${FS}java ++ ++# ++# Just run with an option we are confident will not be recognized, ++# and check for the message: ++# ++OPTION=this_is_not_an_option ++ ++${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep "Unrecognized VM option" ++if [ "$?" != "0" ] ++then ++ printf "FAILED: option not flagged as unrecognized.\n" ++ exit 1 ++fi ++ ++${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep ${OPTION} ++if [ "$?" != "0" ] ++then ++ printf "FAILED: bad option not named as being bad.\n" ++ exit 1 ++fi ++ ++printf "Passed.\n" ++ --- jaxp/.hgtags 2012-08-10 09:35:08.000000000 -0700 -+++ jaxp/.hgtags 2012-08-19 12:04:20.000000000 -0700 ++++ jaxp/.hgtags 2013-01-16 08:58:02.000000000 -0800 @@ -123,6 +123,7 @@ bcd31fa1e3c6f51b4fdd427ef905188cdac57164 jdk7-b146 067fb18071e3872698f6218724958bd0cebf30a3 jdk7u1-b01 @@ -1089,15 +2892,38 @@ 104ca42e1e7ca66b074a4619ce6420f15d8f454d jdk7u1-b02 64e323faadf65018c1ffc8bb9c97f7b664e87347 jdk7u1-b03 2256c20e66857f80cacda14ffdbc0979c929d7f8 jdk7u1-b04 -@@ -197,5 +198,4 @@ +@@ -197,5 +198,27 @@ 7403701aa75848ca2a7b297909908b858134e132 jdk7u6-b21 fcf35906d1d88583878cd2e2d7c63dfba4e9f679 jdk7u6-b22 8824bcbfd7cd8059ededf70f1e7f2b06f02cb33f jdk7u6-b23 -1365e7472a3b737dda4a73e06ad41718d667d9be jdk7u8-b01 -0a313d4307930be3a64106b9b8c90f9342673aa0 jdk7u8-b02 +378f719cfb9491b766cd9f7cd47ad7fa3503e141 jdk7u6-b24 ++5f1b80e8baec46fc28826a3a6ab8e1913c872f4c jdk7u6-b30 ++2eafa8a6fd8fdb54b10045e247d1a57f9817f473 jdk7u7-b10 ++c4aa15da8529451cc678d5747e7b82e9cc38627e jdk7u7-b30 ++f6e11679b12e1548f407b78a940c568401dd2a19 jdk7u7-b11 ++7840a267c777e22004912ad0aadd5258ac3d36c6 jdk7u7-b31 ++61fc72e9fe26b3acf1572866143c22719c088b62 jdk7u7-b01 ++78d9e4853388a2e7be18ff18c0b5330c074cb514 jdk7u7-b02 ++fc7c5aa8c722f28c59560ce83140e803d853afc9 jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++61fc72e9fe26b3acf1572866143c22719c088b62 jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++78d9e4853388a2e7be18ff18c0b5330c074cb514 jdk7u9-b02 ++b12a2d557c5e302b614c5f7e25ad6c8a0e138742 jdk7u9-b04 ++ab4bbb93b3831aca230c62431f7fe02b56793450 jdk7u9-b05 ++254ed6ae237ee631179819570cf7fb265c6fb3a8 jdk7u10-b10 ++c1df39bcc9c1bcdfb2a92682650264b3b7771ce8 jdk7u10-b11 ++00cfd60368048c4969785eb52ec50cf5691c4367 jdk7u10-b12 ++51efccc2b4e908fa0475075739c1463d1dd50efc jdk7u10-b13 ++c245a6332320a86342683e6f732f3f8f2f4de69a jdk7u10-b14 ++89b043ba2e01e969090e23a5a7a2e9f7165ff5a0 jdk7u10-b15 ++5449d5396bd8deee90f18f29899343129e3cdc4e jdk7u10-b16 ++86c75e6aa3a7fa9a587fc7dd2d08af8aa8ffb9a9 jdk7u10-b17 ++162a2c6ad8718a63253fa53724f704a4f85731bc jdk7u10-b18 --- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2012-08-10 09:36:39.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2012-08-19 12:04:20.000000000 -0700 ++++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2013-01-15 23:09:49.000000000 -0800 @@ -602,7 +602,7 @@ if (reader == null) { stream = xmlInputSource.getByteStream(); @@ -1173,7 +2999,7 @@ // // Package visible methods --- jaxws/.hgtags 2012-08-10 09:46:32.000000000 -0700 -+++ jaxws/.hgtags 2012-08-19 12:01:22.000000000 -0700 ++++ jaxws/.hgtags 2013-01-16 08:58:04.000000000 -0800 @@ -123,6 +123,7 @@ 05469dd4c3662c454f8a019e492543add60795cc jdk7-b146 c01bfd68d0528bc88348813c4d75d7f5c62bc4e2 jdk7u1-b01 @@ -1182,15 +3008,38 @@ 4c24f7019ce939a452154a83151294ad7da66a9d jdk7u1-b02 272778f529d11081f548f37fcd6a7aec0b11a8dd jdk7u1-b03 48b06a6e6f46e5bcd610f4bed57cd5067cf31f8c jdk7u1-b04 -@@ -197,5 +198,4 @@ +@@ -197,5 +198,27 @@ 55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u6-b21 0fec2efe2452aed9736da39add4c7f71be561838 jdk7u6-b22 afb6d773328fa76cea65dc024a448cd931d111f2 jdk7u6-b23 -55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u8-b01 -c025e953f655b375f27f8f94493ceeb43ef1d979 jdk7u8-b02 +b8b85e62d2c5347df8cf2e825e51e3de178508ea jdk7u6-b24 ++fb03d08f73e98f0dd67cb81632eb9b685de49b7e jdk7u6-b30 ++739ffa9dffad4cc2febe66ca1c2d86496e80741a jdk7u7-b10 ++e9a5a78329d0518efafd9f6f6149f359a7db4e2e jdk7u7-b30 ++ed6262e7bb0db4cd116c31f3c88cbd7c0288de40 jdk7u7-b11 ++538c248de3ef0fcb34c28295c1eab61269708137 jdk7u7-b31 ++dc2e6882056c2d400d4cf3c78d67da8e20fc37cc jdk7u7-b01 ++45cf55bc1732e8495425dceb385740c6852c0fc8 jdk7u7-b02 ++0289894a64a628133bb63f1dc48b45593f96a14d jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++dc2e6882056c2d400d4cf3c78d67da8e20fc37cc jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++45cf55bc1732e8495425dceb385740c6852c0fc8 jdk7u9-b02 ++66a2e01550a9e84e907a7f7b96e64ee90a4ec0e4 jdk7u9-b04 ++f3e42e044584b1b21de29eef1b82974d273c77dc jdk7u9-b05 ++dd8e4098681aa581d0398ad7d2d1e2547517c7e5 jdk7u10-b10 ++1784290b63bcf021334b0accdb3868fdc4ca854e jdk7u10-b11 ++fde9a060a04d9f9b54f36d645e91ec9a2b40cb81 jdk7u10-b12 ++d7bf349cf0c60bc41a33c1f70969f11668deddb3 jdk7u10-b13 ++17ec7a59002695c35dbd83a120b705e21d982d68 jdk7u10-b14 ++75ecadd1f8fc5a218b1ed71b3c3df776d76e048e jdk7u10-b15 ++ed609545e38c2e499437292c1541e4d1c2b8b992 jdk7u10-b16 ++e63292c59ed8481864302cc3f53b498cbdea3470 jdk7u10-b17 ++6a372e9b4ae978cdaf0b95277db31827794e2c1f jdk7u10-b18 --- jdk/.hgtags 2012-08-10 10:21:29.000000000 -0700 -+++ jdk/.hgtags 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/.hgtags 2013-01-16 08:58:14.000000000 -0800 @@ -123,6 +123,7 @@ 539e576793a8e64aaf160e0d6ab0b9723cd0bef0 jdk7-b146 69e973991866c948cf1808b06884ef2d28b64fcb jdk7u1-b01 @@ -1199,15 +3048,52 @@ 2baf612764d215e6f3a5b48533f74c6924ac98d7 jdk7u1-b02 a4781b6d9cfb6901452579adee17c9a17c1b584c jdk7u1-b03 b223ed9a5fdf8ce3af42adfa8815975811d70eae jdk7u1-b04 -@@ -197,5 +198,4 @@ +@@ -197,5 +198,27 @@ 243717d7fe9589148951ffb5551264af0e446314 jdk7u6-b21 d78f2b600d393f45d6ace8ca0f29ad677624a775 jdk7u6-b22 0ae89e53f5300da1961984a7d81c220c7cf717d7 jdk7u6-b23 -df945ef30444adf08f3ef14b0c49c8bda6dda587 jdk7u8-b01 -dd1e513c05b8b8c8402e9ecf9c0d5bdbebb1a089 jdk7u8-b02 +1c775da998735711853cfe1ae1d6baddc5f12a66 jdk7u6-b24 ++4bd0528374971157afd6372890f4250e1cf712d9 jdk7u6-b30 ++78e01a6ca8d30e8fc4eb297d297a098edfb3fec6 jdk7u7-b10 ++9666d4e4bbf3f80614e246d5c15df86154544013 jdk7u7-b30 ++94154c14973aee7c5ff4846af7bcb71fe7a82fa5 jdk7u7-b11 ++f93d2e3b2610b612401c95dd56d1a1122d35f676 jdk7u7-b31 ++94a7d51992ae6fd31f9adc15c4976d6354dca14d jdk7u7-b01 ++901c290c9c8b495a2696f10a87523363239d001b jdk7u7-b02 ++0e2200a8762c1fdbd1ea812ba3f6535245372c81 jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++94a7d51992ae6fd31f9adc15c4976d6354dca14d jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++901c290c9c8b495a2696f10a87523363239d001b jdk7u9-b02 ++7302c386ca9c6cd20c27d0a2adb0b142f679d6b3 jdk7u9-b04 ++ffad06d7009576c3098705e05452ebc309a59e56 jdk7u9-b05 ++c1efb11d7db509dafd7882811b2562ba593f6431 jdk7u10-b10 ++0243e41000c6f76654725cac31ffdc95633c63e7 jdk7u10-b11 ++c86a49dd4a0dca3a56f00429cfcffb2ad5f2a224 jdk7u10-b12 ++c6de70ed568d190c9c7d9641b88b9b5f1bc36fd5 jdk7u10-b13 ++abe96e9e10f973cf0fdacc1475e69a274ef76fcf jdk7u10-b14 ++c9a0e381cd8eaf62bcacfd59b01c249de81ae167 jdk7u10-b15 ++ed59989fb0635f2d4461173e218c43494f06bb82 jdk7u10-b16 ++a1c5bac982a6d4aa58f551cb46cde53f526aca48 jdk7u10-b17 ++115d1e4365293846bbc911cf312886c471e37fbd jdk7u10-b18 +--- jdk/make/com/oracle/security/ucrypto/Makefile 2012-08-10 10:21:29.000000000 -0700 ++++ jdk/make/com/oracle/security/ucrypto/Makefile 2013-01-16 08:58:09.000000000 -0800 +@@ -198,9 +198,9 @@ + # + # Build ucrypto.jar. + # +- $(UNSIGNED_DIR)/ucrypto.jar: build ++ $(UNSIGNED_DIR)/ucrypto.jar: build $(JCE_MANIFEST_FILE) + $(prep-target) +- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ ++ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ + $(BOOT_JAR_JFLAGS) + @$(java-vm-cleanup) + --- jdk/make/com/sun/nio/Makefile 2012-08-10 10:21:31.000000000 -0700 -+++ jdk/make/com/sun/nio/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/nio/Makefile 2013-01-16 08:58:14.000000000 -0800 @@ -31,11 +31,18 @@ include $(BUILDDIR)/common/Defs.gmk @@ -1229,7 +3115,7 @@ all build clean clobber:: $(SUBDIRS-loop) --- jdk/make/com/sun/nio/sctp/Makefile 2012-08-10 10:21:31.000000000 -0700 -+++ jdk/make/com/sun/nio/sctp/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/nio/sctp/Makefile 2013-01-16 08:58:14.000000000 -0800 @@ -59,15 +59,11 @@ -I$(PLATFORM_SRC)/native/java/net \ -I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders @@ -1249,7 +3135,7 @@ else # windows include $(BUILDDIR)/common/Classes.gmk --- jdk/make/com/sun/security/auth/module/Makefile 2012-08-10 10:21:32.000000000 -0700 -+++ jdk/make/com/sun/security/auth/module/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/security/auth/module/Makefile 2013-01-16 08:58:14.000000000 -0800 @@ -67,7 +67,7 @@ include FILES_c_solaris.gmk endif # solaris @@ -1260,7 +3146,7 @@ include FILES_export_unix.gmk include FILES_c_unix.gmk --- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2012-08-10 10:21:32.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -43,7 +43,7 @@ sun/tools/attach/LinuxVirtualMachine.java endif @@ -1271,7 +3157,7 @@ sun/tools/attach/BsdVirtualMachine.java endif --- jdk/make/com/sun/tools/attach/FILES_c.gmk 2012-08-10 10:21:32.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -39,7 +39,7 @@ LinuxVirtualMachine.c endif @@ -1282,7 +3168,7 @@ BsdVirtualMachine.c endif --- jdk/make/com/sun/tools/attach/FILES_java.gmk 2012-08-10 10:21:32.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -43,7 +43,7 @@ sun/tools/attach/LinuxAttachProvider.java endif @@ -1293,7 +3179,7 @@ sun/tools/attach/BsdAttachProvider.java endif --- jdk/make/com/sun/tools/attach/Makefile 2012-08-10 10:21:32.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/com/sun/tools/attach/Makefile 2013-01-16 08:58:14.000000000 -0800 @@ -38,7 +38,7 @@ ifeq ($(PLATFORM), linux) FILES_m = mapfile-linux @@ -1313,8 +3199,8 @@ else vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach --- jdk/make/common/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/make/common/Defs-bsd.gmk 2012-08-19 12:39:46.000000000 -0700 -@@ -0,0 +1,527 @@ ++++ jdk/make/common/Defs-bsd.gmk 2013-01-16 08:58:19.000000000 -0800 +@@ -0,0 +1,490 @@ +# +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1758,43 +3644,6 @@ +override USING_GNU_TAR = true +override WRITE_LIBVERSION = false + -+ifdef ALT_X11_PATH -+ X11_PATH = $(ALT_X11_PATH) -+else -+ ifeq ($(OS_VENDOR), NetBSD) -+ X11_PATH = /usr/X11R7 -+ else -+ ifeq ($(OS_VENDOR), FreeBSD) -+ X11_PATH = /usr/local -+ else -+ X11_PATH = /usr/X11R6 -+ endif -+ endif -+endif -+ -+ifdef ALT_PACKAGE_PATH -+ PACKAGE_PATH = $(ALT_PACKAGE_PATH) -+else -+ ifeq ($(OS_VENDOR), NetBSD) -+ PACKAGE_PATH = /usr/pkg -+ else -+ PACKAGE_PATH = /usr/local -+ endif -+endif -+ -+# ALSA -+ifdef ALT_ALSA_LIB_PATH -+ ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH) -+else -+ ALSA_LIB_PATH = $(PACKAGE_PATH)/lib -+endif -+ -+ifdef ALT_ALSA_HEADERS_PATH -+ ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH) -+else -+ ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include -+endif -+ +# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the +# resulting resolved absolute name of the executable in the environment +# variable EXECNAME. That executable name is then used that to locate the @@ -1843,7 +3692,7 @@ + OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include +endif --- jdk/make/common/Defs-linux.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Defs-linux.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Defs-linux.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -429,6 +429,7 @@ override LIBDL = -ldl override MOOT_PRIORITIES = true @@ -1853,7 +3702,7 @@ override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 else --- jdk/make/common/Defs-solaris.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Defs-solaris.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Defs-solaris.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -753,6 +753,9 @@ # Network Services library LIBNSL = -lnsl @@ -1865,7 +3714,7 @@ LIBSCF = -lscf --- jdk/make/common/Defs.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Defs.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Defs.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -179,15 +179,15 @@ ifdef ALT_FREETYPE_LIB_PATH @@ -1917,7 +3766,7 @@ else VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes --- jdk/make/common/Library.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Library.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Library.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -299,8 +299,12 @@ ifeq ($(PLATFORM), solaris) $(STRIP) -x $@ @@ -1934,7 +3783,7 @@ # implied else here is no stripping at all endif --- jdk/make/common/Mapfile-vers.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Mapfile-vers.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Mapfile-vers.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -76,7 +76,7 @@ endif # PLATFORM @@ -1945,7 +3794,7 @@ ifeq ($(VARIANT), OPT) # OPT build MUST have a mapfile? --- jdk/make/common/Program.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Program.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Program.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -95,6 +95,17 @@ endif # SYSTEM_ZLIB endif # PLATFORM @@ -1964,7 +3813,15 @@ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli OTHER_LDLIBS += -ljli -@@ -227,6 +238,11 @@ +@@ -153,7 +164,6 @@ + ifndef LOCAL_RESOURCE_FILE + @$(ECHO) $(OBJDIR)/$(PROGRAM).res >> $@ + endif # LOCAL_RESOURCE_FILE +- @$(ECHO) setargv.obj >> $@ + @$(ECHO) Created $@ + + $(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX) +@@ -227,6 +237,11 @@ INFO_PLIST_FILE= endif # MACOSX @@ -1976,7 +3833,7 @@ # # This rule only applies on unix. It supports quantify and its ilk. # -@@ -281,8 +297,12 @@ +@@ -281,8 +296,12 @@ ifeq ($(PLATFORM), solaris) $(STRIP) -x $@ else @@ -1991,7 +3848,7 @@ endif # implied else here is no stripping at all endif -@@ -350,7 +370,9 @@ +@@ -350,7 +369,9 @@ ifneq ($(PLATFORM), windows) @@ -2002,7 +3859,7 @@ endif #PLATFORM ifeq ($(HAVE_GETHRTIME),true) -@@ -360,12 +382,10 @@ +@@ -360,12 +381,10 @@ OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin ifeq ($(PLATFORM), macosx) OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin @@ -2019,7 +3876,7 @@ OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"' VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"' --- jdk/make/common/Release.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Release.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Release.gmk 2013-01-16 08:58:14.000000000 -0800 @@ -178,6 +178,12 @@ JA_DIRNAME=ja_JP.UTF-8 endif # linux @@ -2033,7 +3890,74 @@ define copy-man-pages $(MKDIR) -p $1/man/man1 for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ -@@ -983,6 +989,12 @@ +@@ -399,10 +405,29 @@ + sun/tools/jinfo \ + sun/tools/jmap + ++JFR_SRCDIRS_EXIST := $(shell \ ++ if [ -d $(CLOSED_SHARE_SRC)/classes/com/oracle/jrockit/jfr ] ; then \ ++ echo true; \ ++ else \ ++ echo false; \ ++ fi) ++ ++BUILD_JFR= ++ifndef OPENJDK ++ifndef JAVASE_EMBEDDED ++ifeq ($(JFR_SRCDIRS_EXIST), true) ++BUILD_JFR=true ++endif ++endif ++endif ++ + # classes that go into jfr.jar ++JFR_CLASSES_DIRS= ++ifdef BUILD_JFR + JFR_CLASSES_DIRS= \ + com/oracle/jrockit/jfr \ + oracle/jrockit/jfr ++endif + + # classes that go into jsse.jar + JSSE_CLASSES_DIRS = \ +@@ -606,8 +631,7 @@ + $(ECHO) "sun/tools/jstack/" >> $@ + $(ECHO) "sun/tools/jinfo/" >> $@ + $(ECHO) "sun/tools/jmap/" >> $@ +-ifndef OPENJDK +-ifndef JAVASE_EMBEDDED ++ifdef BUILD_JFR + $(ECHO) "com/oracle/jrockit/jfr/" >> $@ + $(ECHO) "com/oracle/jrockit/jfr/client/" >> $@ + $(ECHO) "com/oracle/jrockit/jfr/management/" >> $@ +@@ -618,7 +642,7 @@ + $(ECHO) "oracle/jrockit/jfr/settings/" >> $@ + $(ECHO) "oracle/jrockit/jfr/tools/" >> $@ + endif +-endif ++ + + + # File order list for rt.jar +@@ -645,8 +669,7 @@ + + # Create jfr.jar + JFR_JAR= +-ifndef OPENJDK +-ifndef JAVASE_EMBEDDED ++ifdef BUILD_JFR + JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar + $(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE) + $(prep-target) +@@ -655,7 +678,6 @@ + $(JFR_CLASSES_DIRS) $(BOOT_JAR_JFLAGS) + @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) + endif +-endif + + # Create the rt.jar file list & non-class files list + +@@ -983,6 +1005,12 @@ FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \ $(wildcard $(PLATFORM_SRC)/bin/java_md*) @@ -2046,7 +3970,7 @@ # Standard jdk image initial-image-jdk:: initial-image-jdk-setup \ initial-image-jdk-db \ -@@ -1070,7 +1082,7 @@ +@@ -1070,7 +1098,7 @@ @# So for Linux, make use of the -T option (like Solaris' -I option) of @# obtaining the list of files from a file. MKS tar has no such option. @@ -2055,7 +3979,7 @@ for d in $(SOURCE_DIRS); do \ $(RM) $(ABS_TEMPDIR)/src-files.list; \ ($(CD) $$d && \ -@@ -1083,7 +1095,7 @@ +@@ -1083,7 +1111,7 @@ done ; \ ) ; \ if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ @@ -2065,7 +3989,7 @@ fi; \ done --- jdk/make/common/Rules.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/Rules.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/Rules.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -51,7 +51,7 @@ # # All source tree areas for java/properties files (a few may be closed) @@ -2085,7 +4009,7 @@ $(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java @$(add-java-file) --- jdk/make/common/shared/Compiler-gcc.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/shared/Compiler-gcc.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/shared/Compiler-gcc.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -72,6 +72,21 @@ endif @@ -2109,8 +4033,8 @@ # Settings specific to Solaris --- jdk/make/common/shared/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/make/common/shared/Defs-bsd.gmk 2012-08-19 12:39:46.000000000 -0700 -@@ -0,0 +1,225 @@ ++++ jdk/make/common/shared/Defs-bsd.gmk 2013-01-16 08:58:15.000000000 -0800 +@@ -0,0 +1,262 @@ +# +# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -2166,6 +4090,43 @@ +$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi) +endef + ++ifdef ALT_X11_PATH ++ X11_PATH = $(ALT_X11_PATH) ++else ++ ifeq ($(OS_VENDOR), NetBSD) ++ X11_PATH = /usr/X11R7 ++ else ++ ifeq ($(OS_VENDOR), FreeBSD) ++ X11_PATH = /usr/local ++ else ++ X11_PATH = /usr/X11R6 ++ endif ++ endif ++endif ++ ++ifdef ALT_PACKAGE_PATH ++ PACKAGE_PATH = $(ALT_PACKAGE_PATH) ++else ++ ifeq ($(OS_VENDOR), NetBSD) ++ PACKAGE_PATH = /usr/pkg ++ else ++ PACKAGE_PATH = /usr/local ++ endif ++endif ++ ++# ALSA ++ifdef ALT_ALSA_LIB_PATH ++ ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH) ++else ++ ALSA_LIB_PATH = $(PACKAGE_PATH)/lib ++endif ++ ++ifdef ALT_ALSA_HEADERS_PATH ++ ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH) ++else ++ ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include ++endif ++ +# Location on system where jdk installs might be +USRJDKINSTANCES_PATH = $(PACKAGE_PATH) + @@ -2337,7 +4298,7 @@ +endif + --- jdk/make/common/shared/Defs-utils.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/shared/Defs-utils.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/shared/Defs-utils.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -74,6 +74,13 @@ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) endif @@ -2389,7 +4350,7 @@ + endif +endif --- jdk/make/common/shared/Defs-versions.gmk 2012-08-10 10:21:33.000000000 -0700 -+++ jdk/make/common/shared/Defs-versions.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/shared/Defs-versions.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -44,6 +44,11 @@ override CC_VERSION = gcc endif @@ -2417,7 +4378,7 @@ ifeq ($(PLATFORM), macosx) REQUIRED_OS_NAME = Darwin --- jdk/make/common/shared/Defs.gmk 2012-08-10 10:21:34.000000000 -0700 -+++ jdk/make/common/shared/Defs.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/shared/Defs.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -181,7 +181,7 @@ # platform and shared sources/headers. This is mainly useful for the # Mac OS X build, which pulls its platform sources from the solaris and/or @@ -2428,7 +4389,7 @@ $(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2) endef --- jdk/make/common/shared/Platform.gmk 2012-08-10 10:21:34.000000000 -0700 -+++ jdk/make/common/shared/Platform.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/common/shared/Platform.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -298,6 +298,85 @@ # How much RAM does this machine have: endif @@ -2516,7 +4477,7 @@ ifeq ($(SYSTEM_UNAME), Windows_NT) PLATFORM = windows --- jdk/make/java/Makefile 2012-08-10 10:21:34.000000000 -0700 -+++ jdk/make/java/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -53,7 +53,7 @@ endif endif # PLATFORM @@ -2527,7 +4488,7 @@ endif # PLATFORM --- jdk/make/java/instrument/Makefile 2012-08-10 10:21:34.000000000 -0700 -+++ jdk/make/java/instrument/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/instrument/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -104,12 +104,24 @@ # equivalent of strcasecmp is stricmp on Windows CPPFLAGS_COMMON += -Dstrcasecmp=stricmp @@ -2558,8 +4519,25 @@ ifeq ($(SYSTEM_ZLIB), true) OTHER_LDLIBS += -lz endif +--- jdk/make/java/java/FILES_java.gmk 2012-08-10 10:21:34.000000000 -0700 ++++ jdk/make/java/java/FILES_java.gmk 2013-01-16 08:58:09.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1996, 2012, 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 +@@ -476,6 +476,7 @@ + sun/misc/MessageUtils.java \ + sun/misc/GC.java \ + sun/misc/Service.java \ ++ sun/misc/JavaAWTAccess.java \ + sun/misc/JavaLangAccess.java \ + sun/misc/JavaIOAccess.java \ + sun/misc/JavaIOFileDescriptorAccess.java \ --- jdk/make/java/java/Makefile 2012-08-10 10:21:35.000000000 -0700 -+++ jdk/make/java/java/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/java/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -175,9 +175,11 @@ # ifneq ($(PLATFORM), windows) @@ -2573,20 +4551,16 @@ ifeq ($(HAVE_ALTZONE),true) OTHER_CPPFLAGS += -DHAVE_ALTZONE --- jdk/make/java/java/genlocales.gmk 2012-08-10 10:21:35.000000000 -0700 -+++ jdk/make/java/java/genlocales.gmk 2012-08-19 12:39:46.000000000 -0700 -@@ -93,17 +93,43 @@ ++++ jdk/make/java/java/genlocales.gmk 2013-01-16 08:58:15.000000000 -0800 +@@ -93,18 +93,66 @@ else +ifeq ($(PLATFORM), bsd) + - $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) - @$(RM) $@.tmp.euro $@.tmp.noneuro; - @$(prep-target) -- @$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro; -- @$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro; -- @$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro; -- @$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro; ++$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) ++ @$(RM) $@.tmp.euro $@.tmp.noneuro; ++ @$(prep-target) + @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\ +'@g > $@.tmp.euro; + @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\ @@ -2595,13 +4569,15 @@ +'@g > $@.tmp.noneuro; + @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\ +'@g >> $@.tmp.noneuro; - NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \ - $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \ - $@.tmp.noneuro $< $@ - @$(RM) $@.tmp.euro $@.tmp.noneuro; ++ NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \ ++ $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \ ++ $@.tmp.noneuro $< $@ ++ @$(RM) $@.tmp.euro $@.tmp.noneuro; + +else + ++ifeq ($(PLATFORM), bsd) ++ +$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) + @$(RM) $@.tmp.euro $@.tmp.noneuro; + @$(prep-target) @@ -2617,14 +4593,49 @@ + $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \ + $@.tmp.noneuro $< $@ + @$(RM) $@.tmp.euro $@.tmp.noneuro; -+endif + ++else ++ + $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) + @$(RM) $@.tmp.euro $@.tmp.noneuro; + @$(prep-target) +- @$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro; +- @$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro; +- @$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro; +- @$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro; ++ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\ ++'@g > $@.tmp.euro; ++ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\ ++'@g >> $@.tmp.euro; ++ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\ ++'@g > $@.tmp.noneuro; ++ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\ ++'@g >> $@.tmp.noneuro; + NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \ + $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \ + $@.tmp.noneuro $< $@ + @$(RM) $@.tmp.euro $@.tmp.noneuro; endif ++ ++endif ++ ++endif genlocales : $(LocaleDataMetaInfo_Dest) + --- jdk/make/java/jli/Makefile 2012-08-10 10:21:36.000000000 -0700 -+++ jdk/make/java/jli/Makefile 2012-08-19 12:39:46.000000000 -0700 -@@ -116,9 +116,9 @@ ++++ jdk/make/java/jli/Makefile 2013-01-16 08:58:15.000000000 -0800 +@@ -90,7 +90,8 @@ + + # add platform specific files + ifeq ($(PLATFORM), windows) +- FILES_c += java_md.c ++ FILES_c += java_md.c \ ++ cmdtoargs.c + else # NIXES + FILES_c += java_md_common.c + ifeq ($(PLATFORM), macosx) +@@ -116,9 +117,9 @@ LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"' endif # PLATFORM @@ -2636,7 +4647,7 @@ OTHER_CPPFLAGS += $(LIBARCH_DEFINES) endif #PLATFORM -@@ -131,7 +131,7 @@ +@@ -131,7 +132,7 @@ # Note: it is important to keep this order, meaning -lc as the # last library, otherwise it could cause compatibility issues # by pulling in SUNW_private symbols from libc @@ -2645,8 +4656,42 @@ ifeq ($(USE_PTHREADS),true) LDLIBS += -lpthread endif # USE_PTHREADS +@@ -149,7 +150,11 @@ + -export:JLI_ReportErrorMessage \ + -export:JLI_ReportErrorMessageSys \ + -export:JLI_ReportMessage \ +- -export:JLI_ReportExceptionDescription ++ -export:JLI_ReportExceptionDescription \ ++ -export:JLI_MemAlloc \ ++ -export:JLI_CmdToArgs \ ++ -export:JLI_GetStdArgc \ ++ -export:JLI_GetStdArgs + endif # PLATFORM + + OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) +--- jdk/make/java/jli/mapfile-vers 2012-08-10 10:21:36.000000000 -0700 ++++ jdk/make/java/jli/mapfile-vers 2013-01-16 08:58:09.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2005, 2012, 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 +@@ -35,9 +35,8 @@ + JLI_ReportErrorMessageSys; + JLI_ReportMessage; + JLI_ReportExceptionDescription; +-# JNI_CreateJavaVM; +-# JNI_GetCreatedJavaVMs; +-# JNI_GetDefaultJavaVMInitArgs; ++ JLI_GetStdArgs; ++ JLI_GetStdArgc; + local: + *; + }; --- jdk/make/java/net/FILES_c.gmk 2012-08-10 10:21:36.000000000 -0700 -+++ jdk/make/java/net/FILES_c.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/net/FILES_c.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -47,6 +47,10 @@ FILES_c += bsd_close.c endif @@ -2659,8 +4704,16 @@ FILES_c += TwoStacksPlainSocketImpl.c FILES_c += DualStackPlainSocketImpl.c --- jdk/make/java/net/Makefile 2012-08-10 10:21:36.000000000 -0700 -+++ jdk/make/java/net/Makefile 2012-08-19 12:39:46.000000000 -0700 -@@ -91,7 +91,7 @@ ++++ jdk/make/java/net/Makefile 2013-01-16 08:58:15.000000000 -0800 +@@ -74,6 +74,7 @@ + FILES_export += java/net/DualStackPlainSocketImpl.java + FILES_export += java/net/TwoStacksPlainDatagramSocketImpl.java + FILES_export += java/net/DualStackPlainDatagramSocketImpl.java ++ FILES_export += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java + else + FILES_export += java/net/PlainDatagramSocketImpl.java + endif +@@ -91,7 +92,7 @@ include $(BUILDDIR)/common/Library.gmk @@ -2670,7 +4723,7 @@ OTHER_CFLAGS += -DDONT_ENABLE_IPV6 endif --- jdk/make/java/nio/Makefile 2012-08-10 10:21:36.000000000 -0700 -+++ jdk/make/java/nio/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/nio/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -260,7 +260,7 @@ sun/nio/fs/UnixConstants.java endif # PLATFORM = linux @@ -2717,28 +4770,18 @@ FILES_m = mapfile-bsd endif include $(BUILDDIR)/common/Mapfile-vers.gmk ---- jdk/make/java/nio/mapfile-linux 2012-08-10 10:21:37.000000000 -0700 -+++ jdk/make/java/nio/mapfile-linux 2012-08-19 12:39:46.000000000 -0700 -@@ -88,7 +88,6 @@ - Java_sun_nio_ch_IOUtil_drain; - Java_sun_nio_ch_IOUtil_fdVal; - Java_sun_nio_ch_IOUtil_initIDs; -- Java_sun_nio_ch_IOUtil_iovMax; - Java_sun_nio_ch_IOUtil_makePipe; - Java_sun_nio_ch_IOUtil_randomBytes; - Java_sun_nio_ch_IOUtil_setfdVal; ---- jdk/make/java/nio/mapfile-solaris 2012-08-10 10:21:37.000000000 -0700 -+++ jdk/make/java/nio/mapfile-solaris 2012-08-19 12:39:46.000000000 -0700 -@@ -76,7 +76,6 @@ +--- jdk/make/java/nio/mapfile-bsd 2012-08-10 10:21:37.000000000 -0700 ++++ jdk/make/java/nio/mapfile-bsd 2013-01-16 11:15:18.000000000 -0800 +@@ -70,6 +70,7 @@ Java_sun_nio_ch_IOUtil_drain; Java_sun_nio_ch_IOUtil_fdVal; Java_sun_nio_ch_IOUtil_initIDs; -- Java_sun_nio_ch_IOUtil_iovMax; ++ Java_sun_nio_ch_IOUtil_iovMax; Java_sun_nio_ch_IOUtil_makePipe; Java_sun_nio_ch_IOUtil_randomBytes; Java_sun_nio_ch_IOUtil_setfdVal; --- jdk/make/java/npt/Makefile 2012-08-10 10:21:37.000000000 -0700 -+++ jdk/make/java/npt/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/npt/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -74,6 +74,14 @@ OTHER_LDLIBS += -liconv endif @@ -2755,7 +4798,7 @@ # Add to ambient vpath so we pick up the library files # --- jdk/make/java/redist/fonts/Makefile 2012-08-10 10:21:37.000000000 -0700 -+++ jdk/make/java/redist/fonts/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/java/redist/fonts/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -42,7 +42,7 @@ $(LIBDIR)/fonts/LucidaSansRegular.ttf \ $(LIBDIR)/fonts/LucidaSansDemiBold.ttf \ @@ -2783,8 +4826,26 @@ all build : $(INTERNAL_IMPORT_LIST) +--- jdk/make/javax/crypto/Defs-jce.gmk 2012-08-10 10:21:39.000000000 -0700 ++++ jdk/make/javax/crypto/Defs-jce.gmk 2013-01-16 08:58:09.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2007, 2012, 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 +@@ -31,7 +31,7 @@ + JCE_MANIFEST_FILE = $(TEMPDIR)/manifest.mf + $(JCE_MANIFEST_FILE): $(MAINMANIFEST) + $(prep-target) +- $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ ++ $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \ + -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \ + $(MAINMANIFEST) >> $@ + $(ECHO) "Extension-Name: javax.crypto" >> $@ --- jdk/make/javax/sound/Makefile 2012-08-10 10:21:40.000000000 -0700 -+++ jdk/make/javax/sound/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/javax/sound/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -111,6 +111,21 @@ #MXSPP_ADD = $(PLATFORM)-$(ARCH)/ endif # PLATFORM linux @@ -2808,7 +4869,7 @@ CPPFLAGS += -DUSE_PORTS=TRUE \ -DUSE_DAUDIO=TRUE \ --- jdk/make/javax/sound/SoundDefs.gmk 2012-08-10 10:21:40.000000000 -0700 -+++ jdk/make/javax/sound/SoundDefs.gmk 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/javax/sound/SoundDefs.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -40,6 +40,10 @@ CPPFLAGS += -DX_PLATFORM=X_LINUX endif # PLATFORM linux @@ -2821,7 +4882,7 @@ CPPFLAGS += -DX_PLATFORM=X_MACOSX endif # PLATFORM macosx --- jdk/make/javax/sound/jsoundalsa/Makefile 2012-08-10 10:21:40.000000000 -0700 -+++ jdk/make/javax/sound/jsoundalsa/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/javax/sound/jsoundalsa/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -51,6 +51,7 @@ $(PORTFILES_c) @@ -2873,7 +4934,7 @@ # # Add to the ambient VPATH. --- jdk/make/jpda/transport/socket/Makefile 2012-08-10 10:21:40.000000000 -0700 -+++ jdk/make/jpda/transport/socket/Makefile 2012-08-19 12:39:46.000000000 -0700 ++++ jdk/make/jpda/transport/socket/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -38,6 +38,11 @@ include $(BUILDDIR)/common/Defs.gmk @@ -2887,7 +4948,7 @@ OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET) -lpthread endif --- jdk/make/sun/awt/Makefile 2012-08-10 10:21:49.000000000 -0700 -+++ jdk/make/sun/awt/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/awt/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -125,6 +125,13 @@ FILES_c += initIDs.c @@ -2946,7 +5007,7 @@ endif --- jdk/make/sun/awt/mawt.gmk 2012-08-10 10:21:49.000000000 -0700 -+++ jdk/make/sun/awt/mawt.gmk 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/awt/mawt.gmk 2013-01-16 08:58:15.000000000 -0800 @@ -169,7 +169,7 @@ OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi endif @@ -2980,7 +5041,7 @@ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ -I$(OPENWIN_HOME)/include --- jdk/make/sun/font/Makefile 2012-08-10 10:21:50.000000000 -0700 -+++ jdk/make/sun/font/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/font/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -91,7 +91,7 @@ endif # PLATFORM @@ -2999,8 +5060,1079 @@ OTHER_INCLUDES += -I$(X11_PATH)/include OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX) ifeq ($(OS_VENDOR),Apple) +--- jdk/make/sun/javazic/tzdata/VERSION 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/VERSION 2013-01-16 08:58:09.000000000 -0800 +@@ -21,4 +21,4 @@ + # or visit www.oracle.com if you need additional information or have any + # questions. + # +-tzdata2012c ++tzdata2012i +--- jdk/make/sun/javazic/tzdata/africa 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/africa 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)africa 8.35 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -261,7 +260,7 @@ + # I received a mail from an airline which says that the daylight + # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. + # From Jesper Norgaard Welen (2007-08-15): [The following agree:] +-# http://www.nentjes.info/Bill/bill5.htm ++# http://www.nentjes.info/Bill/bill5.htm + # http://www.timeanddate.com/worldclock/city.html?n=53 + # From Steffen Thorsen (2007-09-04): The official information...: + # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm +@@ -315,18 +314,18 @@ + # in September. + + # From Steffen Thorsen (2009-08-11): +-# We have been able to confirm the August change with the Egyptian Cabinet ++# We have been able to confirm the August change with the Egyptian Cabinet + # Information and Decision Support Center: + # <a href="http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html"> + # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html + # </a> +-# ++# + # The Middle East News Agency + # <a href="http://www.mena.org.eg/index.aspx"> + # http://www.mena.org.eg/index.aspx + # </a> + # also reports "Egypt starts winter time on August 21" +-# today in article numbered "71, 11/08/2009 12:25 GMT." ++# today in article numbered "71, 11/08/2009 12:25 GMT." + # Only the title above is available without a subscription to their service, + # and can be found by searching for "winter" in their search engine + # (at least today). +@@ -505,7 +504,7 @@ + # From Steffen Thorsen (2008-06-25): + # Mauritius plans to observe DST from 2008-11-01 to 2009-03-31 on a trial + # basis.... +-# It seems that Mauritius observed daylight saving time from 1982-10-10 to ++# It seems that Mauritius observed daylight saving time from 1982-10-10 to + # 1983-03-20 as well, but that was not successful.... + # http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html + +@@ -529,12 +528,12 @@ + # than previously announced (2008-11-01 to 2009-03-31). The new start + # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time + # given, but it is probably at either 2 or 3 wall clock time). +-# +-# A little strange though, since the article says that they moved the date +-# to align itself with Europe and USA which also change time on that date, +-# but that means they have not paid attention to what happened in +-# USA/Canada last year (DST ends first Sunday in November). I also wonder +-# why that they end on a Friday, instead of aligning with Europe which ++# ++# A little strange though, since the article says that they moved the date ++# to align itself with Europe and USA which also change time on that date, ++# but that means they have not paid attention to what happened in ++# USA/Canada last year (DST ends first Sunday in November). I also wonder ++# why that they end on a Friday, instead of aligning with Europe which + # changes two days later. + + # From Alex Krivenyshev (2008-07-11): +@@ -593,7 +592,7 @@ + # </a> + + # From Arthur David Olson (2009-07-11): +-# The "mauritius-dst-will-not-repeat" wrapup includes this: ++# The "mauritius-dst-will-not-repeat" wrapup includes this: + # "The trial ended on March 29, 2009, when the clocks moved back by one hour + # at 2am (or 02:00) local time..." + +@@ -687,8 +686,8 @@ + # XXX--guess that it is only Morocco for now; guess only 2008 for now. + + # From Steffen Thorsen (2008-08-27): +-# Morocco will change the clocks back on the midnight between August 31 +-# and September 1. They originally planned to observe DST to near the end ++# Morocco will change the clocks back on the midnight between August 31 ++# and September 1. They originally planned to observe DST to near the end + # of September: + # + # One article about it (in French): +@@ -822,6 +821,23 @@ + # "...à partir du dernier dimance d'avril et non fins mars, + # comme annoncé précédemment." + ++# From Milamber Space Network (2012-07-17): ++# The official return to GMT is announced by the Moroccan government: ++# <a href="http://www.mmsp.gov.ma/fr/actualites.aspx?id=288"> ++# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French] ++# </a> ++# ++# Google translation, lightly edited: ++# Back to the standard time of the Kingdom (GMT) ++# Pursuant to Decree No. 2-12-126 issued on 26 Jumada (I) 1433 (April 18, ++# 2012) and in accordance with the order of Mr. President of the ++# Government No. 3-47-12 issued on 24 Sha'ban (11 July 2012), the Ministry ++# of Public Service and Administration Modernization announces the return ++# of the legal time of the Kingdom (GMT) from Friday, July 20, 2012 until ++# Monday, August 20, 2012. So the time will be delayed by 60 minutes from ++# 3:00 am Friday, July 20, 2012 and will again be advanced by 60 minutes ++# August 20, 2012 from 2:00 am. ++ + # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S + + Rule Morocco 1939 only - Sep 12 0:00 1:00 S +@@ -849,6 +865,8 @@ + Rule Morocco 2011 only - Jul 31 0 0 - + Rule Morocco 2012 max - Apr lastSun 2:00 1:00 S + Rule Morocco 2012 max - Sep lastSun 3:00 0 - ++Rule Morocco 2012 only - Jul 20 3:00 0 - ++Rule Morocco 2012 only - Aug 20 2:00 1:00 S + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 +@@ -877,7 +895,7 @@ + # Forecasting Riaan van Zyl explained that the far eastern parts of + # the country are close to 40 minutes earlier in sunrise than the rest + # of the country. +-# ++# + # From Paul Eggert (2007-03-31): + # Apparently the Caprivi Strip informally observes Botswana time, but + # we have no details. In the meantime people there can use Africa/Gaborone. +--- jdk/make/sun/javazic/tzdata/antarctica 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/antarctica 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)antarctica 8.10 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/asia 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/asia 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)asia 8.73 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -125,7 +124,7 @@ + # From Alexander Krivenyshev (2012-02-10): + # According to News Armenia, on Feb 9, 2012, + # http://newsarmenia.ru/society/20120209/42609695.html +-# ++# + # The Armenia National Assembly adopted final reading of Amendments to the + # Law "On procedure of calculation time on the territory of the Republic of + # Armenia" according to which Armenia [is] abolishing Daylight Saving Time. +@@ -205,15 +204,15 @@ + # </a> + + # From A. N. M. Kamrus Saadat (2009-06-15): +-# Finally we've got the official mail regarding DST start time where DST start +-# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh +-# Telecommunication Regulatory Commission). ++# Finally we've got the official mail regarding DST start time where DST start ++# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh ++# Telecommunication Regulatory Commission). + # + # No DST end date has been announced yet. + + # From Alexander Krivenyshev (2009-09-25): +-# Bangladesh won't go back to Standard Time from October 1, 2009, +-# instead it will continue DST measure till the cabinet makes a fresh decision. ++# Bangladesh won't go back to Standard Time from October 1, 2009, ++# instead it will continue DST measure till the cabinet makes a fresh decision. + # + # Following report by same newspaper-"The Daily Star Friday": + # "DST change awaits cabinet decision-Clock won't go back by 1-hr from Oct 1" +@@ -227,8 +226,8 @@ + + # From Steffen Thorsen (2009-10-13): + # IANS (Indo-Asian News Service) now reports: +-# Bangladesh has decided that the clock advanced by an hour to make +-# maximum use of daylight hours as an energy saving measure would ++# Bangladesh has decided that the clock advanced by an hour to make ++# maximum use of daylight hours as an energy saving measure would + # "continue for an indefinite period." + # + # One of many places where it is published: +@@ -256,7 +255,7 @@ + + # From Alexander Krivenyshev (2010-03-22): + # According to Bangladesh newspaper "The Daily Star," +-# Cabinet cancels Daylight Saving Time ++# Cabinet cancels Daylight Saving Time + # <a href="http://www.thedailystar.net/newDesign/latest_news.php?nid=22817"> + # http://www.thedailystar.net/newDesign/latest_news.php?nid=22817 + # </a> +@@ -384,11 +383,11 @@ + # observing daylight saving time in 1986. + # + # From Thomas S. Mullaney (2008-02-11): +-# I think you're combining two subjects that need to treated +-# separately: daylight savings (which, you're correct, wasn't +-# implemented until the 1980s) and the unified time zone centered near +-# Beijing (which was implemented in 1949). Briefly, there was also a +-# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was ++# I think you're combining two subjects that need to treated ++# separately: daylight savings (which, you're correct, wasn't ++# implemented until the 1980s) and the unified time zone centered near ++# Beijing (which was implemented in 1949). Briefly, there was also a ++# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was + # ceased, and the second eventually recognized (again, in the 1980s). + # + # From Paul Eggert (2008-06-30): +@@ -525,7 +524,7 @@ + # as of 2009-10-28: + # Year Period + # 1941 1 Apr to 30 Sep +-# 1942 Whole year ++# 1942 Whole year + # 1943 Whole year + # 1944 Whole year + # 1945 Whole year +@@ -616,16 +615,16 @@ + # From Arthur David Olson (2010-04-07): + # Here's Google's translation of the table at the bottom of the "summert.htm" page: + # Decade Name Start and end date +-# Republic of China 34 years to 40 years (AD 1945-1951 years) Summer Time May 1 to September 30 +-# 41 years of the Republic of China (AD 1952) Daylight Saving Time March 1 to October 31 +-# Republic of China 42 years to 43 years (AD 1953-1954 years) Daylight Saving Time April 1 to October 31 +-# In the 44 years to 45 years (AD 1955-1956 years) Daylight Saving Time April 1 to September 30 +-# Republic of China 46 years to 48 years (AD 1957-1959) Summer Time April 1 to September 30 +-# Republic of China 49 years to 50 years (AD 1960-1961) Summer Time June 1 to September 30 +-# Republic of China 51 years to 62 years (AD 1962-1973 years) Stop Summer Time +-# Republic of China 63 years to 64 years (1974-1975 AD) Daylight Saving Time April 1 to September 30 +-# Republic of China 65 years to 67 years (1976-1978 AD) Stop Daylight Saving Time +-# Republic of China 68 years (AD 1979) Daylight Saving Time July 1 to September 30 ++# Republic of China 34 years to 40 years (AD 1945-1951 years) Summer Time May 1 to September 30 ++# 41 years of the Republic of China (AD 1952) Daylight Saving Time March 1 to October 31 ++# Republic of China 42 years to 43 years (AD 1953-1954 years) Daylight Saving Time April 1 to October 31 ++# In the 44 years to 45 years (AD 1955-1956 years) Daylight Saving Time April 1 to September 30 ++# Republic of China 46 years to 48 years (AD 1957-1959) Summer Time April 1 to September 30 ++# Republic of China 49 years to 50 years (AD 1960-1961) Summer Time June 1 to September 30 ++# Republic of China 51 years to 62 years (AD 1962-1973 years) Stop Summer Time ++# Republic of China 63 years to 64 years (1974-1975 AD) Daylight Saving Time April 1 to September 30 ++# Republic of China 65 years to 67 years (1976-1978 AD) Stop Daylight Saving Time ++# Republic of China 68 years (AD 1979) Daylight Saving Time July 1 to September 30 + # Republic of China since 69 years (AD 1980) Stop Daylight Saving Time + + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +@@ -1194,15 +1193,15 @@ + # + # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps + +-# From Paul Eggert (2005-02-22): ++# From Paul Eggert (2012-10-26): + # I used Ephraim Silverberg's dst-israel.el program + # <ftp://ftp.cs.huji.ac.il/pub/tz/software/dst-israel.el> (2005-02-20) + # along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, +-# to generate the transitions in this list. ++# to generate the transitions from 2005 through 2012. + # (I replaced "lastFri" with "Fri>=26" by hand.) +-# The spring transitions below all correspond to the following Rule: ++# The spring transitions all correspond to the following Rule: + # +-# Rule Zion 2005 max - Mar Fri>=26 2:00 1:00 D ++# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D + # + # but older zic implementations (e.g., Solaris 8) do not support + # "Fri>=26" to mean April 1 in years like 2005, so for now we list the +@@ -1219,39 +1218,36 @@ + Rule Zion 2010 only - Sep 12 2:00 0 S + Rule Zion 2011 only - Apr 1 2:00 1:00 D + Rule Zion 2011 only - Oct 2 2:00 0 S +-Rule Zion 2012 2015 - Mar Fri>=26 2:00 1:00 D ++Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D + Rule Zion 2012 only - Sep 23 2:00 0 S +-Rule Zion 2013 only - Sep 8 2:00 0 S +-Rule Zion 2014 only - Sep 28 2:00 0 S +-Rule Zion 2015 only - Sep 20 2:00 0 S +-Rule Zion 2016 only - Apr 1 2:00 1:00 D +-Rule Zion 2016 only - Oct 9 2:00 0 S +-Rule Zion 2017 2021 - Mar Fri>=26 2:00 1:00 D +-Rule Zion 2017 only - Sep 24 2:00 0 S +-Rule Zion 2018 only - Sep 16 2:00 0 S +-Rule Zion 2019 only - Oct 6 2:00 0 S +-Rule Zion 2020 only - Sep 27 2:00 0 S +-Rule Zion 2021 only - Sep 12 2:00 0 S +-Rule Zion 2022 only - Apr 1 2:00 1:00 D +-Rule Zion 2022 only - Oct 2 2:00 0 S +-Rule Zion 2023 2032 - Mar Fri>=26 2:00 1:00 D +-Rule Zion 2023 only - Sep 24 2:00 0 S +-Rule Zion 2024 only - Oct 6 2:00 0 S +-Rule Zion 2025 only - Sep 28 2:00 0 S +-Rule Zion 2026 only - Sep 20 2:00 0 S +-Rule Zion 2027 only - Oct 10 2:00 0 S +-Rule Zion 2028 only - Sep 24 2:00 0 S +-Rule Zion 2029 only - Sep 16 2:00 0 S +-Rule Zion 2030 only - Oct 6 2:00 0 S +-Rule Zion 2031 only - Sep 21 2:00 0 S +-Rule Zion 2032 only - Sep 12 2:00 0 S +-Rule Zion 2033 only - Apr 1 2:00 1:00 D +-Rule Zion 2033 only - Oct 2 2:00 0 S +-Rule Zion 2034 2037 - Mar Fri>=26 2:00 1:00 D +-Rule Zion 2034 only - Sep 17 2:00 0 S +-Rule Zion 2035 only - Oct 7 2:00 0 S +-Rule Zion 2036 only - Sep 28 2:00 0 S +-Rule Zion 2037 only - Sep 13 2:00 0 S ++ ++# From Ephraim Silverberg (2012-10-18): ++ ++# Yesterday, the Interior Ministry Committee, after more than a year ++# past, approved sending the proposed June 2011 changes to the Time ++# Decree Law back to the Knesset for second and third (final) votes ++# before the upcoming elections on Jan. 22, 2013. Hence, although the ++# changes are not yet law, they are expected to be so before February 2013. ++# ++# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March. ++# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the ++# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day ++# later (i.e. at 02:00 the first Monday after October 2). ++# [Rosh Hashana holidays are factored in until 2100.] ++ ++# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S ++Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D ++Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S ++Rule Zion 2027 only - Oct Mon>=3 2:00 0 S ++Rule Zion 2028 max - Oct Sun>=2 2:00 0 S ++# The following rules are commented out for now, as they break older ++# versions of zic that support only signed 32-bit timestamps, i.e., ++# through 2038-01-19 03:14:07 UTC. ++#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S ++#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S ++#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S ++#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S ++#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Asia/Jerusalem 2:20:56 - LMT 1880 +@@ -1386,6 +1382,16 @@ + # From Arthur David Olson (2009-04-06): + # We still have Jordan switching to DST on Thursdays in 2000 and 2001. + ++# From Steffen Thorsen (2012-10-25): ++# Yesterday the government in Jordan announced that they will not ++# switch back to standard time this winter, so the will stay on DST ++# until about the same time next year (at least). ++# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 ++# ++# From Paul Eggert (2012-10-25): ++# For now, assume this is just a one-year measure. If it becomes ++# permanent, we should move Jordan from EET to AST effective tomorrow. ++ + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Jordan 1973 only - Jun 6 0:00 1:00 S + Rule Jordan 1973 1975 - Oct 1 0:00 0 - +@@ -1414,7 +1420,8 @@ + Rule Jordan 2003 only - Oct 24 0:00s 0 - + Rule Jordan 2004 only - Oct 15 0:00s 0 - + Rule Jordan 2005 only - Sep lastFri 0:00s 0 - +-Rule Jordan 2006 max - Oct lastFri 0:00s 0 - ++Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - ++Rule Jordan 2013 max - Oct lastFri 0:00s 0 - + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Asia/Amman 2:23:44 - LMT 1931 + 2:00 Jordan EE%sT +@@ -1859,15 +1866,15 @@ + # shown 8 per cent higher consumption of electricity. + + # From Alex Krivenyshev (2008-05-15): +-# +-# Here is an article that Pakistan plan to introduce Daylight Saving Time ++# ++# Here is an article that Pakistan plan to introduce Daylight Saving Time + # on June 1, 2008 for 3 months. +-# +-# "... The federal cabinet on Wednesday announced a new conservation plan to help +-# reduce load shedding by approving the closure of commercial centres at 9pm and +-# moving clocks forward by one hour for the next three months. ++# ++# "... The federal cabinet on Wednesday announced a new conservation plan to help ++# reduce load shedding by approving the closure of commercial centres at 9pm and ++# moving clocks forward by one hour for the next three months. + # ...." +-# ++# + # <a href="http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html"> + # http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html + # </a> +@@ -1927,7 +1934,7 @@ + # Government has decided to restore the previous time by moving the + # clocks backward by one hour from October 1. A formal announcement to + # this effect will be made after the Prime Minister grants approval in +-# this regard." ++# this regard." + # <a href="http://www.thenews.com.pk/updates.asp?id=87168"> + # http://www.thenews.com.pk/updates.asp?id=87168 + # </a> +@@ -2223,7 +2230,7 @@ + # <a href="http://www.maannews.net/eng/ViewDetails.aspx?ID=306795"> + # http://www.maannews.net/eng/ViewDetails.aspx?ID=306795 + # </a> +-# the clocks were set back one hour at 2010-08-11 00:00:00 local time in ++# the clocks were set back one hour at 2010-08-11 00:00:00 local time in + # Gaza and the West Bank. + # Some more background info: + # <a href="http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html"> +@@ -2262,7 +2269,7 @@ + # The rules for Egypt are stolen from the `africa' file. + + # From Steffen Thorsen (2011-09-30): +-# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 ++# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 + # 00:00). + # So West Bank and Gaza now have the same time again. + # +@@ -2317,6 +2324,8 @@ + + # From Arthur David Olson (2011-09-20): + # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. ++# From Paul Eggert (2012-10-12): ++# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Asia/Gaza 2:17:52 - LMT 1900 Oct +@@ -2327,7 +2336,7 @@ + 2:00 Palestine EE%sT 2011 Apr 2 12:01 + 2:00 1:00 EEST 2011 Aug 1 + 2:00 - EET 2012 Mar 30 +- 2:00 1:00 EEST 2012 Sep 28 ++ 2:00 1:00 EEST 2012 Sep 21 1:00 + 2:00 - EET + + Zone Asia/Hebron 2:20:23 - LMT 1900 Oct +@@ -2342,7 +2351,7 @@ + 2:00 - EET 2011 Aug 30 + 2:00 1:00 EEST 2011 Sep 30 3:00 + 2:00 - EET 2012 Mar 30 +- 2:00 1:00 EEST 2012 Sep 28 3:00 ++ 2:00 1:00 EEST 2012 Sep 21 1:00 + 2:00 - EET + + # Paracel Is +@@ -2536,19 +2545,19 @@ + # having it between Wednesday and Thursday (two workdays in Syria) since the + # weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now + # it is implemented at midnight of the last workday before weekend... +-# ++# + # From Steffen Thorsen (2007-10-27): + # Jesper Norgaard Welen wrote: +-# ++# + # > "Winter local time in Syria will be observed at midnight of Thursday 1 + # > November 2007, and the clock will be put back 1 hour." +-# ++# + # I found confirmation on this in this gov.sy-article (Arabic): + # http://wehda.alwehda.gov.sy/_print_veiw.asp?FileName=12521710520070926111247 +-# ++# + # which using Google's translate tools says: +-# Council of Ministers also approved the commencement of work on +-# identifying the winter time as of Friday, 2/11/2007 where the 60th ++# Council of Ministers also approved the commencement of work on ++# identifying the winter time as of Friday, 2/11/2007 where the 60th + # minute delay at midnight Thursday 1/11/2007. + Rule Syria 2007 only - Nov Fri>=1 0:00 0 - + +@@ -2614,8 +2623,8 @@ + # </a> + + # From Steffen Thorsen (2009-10-27): +-# The Syrian Arab News Network on 2009-09-29 reported that Syria will +-# revert back to winter (standard) time on midnight between Thursday ++# The Syrian Arab News Network on 2009-09-29 reported that Syria will ++# revert back to winter (standard) time on midnight between Thursday + # 2009-10-29 and Friday 2009-10-30: + # <a href="http://www.sana.sy/ara/2/2009/09/29/247012.htm"> + # http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic) +--- jdk/make/sun/javazic/tzdata/australasia 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/australasia 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)australasia 8.30 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -307,9 +306,9 @@ + # </a> + + # From Alexander Krivenyshev (2010-10-24): +-# According to Radio Fiji and Fiji Times online, Fiji will end DST 3 ++# According to Radio Fiji and Fiji Times online, Fiji will end DST 3 + # weeks earlier than expected - on March 6, 2011, not March 27, 2011... +-# Here is confirmation from Government of the Republic of the Fiji Islands, ++# Here is confirmation from Government of the Republic of the Fiji Islands, + # Ministry of Information (fiji.gov.fj) web site: + # <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155"> + # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155 +@@ -320,15 +319,15 @@ + # </a> + + # From Steffen Thorsen (2011-10-03): +-# Now the dates have been confirmed, and at least our start date ++# Now the dates have been confirmed, and at least our start date + # assumption was correct (end date was one week wrong). + # + # <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155"> + # www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155 + # </a> + # which says +-# Members of the public are reminded to change their time to one hour in +-# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to ++# Members of the public are reminded to change their time to one hour in ++# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to + # 2am on February 26 next year. + + # From Ken Rylander (2011-10-24) +@@ -345,15 +344,23 @@ + # The commencement of daylight saving will remain unchanged and start + # on the 23rd of October, 2011. + ++# From the Fiji Government Online Portal (2012-08-21) via Steffen Thorsen: ++# The Minister for Labour, Industrial Relations and Employment Mr Jone Usamate ++# today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st ++# October 2012 and end at 3 am on Sunday 20th January 2013. ++# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155 ++# ++# From Paul Eggert (2012-08-31): ++# For now, guess a pattern of the penultimate Sundays in October and January. ++ + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S + Rule Fiji 1999 2000 - Feb lastSun 3:00 0 - + Rule Fiji 2009 only - Nov 29 2:00 1:00 S + Rule Fiji 2010 only - Mar lastSun 3:00 0 - +-Rule Fiji 2010 only - Oct 24 2:00 1:00 S ++Rule Fiji 2010 max - Oct Sun>=18 2:00 1:00 S + Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - +-Rule Fiji 2011 only - Oct 23 2:00 1:00 S +-Rule Fiji 2012 only - Jan 22 3:00 0 - ++Rule Fiji 2012 max - Jan Sun>=18 3:00 0 - + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva + 12:00 Fiji FJ%sT # Fiji Time +@@ -582,7 +589,7 @@ + + # From David Zuelke (2011-05-09): + # Subject: Samoa to move timezone from east to west of international date line +-# ++# + # <a href="http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963"> + # http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963 + # </a> +@@ -644,6 +651,23 @@ + # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 + # seasons, there is not yet any indication that this trend will continue on + # a regular basis. For now, we have explicitly listed the transitions below. ++# ++# From Nicky (2012-09-10): ++# Daylight Saving Time commences on Sunday 30th September 2012 and ++# ends on Sunday 7th of April 2013. ++# ++# Please find link below for more information. ++# http://www.mcil.gov.ws/mcil_publications.html ++# ++# That publication also includes dates for Summer of 2013/4 as well ++# which give the impression of a pattern in selecting dates for the ++# future, so for now, we will guess this will continue. ++ ++# Western Samoa ++# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S ++Rule WS 2012 max - Sep lastSun 3:00 1 D ++Rule WS 2012 max - Apr Sun>=1 4:00 0 - ++# Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 + -11:26:56 - LMT 1911 + -11:30 - SAMT 1950 # Samoa Time +@@ -651,8 +675,8 @@ + -11:00 1:00 WSDT 2011 Apr 2 4:00 + -11:00 - WST 2011 Sep 24 3:00 + -11:00 1:00 WSDT 2011 Dec 30 +- 13:00 1:00 WSDT 2012 Apr 1 4:00 +- 13:00 - WST ++ 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 ++ 13:00 WS WS%sT + + # Solomon Is + # excludes Bougainville, for which see Papua New Guinea +@@ -664,25 +688,25 @@ + # + # From Gwillim Law (2011-12-29) + # A correspondent informed me that Tokelau, like Samoa, will be skipping +-# December 31 this year, thereby changing its time zone from UTC-10 to +-# UTC+14. When I tried to verify this statement, I found a confirming +-# article in Time magazine online +-# <a href="http://www.time.com/time/world/article/0,8599,2103243,00.html"> +-# (http://www.time.com/time/world/article/0,8599,2103243,00.html). +-# </a> ++# December 31 this year ... + # +-# From Jonathan Leffler (2011-12-29) +-# Information from the BBC to the same effect: +-# <a href="http://www.bbc.co.uk/news/world-asia-16351377"> +-# http://www.bbc.co.uk/news/world-asia-16351377 +-# </a> +-# +-# Patch supplied by Tim Parenti (2011-12-29) ++# From Steffen Thorsen (2012-07-25) ++# ... we double checked by calling hotels and offices based in Tokelau asking ++# about the time there, and they all told a time that agrees with UTC+13.... ++# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change ++# actually was to UTC-11 back then. ++# ++# From Paul Eggert (2012-07-25) ++# A Google Books snippet of Appendix to the Journals of the House of ++# Representatives of New Zealand, Session 1948, ++# <http://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau ++# was "11 hours slow on G.M.T." Go with Thorsen and assume Shanks & Pottenger ++# are off by an hour starting in 1901. + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Pacific/Fakaofo -11:24:56 - LMT 1901 +- -10:00 - TKT 2011 Dec 30 # Tokelau Time +- 14:00 - TKT ++ -11:00 - TKT 2011 Dec 30 # Tokelau Time ++ 13:00 - TKT + + # Tonga + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +@@ -1363,22 +1387,22 @@ + # See "southeast Australia" above for 2008 and later. + + # From Steffen Thorsen (2009-04-28): +-# According to the official press release, South Australia's extended daylight +-# saving period will continue with the same rules as used during the 2008-2009 ++# According to the official press release, South Australia's extended daylight ++# saving period will continue with the same rules as used during the 2008-2009 + # summer (southern hemisphere). +-# ++# + # From + # <a href="http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf"> + # http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf + # </a> +-# The extended daylight saving period that South Australia has been trialling ++# The extended daylight saving period that South Australia has been trialling + # for over the last year is now set to be ongoing. +-# Daylight saving will continue to start on the first Sunday in October each ++# Daylight saving will continue to start on the first Sunday in October each + # year and finish on the first Sunday in April the following year. +-# Industrial Relations Minister, Paul Caica, says this provides South Australia +-# with a consistent half hour time difference with NSW, Victoria, Tasmania and ++# Industrial Relations Minister, Paul Caica, says this provides South Australia ++# with a consistent half hour time difference with NSW, Victoria, Tasmania and + # the ACT for all 52 weeks of the year... +-# ++# + # We have a wrap-up here: + # <a href="http://www.timeanddate.com/news/time/south-australia-extends-dst.html"> + # http://www.timeanddate.com/news/time/south-australia-extends-dst.html +--- jdk/make/sun/javazic/tzdata/backward 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/backward 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)backward 8.11 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/etcetera 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/etcetera 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)etcetera 8.3 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/europe 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/europe 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)europe 8.41 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -598,12 +597,12 @@ + # According to Kremlin press service, Russian President Dmitry Medvedev + # signed a federal law "On calculation of time" on June 9, 2011. + # According to the law Russia is abolishing daylight saving time. +-# +-# Medvedev signed a law "On the Calculation of Time" (in russian): ++# ++# Medvedev signed a law "On the Calculation of Time" (in russian): + # <a href="http://bmockbe.ru/events/?ID=7583"> + # http://bmockbe.ru/events/?ID=7583 + # </a> +-# ++# + # Medvedev signed a law on the calculation of the time (in russian): + # <a href="http://www.regnum.ru/news/polit/1413906.html"> + # http://www.regnum.ru/news/polit/1413906.html +@@ -1711,7 +1710,7 @@ + # From Alexander Krivenyshev (2011-10-26) + # NO need to divide Moldova into two timezones at this point. + # As of today, Transnistria (Pridnestrovie)- Tiraspol reversed its own +-# decision to abolish DST this winter. ++# decision to abolish DST this winter. + # Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)- + # Tiraspol will go back to winter time on October 30, 2011. + # News from Moldova (in russian): +@@ -2601,11 +2600,11 @@ + # http://www.alomaliye.com/bkk_2002_3769.htm + + # From Gökdeniz Karadağ (2011-03-10): +-# ++# + # According to the articles linked below, Turkey will change into summer + # time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27. + # This change is due to a nationwide exam on 27th. +-# ++# + # <a href="http://www.worldbulletin.net/?aType=haber&ArticleID=70872"> + # http://www.worldbulletin.net/?aType=haber&ArticleID=70872 + # </a> +@@ -2722,7 +2721,7 @@ + # time this year after all. + # + # From Udo Schwedt (2011-10-18): +-# As far as I understand, the recent change to the Ukranian time zone ++# As far as I understand, the recent change to the Ukranian time zone + # (Europe/Kiev) to introduce permanent daylight saving time (similar + # to Russia) was reverted today: + # +--- jdk/make/sun/javazic/tzdata/factory 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/factory 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)factory 8.2 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/iso3166.tab 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/iso3166.tab 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)iso3166.tab 8.11 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + # ISO 3166 alpha-2 country codes +--- jdk/make/sun/javazic/tzdata/leapseconds 2012-08-10 10:21:50.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/leapseconds 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)leapseconds 8.13 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -101,8 +100,8 @@ + # + # + # A positive leap second will be introduced at the end of June 2012. +-# The sequence of dates of the UTC second markers will be: +-# ++# The sequence of dates of the UTC second markers will be: ++# + # 2012 June 30, 23h 59m 59s + # 2012 June 30, 23h 59m 60s + # 2012 July 1, 0h 0m 0s +@@ -119,6 +118,6 @@ + # + # + # Daniel GAMBIS +-# Head ++# Head + # Earth Orientation Center of IERS + # Observatoire de Paris, France +--- jdk/make/sun/javazic/tzdata/northamerica 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/northamerica 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)northamerica 8.54 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -502,7 +501,7 @@ + -8:00 US P%sT 1946 + -8:00 - PST 1969 + -8:00 US P%sT 1980 Apr 27 2:00 +- -9:00 US Y%sT 1980 Oct 26 2:00 ++ -9:00 US Y%sT 1980 Oct 26 2:00 + -8:00 US P%sT 1983 Oct 30 2:00 + -9:00 US Y%sT 1983 Nov 30 + -9:00 US AK%sT +@@ -1867,7 +1866,7 @@ + # Here is a summary of the three clock change events in Creston's history: + # 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7) + # Exact date unknown +-# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) ++# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) + # Exact date in October unknown; Sunday October 1 is a reasonable guess. + # 3. June 1918: switch to Pacific Daylight Time (GMT-7) + # Exact date in June unknown; Sunday June 2 is a reasonable guess. +@@ -2697,20 +2696,20 @@ + # except that it switches at midnight standard time as usual. + # + # From Steffen Thorsen (2007-10-25): +-# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week ++# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week + # earlier - on the last Sunday of October, just like in 2006. +-# ++# + # He supplied these references: +-# ++# + # http://www.prensalatina.com.mx/article.asp?ID=%7B4CC32C1B-A9F7-42FB-8A07-8631AFC923AF%7D&language=ES + # http://actualidad.terra.es/sociedad/articulo/cuba_llama_ahorrar_energia_cambio_1957044.htm +-# ++# + # From Alex Kryvenishev (2007-10-25): + # Here is also article from Granma (Cuba): +-# ++# + # [Regira] el Horario Normal desde el [proximo] domingo 28 de octubre + # http://www.granma.cubaweb.cu/2007/10/24/nacional/artic07.html +-# ++# + # http://www.worldtimezone.com/dst_news/dst_news_cuba03.html + + # From Arthur David Olson (2008-03-09): +@@ -2794,7 +2793,7 @@ + # </a> + # + # From Steffen Thorsen (2011-10-30) +-# Cuba will end DST two weeks later this year. Instead of going back ++# Cuba will end DST two weeks later this year. Instead of going back + # tonight, it has been delayed to 2011-11-13 at 01:00. + # + # One source (Spanish) +@@ -2806,11 +2805,11 @@ + # <a href="http://www.timeanddate.com/news/time/cuba-time-changes-2011.html"> + # http://www.timeanddate.com/news/time/cuba-time-changes-2011.html + # </a> +-# ++# + # From Steffen Thorsen (2012-03-01) +-# According to Radio Reloj, Cuba will start DST on Midnight between March ++# According to Radio Reloj, Cuba will start DST on Midnight between March + # 31 and April 1. +-# ++# + # Radio Reloj has the following info (Spanish): + # <a href="http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril"> + # http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril +@@ -2821,6 +2820,13 @@ + # http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html + # </a> + ++# From Steffen Thorsen (2012-11-03): ++# Radio Reloj and many other sources report that Cuba is changing back ++# to standard time on 2012-11-04: ++# http://www.radioreloj.cu/index.php/noticias-radio-reloj/36-nacionales/9961-regira-horario-normal-en-cuba-desde-el-domingo-cuatro-de-noviembre ++# From Paul Eggert (2012-11-03): ++# For now, assume the future rule is first Sunday in November. ++ + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Cuba 1928 only - Jun 10 0:00 1:00 D + Rule Cuba 1928 only - Oct 10 0:00 0 S +@@ -2858,7 +2864,7 @@ + Rule Cuba 2011 only - Mar Sun>=15 0:00s 1:00 D + Rule Cuba 2011 only - Nov 13 0:00s 0 S + Rule Cuba 2012 only - Apr 1 0:00s 1:00 D +-Rule Cuba 2012 max - Oct lastSun 0:00s 0 S ++Rule Cuba 2012 max - Nov Sun>=1 0:00s 0 S + Rule Cuba 2013 max - Mar Sun>=8 0:00s 1:00 D + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] +--- jdk/make/sun/javazic/tzdata/pacificnew 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/pacificnew 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)pacificnew 8.2 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/solar87 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/solar87 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)solar87 8.2 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/solar88 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/solar88 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)solar88 8.2 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/solar89 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/solar89 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)solar89 8.2 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/southamerica 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/southamerica 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)southamerica 8.53 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +@@ -255,7 +254,7 @@ + Rule Arg 2007 only - Dec 30 0:00 1:00 S + Rule Arg 2008 2009 - Mar Sun>=15 0:00 0 - + Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S +- ++ + # From Mariano Absatz (2004-05-21): + # Today it was officially published that the Province of Mendoza is changing + # its timezone this winter... starting tomorrow night.... +@@ -345,9 +344,9 @@ + # confirms what Alex Krivenyshev has earlier sent to the tz + # emailing list about that San Luis plans to return to standard + # time much earlier than the rest of the country. It also +-# confirms that upon request the provinces San Juan and Mendoza +-# refused to follow San Luis in this change. +-# ++# confirms that upon request the provinces San Juan and Mendoza ++# refused to follow San Luis in this change. ++# + # The change is supposed to take place Monday the 21.st at 0:00 + # hours. As far as I understand it if this goes ahead, we need + # a new timezone for San Luis (although there are also documented +@@ -409,7 +408,7 @@ + # <a href="http://www.lanacion.com.ar/nota.asp?nota_id=1107912"> + # http://www.lanacion.com.ar/nota.asp?nota_id=1107912 + # </a> +-# ++# + # The press release says: + # (...) anunció que el próximo domingo a las 00:00 los puntanos deberán + # atrasar una hora sus relojes. +@@ -823,8 +822,8 @@ + # + # From Alexander Krivenyshev (2011-10-04): + # State Bahia will return to Daylight savings time this year after 8 years off. +-# The announcement was made by Governor Jaques Wagner in an interview to a +-# television station in Salvador. ++# The announcement was made by Governor Jaques Wagner in an interview to a ++# television station in Salvador. + + # In Portuguese: + # <a href="http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html"> +@@ -853,6 +852,15 @@ + # http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6 + # </a> + ++# From Kelley Cook (2012-10-16): ++# The governor of state of Bahia in Brazil announced on Thursday that ++# due to public pressure, he is reversing the DST policy they implemented ++# last year and will not be going to Summer Time on October 21st.... ++# http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia ++ ++# From Rodrigo Severo (2012-10-16): ++# Tocantins state will have DST. ++# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html + + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01) +@@ -1072,7 +1080,8 @@ + -3:00 Brazil BR%sT 1990 Sep 17 + -3:00 - BRT 1995 Sep 14 + -3:00 Brazil BR%sT 2003 Sep 24 +- -3:00 - BRT ++ -3:00 - BRT 2012 Oct 21 ++ -3:00 Brazil BR%sT + # + # Alagoas (AL), Sergipe (SE) + Zone America/Maceio -2:22:52 - LMT 1914 +@@ -1091,7 +1100,8 @@ + Zone America/Bahia -2:34:04 - LMT 1914 + -3:00 Brazil BR%sT 2003 Sep 24 + -3:00 - BRT 2011 Oct 16 +- -3:00 Brazil BR%sT ++ -3:00 Brazil BR%sT 2012 Oct 21 ++ -3:00 - BRT + # + # Goias (GO), Distrito Federal (DF), Minas Gerais (MG), + # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR), +@@ -1183,7 +1193,7 @@ + # Due to drought, Chile extends Daylight Time in three weeks. This + # is one-time change (Saturday 3/29 at 24:00 for America/Santiago + # and Saturday 3/29 at 22:00 for Pacific/Easter) +-# The Supreme Decree is located at ++# The Supreme Decree is located at + # <a href="http://www.shoa.cl/servicios/supremo316.pdf"> + # http://www.shoa.cl/servicios/supremo316.pdf + # </a> +@@ -1194,7 +1204,7 @@ + + # From Jose Miguel Garrido (2008-03-05): + # ... +-# You could see the announces of the change on ++# You could see the announces of the change on + # <a href="http://www.shoa.cl/noticias/2008/04hora/hora.htm"> + # http://www.shoa.cl/noticias/2008/04hora/hora.htm + # </a>. +--- jdk/make/sun/javazic/tzdata/systemv 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/systemv 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)systemv 8.2 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + +--- jdk/make/sun/javazic/tzdata/zone.tab 2012-08-10 10:21:51.000000000 -0700 ++++ jdk/make/sun/javazic/tzdata/zone.tab 2013-01-16 08:58:09.000000000 -0800 +@@ -22,7 +22,6 @@ + # questions. + # + # <pre> +-# @(#)zone.tab 8.55 + # This file is in the public domain, so clarified as of + # 2009-05-17 by Arthur David Olson. + # --- jdk/make/sun/jawt/Makefile 2012-08-10 10:21:52.000000000 -0700 -+++ jdk/make/sun/jawt/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/jawt/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -94,8 +94,7 @@ # # Other extra flags needed for compiling. @@ -3029,7 +6161,7 @@ OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt else --- jdk/make/sun/rmi/rmi/Makefile 2012-08-10 10:21:53.000000000 -0700 -+++ jdk/make/sun/rmi/rmi/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/rmi/rmi/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -97,6 +97,9 @@ BUILD_TARGETS += bin endif @@ -3040,8 +6172,50 @@ build: $(BUILD_TARGETS) +--- jdk/make/sun/security/ec/Makefile 2012-08-10 10:21:53.000000000 -0700 ++++ jdk/make/sun/security/ec/Makefile 2013-01-16 08:58:15.000000000 -0800 +@@ -245,9 +245,9 @@ + # + # Build sunec.jar. + # +-$(UNSIGNED_DIR)/sunec.jar: build ++$(UNSIGNED_DIR)/sunec.jar: build $(JCE_MANIFEST_FILE) + $(prep-target) +- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ ++ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ + $(BOOT_JAR_JFLAGS) + @$(java-vm-cleanup) + +--- jdk/make/sun/security/mscapi/Makefile 2012-08-10 10:21:54.000000000 -0700 ++++ jdk/make/sun/security/mscapi/Makefile 2013-01-16 08:58:09.000000000 -0800 +@@ -210,9 +210,9 @@ + # + # Build sunmscapi.jar. + # +-$(UNSIGNED_DIR)/sunmscapi.jar: build ++$(UNSIGNED_DIR)/sunmscapi.jar: build $(JCE_MANIFEST_FILE) + $(prep-target) +- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ ++ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ + $(BOOT_JAR_JFLAGS) + @$(java-vm-cleanup) + +--- jdk/make/sun/security/pkcs11/Makefile 2012-08-10 10:21:55.000000000 -0700 ++++ jdk/make/sun/security/pkcs11/Makefile 2013-01-16 08:58:15.000000000 -0800 +@@ -224,9 +224,9 @@ + # + # Build sunpkcs11.jar. + # +-$(UNSIGNED_DIR)/sunpkcs11.jar: build ++$(UNSIGNED_DIR)/sunpkcs11.jar: build $(JCE_MANIFEST_FILE) + $(prep-target) +- $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \ ++ $(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ + $(BOOT_JAR_JFLAGS) + @$(java-vm-cleanup) + --- jdk/make/sun/splashscreen/Makefile 2012-08-10 10:21:55.000000000 -0700 -+++ jdk/make/sun/splashscreen/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/splashscreen/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -83,15 +83,16 @@ -framework JavaNativeFoundation else ifneq ($(PLATFORM), windows) @@ -3068,7 +6242,7 @@ CFLAGS += -DWITH_WIN32 OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll --- jdk/make/sun/xawt/Makefile 2012-08-10 10:21:55.000000000 -0700 -+++ jdk/make/sun/xawt/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/sun/xawt/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -52,6 +52,9 @@ AUTO_JAVA_PRUNE = WrapperGenerator.java @@ -3122,7 +6296,7 @@ CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" endif --- jdk/make/tools/freetypecheck/Makefile 2012-08-10 10:22:31.000000000 -0700 -+++ jdk/make/tools/freetypecheck/Makefile 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/tools/freetypecheck/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -52,8 +52,15 @@ else ifeq ($(PLATFORM), macosx) @@ -3142,7 +6316,7 @@ endif endif --- jdk/make/tools/sharing/classlist.bsd 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/make/tools/sharing/classlist.bsd 2012-08-19 12:39:47.000000000 -0700 ++++ jdk/make/tools/sharing/classlist.bsd 2013-01-16 08:58:15.000000000 -0800 @@ -0,0 +1,2327 @@ +java/lang/Object +java/lang/String @@ -5472,7 +8646,7 @@ +javax/swing/BufferStrategyPaintManager$1 +# f3ac8b467e7f8c49 --- jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2012-08-10 10:23:05.000000000 -0700 -+++ jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2013-01-16 00:07:00.000000000 -0800 @@ -32,20 +32,10 @@ import com.apple.laf.AquaUtils.RecyclableSingleton; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; @@ -5495,7 +8669,7 @@ - } } --- jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2012-08-10 10:23:07.000000000 -0700 -+++ jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2013-01-16 00:07:00.000000000 -0800 @@ -319,12 +319,4 @@ updateComponentTreeUIActivation(element, active); } @@ -5510,7 +8684,7 @@ - } } --- jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2012-08-10 10:23:07.000000000 -0700 -+++ jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2013-01-16 00:07:00.000000000 -0800 @@ -73,7 +73,9 @@ g.translate(x, y); @@ -5536,7 +8710,7 @@ - } } --- jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2012-08-10 10:23:08.000000000 -0700 -+++ jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2013-01-16 00:07:00.000000000 -0800 @@ -28,19 +28,18 @@ import java.awt.*; import java.awt.image.*; @@ -5610,8 +8784,225 @@ - } } - +--- jdk/src/macosx/classes/com/apple/laf/ScreenMenuItem.java 2012-08-10 10:23:09.000000000 -0700 ++++ jdk/src/macosx/classes/com/apple/laf/ScreenMenuItem.java 2013-01-16 08:58:09.000000000 -0800 +@@ -34,7 +34,7 @@ + + import sun.lwawt.macosx.CMenuItem; + +-class ScreenMenuItem extends MenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler { ++final class ScreenMenuItem extends MenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler { + ScreenMenuPropertyListener fListener; + JMenuItem fMenuItem; + +@@ -96,21 +96,34 @@ + fMenuItem.removeComponentListener(this); + } + +- public void setAccelerator(final KeyStroke ks) { +- if (ks == null) { +- setShortcut(null); ++ static void syncLabelAndKS(MenuItem menuItem, String label, KeyStroke ks) { ++ final MenuComponentPeer peer = menuItem.getPeer(); ++ if (!(peer instanceof CMenuItem)) { ++ //Is it possible? + return; + } +- +- final MenuComponentPeer peer = getPeer(); +- if (peer instanceof CMenuItem) { +- final CMenuItem ourPeer = (CMenuItem)peer; +- ourPeer.setLabel(fMenuItem.getText(), ks.getKeyChar(), ks.getKeyCode(), ks.getModifiers()); ++ final CMenuItem cmi = (CMenuItem) peer; ++ if (ks == null) { ++ cmi.setLabel(label); + } else { +- setShortcut(new MenuShortcut(ks.getKeyCode(), (ks.getModifiers() & InputEvent.SHIFT_MASK) != 0)); ++ cmi.setLabel(label, ks.getKeyChar(), ks.getKeyCode(), ++ ks.getModifiers()); + } + } + ++ @Override ++ public synchronized void setLabel(final String label) { ++ syncLabelAndKS(this, label, fMenuItem.getAccelerator()); ++ } ++ ++ @Override ++ public void setAccelerator(final KeyStroke ks) { ++ // We call CMenuItem.setLabel(..,..,..) directly and does not initialize ++ // shortcut property. So shortcut property should not be used from the ++ // peers code directly or indirectly. ++ syncLabelAndKS(this, fMenuItem.getText(), ks); ++ } ++ + public void actionPerformed(final ActionEvent e) { + fMenuItem.doClick(0); // This takes care of all the different events + } +--- jdk/src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java 2012-08-10 10:23:09.000000000 -0700 ++++ jdk/src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java 2013-01-16 08:58:09.000000000 -0800 +@@ -36,7 +36,7 @@ + + import sun.lwawt.macosx.*; + +-class ScreenMenuItemCheckbox extends CheckboxMenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler, ItemListener { ++final class ScreenMenuItemCheckbox extends CheckboxMenuItem implements ActionListener, ComponentListener, ScreenMenuPropertyHandler, ItemListener { + JMenuItem fMenuItem; + MenuContainer fParent; + +@@ -110,19 +110,17 @@ + super.removeNotify(); + } + +- public void setAccelerator(final KeyStroke ks) { +- if (ks == null) { +- setShortcut(null); +- return; +- } ++ @Override ++ public synchronized void setLabel(final String label) { ++ ScreenMenuItem.syncLabelAndKS(this, label, fMenuItem.getAccelerator()); ++ } + +- final MenuComponentPeer peer = getPeer(); +- if (peer instanceof CMenuItem) { +- final CMenuItem ourPeer = (CMenuItem)peer; +- ourPeer.setLabel(fMenuItem.getText(), ks.getKeyChar(), ks.getKeyCode(), ks.getModifiers()); +- } else { +- setShortcut(new MenuShortcut(ks.getKeyCode(), (ks.getModifiers() & InputEvent.SHIFT_MASK) != 0)); +- } ++ @Override ++ public void setAccelerator(final KeyStroke ks) { ++ // We call CMenuItem.setLabel(..,..,..) directly and does not initialize ++ // shortcut property. So shortcut property should not be used from the ++ // peers code directly or indirectly. ++ ScreenMenuItem.syncLabelAndKS(this, fMenuItem.getText(), ks); + } + + public void actionPerformed(final ActionEvent e) { +--- jdk/src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2012-08-10 10:23:11.000000000 -0700 ++++ jdk/src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2013-01-16 08:58:09.000000000 -0800 +@@ -31,8 +31,12 @@ + import java.awt.Component; + import java.awt.Graphics; + import java.awt.Graphics2D; ++import java.awt.GraphicsConfiguration; ++import java.awt.GraphicsDevice; ++import java.awt.GraphicsEnvironment; + import java.awt.Image; + import java.awt.ImageCapabilities; ++import java.awt.Rectangle; + import java.awt.Transparency; + import java.awt.color.ColorSpace; + import java.awt.image.BufferedImage; +@@ -44,6 +48,7 @@ + + import sun.awt.CGraphicsConfig; + import sun.awt.CGraphicsDevice; ++import sun.awt.TextureSizeConstraining; + import sun.awt.image.OffScreenImage; + import sun.awt.image.SunVolatileImage; + import sun.awt.image.SurfaceManager; +@@ -65,7 +70,7 @@ + import sun.lwawt.macosx.CPlatformView; + + public class CGLGraphicsConfig extends CGraphicsConfig +- implements OGLGraphicsConfig ++ implements OGLGraphicsConfig, TextureSizeConstraining + { + //private static final int kOpenGLSwapInterval = RuntimeOptions.getCurrentOptions().OpenGLSwapInterval; + private static final int kOpenGLSwapInterval = 0; // TODO +@@ -79,11 +84,14 @@ + private OGLContext context; + private Object disposerReferent = new Object(); + ++ private final int cachedMaxTextureSize; ++ + public static native int getDefaultPixFmt(int screennum); + private static native boolean initCGL(); + private static native long getCGLConfigInfo(int screennum, int visualnum, + int swapInterval); + private static native int getOGLCapabilities(long configInfo); ++ private static native int _getMaxTextureSize(); + + static { + cglAvailable = initCGL(); +@@ -103,6 +111,10 @@ + // CGLGraphicsConfigInfo data when this object goes away + Disposer.addRecord(disposerReferent, + new CGLGCDisposerRecord(pConfigInfo)); ++ ++ // 7200762: Workaround a deadlock by caching the value ++ // A fix for JDK 8 will remove the workaround ++ this.cachedMaxTextureSize = _getMaxTextureSize(); + } + + @Override +@@ -242,6 +254,8 @@ + } finally { + rq.unlock(); + } ++ ++ updateTotalDisplayBounds(); + } + + @Override +@@ -478,4 +492,53 @@ + public void removeDeviceEventListener(AccelDeviceEventListener l) { + AccelDeviceEventNotifier.removeListener(l); + } ++ ++ private static final Rectangle totalDisplayBounds = new Rectangle(); ++ ++ private static void updateTotalDisplayBounds() { ++ synchronized (totalDisplayBounds) { ++ Rectangle virtualBounds = new Rectangle(); ++ for (GraphicsDevice gd : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) { ++ for (GraphicsConfiguration gc : gd.getConfigurations()) { ++ virtualBounds = virtualBounds.union(gc.getBounds()); ++ } ++ } ++ totalDisplayBounds.setBounds(virtualBounds); ++ } ++ } ++ ++ ++ // 7160609: GL still fails to create a square texture of this size, ++ // so we use this value to cap the total display bounds. ++ private int getMaxTextureSize() { ++ return cachedMaxTextureSize; ++ } ++ ++ @Override ++ public int getMaxTextureWidth() { ++ int width; ++ ++ synchronized (totalDisplayBounds) { ++ if (totalDisplayBounds.width == 0) { ++ updateTotalDisplayBounds(); ++ } ++ width = totalDisplayBounds.width; ++ } ++ ++ return Math.min(width, getMaxTextureSize()); ++ } ++ ++ @Override ++ public int getMaxTextureHeight() { ++ int height; ++ ++ synchronized (totalDisplayBounds) { ++ if (totalDisplayBounds.height == 0) { ++ updateTotalDisplayBounds(); ++ } ++ height = totalDisplayBounds.height; ++ } ++ ++ return Math.min(height, getMaxTextureSize()); ++ } + } --- jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2013-01-16 00:07:01.000000000 -0800 @@ -68,12 +68,11 @@ } @@ -5628,7 +9019,7 @@ public Object getDestination() { --- jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2013-01-16 00:07:01.000000000 -0800 @@ -424,7 +424,8 @@ @Override @@ -5757,7 +9148,7 @@ * Used by ContainerPeer to skip all the paint events during layout. * --- jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2013-01-16 00:07:01.000000000 -0800 @@ -58,6 +58,9 @@ private static void flushBuffers(final LWComponentPeer peer) { @@ -5769,7 +9160,7 @@ } } --- jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2013-01-16 00:07:01.000000000 -0800 @@ -129,6 +129,16 @@ } @@ -5788,7 +9179,7 @@ final int end) { synchronized (getDelegateLock()) { --- jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2013-01-16 00:07:01.000000000 -0800 @@ -124,7 +124,7 @@ } @@ -5799,7 +9190,7 @@ // JTextArea.setText() posts two different events (remove & insert). // Since we make no differences between text events, --- jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2013-01-16 00:07:01.000000000 -0800 @@ -522,6 +522,12 @@ postEvent(targetToAppContext(event.getSource()), event); } @@ -5814,7 +9205,7 @@ public void grab(Window w) { if (w.getPeer() != null) { --- jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-08-10 10:23:11.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2013-01-16 08:58:09.000000000 -0800 @@ -37,7 +37,6 @@ import sun.java2d.*; import sun.java2d.loops.Blit; @@ -5864,7 +9255,65 @@ } catch (InvalidPipeException z) { throw new AWTException(z.toString()); } -@@ -451,44 +441,19 @@ +@@ -355,6 +345,18 @@ + h = MINIMUM_HEIGHT; + } + ++ if (graphicsConfig instanceof TextureSizeConstraining) { ++ final int maxW = ((TextureSizeConstraining)graphicsConfig).getMaxTextureWidth(); ++ final int maxH = ((TextureSizeConstraining)graphicsConfig).getMaxTextureHeight(); ++ ++ if (w > maxW) { ++ w = maxW; ++ } ++ if (h > maxH) { ++ h = maxH; ++ } ++ } ++ + // Don't post ComponentMoved/Resized and Paint events + // until we've got a notification from the delegate + setBounds(x, y, w, h, op, false, false); +@@ -426,14 +428,33 @@ + + @Override + public void updateMinimumSize() { +- Dimension d = null; ++ final Dimension min; + if (getTarget().isMinimumSizeSet()) { +- d = getTarget().getMinimumSize(); ++ min = getTarget().getMinimumSize(); ++ min.width = Math.max(min.width, MINIMUM_WIDTH); ++ min.height = Math.max(min.height, MINIMUM_HEIGHT); ++ } else { ++ min = new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT); + } +- if (d == null) { +- d = new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT); ++ ++ final int maxW, maxH; ++ if (graphicsConfig instanceof TextureSizeConstraining) { ++ maxW = ((TextureSizeConstraining)graphicsConfig).getMaxTextureWidth(); ++ maxH = ((TextureSizeConstraining)graphicsConfig).getMaxTextureHeight(); ++ } else { ++ maxW = maxH = Integer.MAX_VALUE; ++ } ++ ++ final Dimension max; ++ if (getTarget().isMaximumSizeSet()) { ++ max = getTarget().getMaximumSize(); ++ max.width = Math.min(max.width, maxW); ++ max.height = Math.min(max.height, maxH); ++ } else { ++ max = new Dimension(maxW, maxH); + } +- platformWindow.setMinimumSize(d.width, d.height); ++ ++ platformWindow.setSizeConstraints(min.width, min.height, max.width, max.height); + } + + @Override +@@ -451,44 +472,19 @@ public final void setOpaque(final boolean isOpaque) { if (this.isOpaque != isOpaque) { this.isOpaque = isOpaque; @@ -5915,7 +9364,7 @@ } @Override -@@ -643,20 +608,7 @@ +@@ -643,20 +639,7 @@ getFont()); if (g != null) { try { @@ -5937,7 +9386,7 @@ } finally { g.dispose(); } -@@ -963,6 +915,35 @@ +@@ -963,6 +946,35 @@ }); } @@ -5973,7 +9422,7 @@ /* * May be called by delegate to provide SD to Java2D code. */ -@@ -973,16 +954,11 @@ +@@ -973,16 +985,11 @@ } private void replaceSurfaceData() { @@ -5992,7 +9441,7 @@ synchronized (surfaceDataLock) { final SurfaceData oldData = getSurfaceData(); surfaceData = platformWindow.replaceSurfaceData(); -@@ -995,10 +971,7 @@ +@@ -995,10 +1002,7 @@ if (getSurfaceData() != null && oldData != getSurfaceData()) { clearBackground(size.width, size.height); } @@ -6004,7 +9453,7 @@ if (oldData != null && oldData != getSurfaceData()) { // TODO: drop oldData for D3D/WGL pipelines -@@ -1013,18 +986,11 @@ +@@ -1013,18 +1017,11 @@ Graphics g = backBuffer.getGraphics(); try { Rectangle r = getBounds(); @@ -6024,7 +9473,7 @@ if (oldBB != null) { // Draw the old back buffer to the new one g.drawImage(oldBB, 0, 0, null); -@@ -1048,7 +1014,7 @@ +@@ -1048,7 +1045,7 @@ CompositeType.Src, dst.getSurfaceType()); if (blit != null) { @@ -6033,8 +9482,33 @@ getRegion(), 0, 0, 0, 0, size.width, size.height); } } +--- jdk/src/macosx/classes/sun/lwawt/PlatformWindow.java 2012-08-10 10:23:12.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/PlatformWindow.java 2013-01-16 08:58:09.000000000 -0800 +@@ -131,7 +131,10 @@ + + public void setResizable(boolean resizable); + +- public void setMinimumSize(int width, int height); ++ /** ++ * Applies the minimum and maximum size to the platform window. ++ */ ++ public void setSizeConstraints(int minW, int minH, int maxW, int maxH); + + /** + * Transforms the given Graphics object according to the native +--- jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java 2012-08-10 10:23:12.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java 2013-01-16 08:58:09.000000000 -0800 +@@ -38,7 +38,7 @@ + private long fNativeDropTransfer = 0; + private long fNativeDataAvailable = 0; + private Object fNativeData = null; +- private boolean insideTarget = false; ++ private boolean insideTarget = true; + + Object awtLockAccess = new Object(); + --- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2012-08-10 10:23:13.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2013-01-16 08:58:09.000000000 -0800 @@ -117,7 +117,7 @@ Rectangle r = peer.getBounds(); Image im = null; @@ -6044,8 +9518,17 @@ im = peer.getGraphicsConfiguration().createCompatibleImage(r.width, r.height, transparency); } return im; +@@ -180,7 +180,7 @@ + public void setResizable(boolean resizable) {} + + @Override +- public void setMinimumSize(int width, int height) {} ++ public void setSizeConstraints(int minW, int minH, int maxW, int maxH) {} + + @Override + public Graphics transformGraphics(Graphics g) { --- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2012-08-10 10:23:13.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2013-01-16 00:07:01.000000000 -0800 @@ -64,7 +64,7 @@ } @@ -6056,7 +9539,7 @@ /* --- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-08-10 10:23:13.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2013-01-16 08:58:09.000000000 -0800 @@ -299,7 +299,7 @@ // If the target is a dialog, popup or tooltip we want it to ignore the brushed metal look. @@ -6075,7 +9558,31 @@ return styleBits; } -@@ -742,19 +740,10 @@ +@@ -672,20 +670,15 @@ + + // Re-apply the size constraints and the size to ensure the space + // occupied by the grow box is counted properly +- setMinimumSize(1, 1); // the method ignores its arguments ++ peer.updateMinimumSize(); + + Rectangle bounds = peer.getBounds(); + setBounds(bounds.x, bounds.y, bounds.width, bounds.height); + } + + @Override +- public void setMinimumSize(int width, int height) { +- //TODO width, height should be used +- //NOTE: setResizable() calls setMinimumSize(1,1) relaying on the logic below +- final long nsWindowPtr = getNSWindowPtr(); +- final Dimension min = target.getMinimumSize(); +- final Dimension max = target.getMaximumSize(); +- nativeSetNSWindowMinMax(nsWindowPtr, min.getWidth(), min.getHeight(), max.getWidth(), max.getHeight()); ++ public void setSizeConstraints(int minW, int minH, int maxW, int maxH) { ++ nativeSetNSWindowMinMax(getNSWindowPtr(), minW, minH, maxW, maxH); + } + + @Override +@@ -742,19 +735,10 @@ @Override public void setOpaque(boolean isOpaque) { CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque); @@ -6096,7 +9603,7 @@ } @Override -@@ -824,10 +813,6 @@ +@@ -824,10 +808,6 @@ } @@ -6108,8 +9615,49 @@ // UTILITY METHODS // ---------------------------------------------------------------------- --- jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-08-10 10:23:14.000000000 -0700 -+++ jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-08-19 12:39:48.000000000 -0700 -@@ -759,11 +759,6 @@ ++++ jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2013-01-16 08:58:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -42,6 +42,7 @@ + import sun.awt.*; + import sun.lwawt.*; + import sun.lwawt.LWWindowPeer.PeerType; ++import sun.security.action.GetBooleanAction; + + + class NamedCursor extends Cursor { +@@ -90,14 +91,6 @@ + } + } + +- static String getSystemProperty(final String name, final String deflt) { +- return AccessController.doPrivileged (new PrivilegedAction<String>() { +- public String run() { +- return System.getProperty(name, deflt); +- } +- }); +- } +- + public LWCToolkit() { + SunToolkit.setDataTransfererClassName("sun.lwawt.macosx.CDataTransferer"); + +@@ -709,8 +702,8 @@ + */ + public synchronized static boolean getSunAwtDisableCALayers() { + if (sunAwtDisableCALayers == null) { +- sunAwtDisableCALayers = +- getBooleanSystemProperty("sun.awt.disableCALayers"); ++ sunAwtDisableCALayers = AccessController.doPrivileged( ++ new GetBooleanAction("sun.awt.disableCALayers")); + } + return sunAwtDisableCALayers.booleanValue(); + } +@@ -759,11 +752,6 @@ } @Override @@ -6121,7 +9669,7 @@ public boolean isWindowTranslucencySupported() { return true; } -@@ -773,10 +768,6 @@ +@@ -773,10 +761,6 @@ return true; } @@ -6132,8 +9680,178 @@ @Override public boolean enableInputMethodsForTextComponent() { return true; +--- jdk/src/macosx/native/sun/awt/AWTEvent.h 2012-08-10 10:23:21.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/AWTEvent.h 2013-01-16 08:58:09.000000000 -0800 +@@ -33,5 +33,7 @@ + void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer); + void SendAdditionalJavaEvents(JNIEnv *env, NSEvent *nsEvent, jobject peer); + jint GetJavaMouseModifiers(NSInteger button, NSUInteger modifierFlags); ++jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods); ++NSUInteger JavaModifiersToNsKeyModifiers(jint javaModifiers, BOOL isExtMods); + + #endif /* __AWTEVENT_H */ +--- jdk/src/macosx/native/sun/awt/AWTEvent.m 2012-08-10 10:23:21.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/AWTEvent.m 2013-01-16 08:58:09.000000000 -0800 +@@ -244,6 +244,7 @@ + //NSUInteger cgsRightMask; + unsigned short leftKeyCode; + unsigned short rightKeyCode; ++ jint javaExtMask; + jint javaMask; + jint javaKey; + } +@@ -254,6 +255,7 @@ + 0, + 0, + 0, // no Java equivalent ++ 0, // no Java equivalent + java_awt_event_KeyEvent_VK_CAPS_LOCK + }, + { +@@ -263,6 +265,7 @@ + 56, + 60, + java_awt_event_InputEvent_SHIFT_DOWN_MASK, ++ java_awt_event_InputEvent_SHIFT_MASK, + java_awt_event_KeyEvent_VK_SHIFT + }, + { +@@ -272,6 +275,7 @@ + 59, + 62, + java_awt_event_InputEvent_CTRL_DOWN_MASK, ++ java_awt_event_InputEvent_CTRL_MASK, + java_awt_event_KeyEvent_VK_CONTROL + }, + { +@@ -281,6 +285,7 @@ + 58, + 61, + java_awt_event_InputEvent_ALT_DOWN_MASK, ++ java_awt_event_InputEvent_ALT_MASK, + java_awt_event_KeyEvent_VK_ALT + }, + { +@@ -290,6 +295,7 @@ + 55, + 54, + java_awt_event_InputEvent_META_DOWN_MASK, ++ java_awt_event_InputEvent_META_MASK, + java_awt_event_KeyEvent_VK_META + }, + // NSNumericPadKeyMask +@@ -298,10 +304,11 @@ + 0, + 0, + 0, // no Java equivalent ++ 0, // no Java equivalent + java_awt_event_KeyEvent_VK_HELP + }, + // NSFunctionKeyMask +- {0, 0, 0, 0, 0} ++ {0, 0, 0, 0, 0, 0} + }; + + /* +@@ -491,15 +498,14 @@ + /* + * This returns the java modifiers for a key NSEvent. + */ +-static jint +-NsKeyModifiersToJavaModifiers(NSUInteger nsFlags) ++jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods) + { + jint javaModifiers = 0; + const struct _nsKeyToJavaModifier* cur; + + for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) { + if ((cur->nsMask & nsFlags) != 0) { +- javaModifiers |= cur->javaMask; ++ javaModifiers |= isExtMods? cur->javaExtMask : cur->javaMask; + } + } + +@@ -507,6 +513,33 @@ + } + + /* ++ * This returns the NSEvent flags for java key modifiers. ++ */ ++NSUInteger JavaModifiersToNsKeyModifiers(jint javaModifiers, BOOL isExtMods) ++{ ++ NSUInteger nsFlags = 0; ++ const struct _nsKeyToJavaModifier* cur; ++ ++ for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) { ++ jint mask = isExtMods? cur->javaExtMask : cur->javaMask; ++ if ((mask & javaModifiers) != 0) { ++ nsFlags |= cur->nsMask; ++ } ++ } ++ ++ // special case ++ jint mask = isExtMods? java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK : ++ java_awt_event_InputEvent_ALT_GRAPH_MASK; ++ ++ if ((mask & javaModifiers) != 0) { ++ nsFlags |= NSAlternateKeyMask; ++ } ++ ++ return nsFlags; ++} ++ ++ ++/* + * Returns the correct java character for a key event. Most unicode + * characters don't require any fussing, but a few seem to need adjusting, + * see nsCharToJavaChar. +@@ -517,7 +550,7 @@ + unichar returnValue = java_awt_event_KeyEvent_CHAR_UNDEFINED; + NSString *chars = nil; + unichar testChar = 0, testDeadChar = 0; +- jint javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags]); ++ jint javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags], TRUE); + + switch ([event type]) { + case NSFlagsChanged: +@@ -657,7 +690,7 @@ + testChar = [chars characterAtIndex:0]; + } + +- javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags]); ++ javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags], TRUE); + if (javaModifiers == 0) { + // TODO: dead key chars + // testDeadChar = GetDeadKeyCharacter(event); +@@ -692,7 +725,7 @@ + jint GetJavaMouseModifiers(NSInteger button, NSUInteger modifierFlags) + { + // Mousing needs the key modifiers +- jint modifiers = NsKeyModifiersToJavaModifiers(modifierFlags); ++ jint modifiers = NsKeyModifiersToJavaModifiers(modifierFlags, TRUE); + + + /* +@@ -788,7 +821,7 @@ + jint javaKeyCode, javaKeyLocation; + BOOL postsTyped = NO; + unichar testChar, testDeadChar = 0; +- jint javaModifiers = NsKeyModifiersToJavaModifiers([nsEvent modifierFlags]); ++ jint javaModifiers = NsKeyModifiersToJavaModifiers([nsEvent modifierFlags], TRUE); + + if (javaModifiers == 0) { + testDeadChar = [nsEvent deadKeyCharacter]; +@@ -984,7 +1017,7 @@ + + JNF_COCOA_ENTER(env); + +- jmodifiers = NsKeyModifiersToJavaModifiers(modifierFlags); ++ jmodifiers = NsKeyModifiersToJavaModifiers(modifierFlags, TRUE); + + JNF_COCOA_EXIT(env); + --- jdk/src/macosx/native/sun/awt/AWTWindow.m 2012-08-10 10:23:21.000000000 -0700 -+++ jdk/src/macosx/native/sun/awt/AWTWindow.m 2012-08-19 12:39:48.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/AWTWindow.m 2013-01-16 00:07:01.000000000 -0800 @@ -1017,17 +1017,14 @@ (JNIEnv *env, jclass clazz, jlong windowPtr) { @@ -6157,8 +9875,581 @@ JNF_COCOA_EXIT(env); } +--- jdk/src/macosx/native/sun/awt/CDragSource.m 2012-08-10 10:23:22.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/CDragSource.m 2013-01-16 08:58:09.000000000 -0800 +@@ -460,7 +460,7 @@ + } + + // Convert fModifiers (extModifiers) to NS: +- NSUInteger modifiers = [DnDUtilities mapJavaExtModifiersToNSKeyModifiers:fModifiers]; ++ NSUInteger modifiers = JavaModifiersToNsKeyModifiers(fModifiers, TRUE); + + // Just a dummy value ... + NSInteger eventNumber = 0; +@@ -658,7 +658,7 @@ + } + + // b) drag actions (key modifiers) have changed: +- jint modifiers = [DnDUtilities currentJavaExtKeyModifiers]; ++ jint modifiers = NsKeyModifiersToJavaModifiers([NSEvent modifierFlags], YES); + if (fDragKeyModifiers != modifiers) { + NSDragOperation currentOp = [DnDUtilities nsDragOperationForModifiers:[NSEvent modifierFlags]]; + NSDragOperation allowedOp = [DnDUtilities mapJavaDragOperationToNS:fSourceActions] & currentOp; +--- jdk/src/macosx/native/sun/awt/CMenuItem.m 2012-08-10 10:23:22.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/CMenuItem.m 2013-01-16 08:58:09.000000000 -0800 +@@ -70,6 +70,18 @@ + JNIEnv *env = [ThreadUtilities getJNIEnv]; + JNF_COCOA_ENTER(env); + ++ // If we are called as a result of user pressing a shorcut, do nothing, ++ // because AWTView has already sent corresponding key event to the Java ++ // layer from performKeyEquivalent ++ NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent]; ++ if ([currEvent type] == NSKeyDown) { ++ NSString *menuKey = [sender keyEquivalent]; ++ NSString *eventKey = [currEvent charactersIgnoringModifiers]; ++ if ([menuKey isEqualToString:eventKey]) { ++ return; ++ } ++ } ++ + if (fIsCheckbox) { + static JNF_CLASS_CACHE(jc_CCheckboxMenuItem, "sun/lwawt/macosx/CCheckboxMenuItem"); + static JNF_MEMBER_CACHE(jm_ckHandleAction, jc_CCheckboxMenuItem, "handleAction", "(Z)V"); +@@ -83,14 +95,8 @@ + static JNF_CLASS_CACHE(jc_CMenuItem, "sun/lwawt/macosx/CMenuItem"); + static JNF_MEMBER_CACHE(jm_handleAction, jc_CMenuItem, "handleAction", "(JI)V"); // AWT_THREADING Safe (event) + +- NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent]; + NSUInteger modifiers = [currEvent modifierFlags]; +- jint javaModifiers = 0; +- +- if ((modifiers & NSCommandKeyMask) != 0) javaModifiers |= java_awt_Event_META_MASK; +- if ((modifiers & NSShiftKeyMask) != 0) javaModifiers |= java_awt_Event_SHIFT_MASK; +- if ((modifiers & NSControlKeyMask) != 0) javaModifiers |= java_awt_Event_CTRL_MASK; +- if ((modifiers & NSAlternateKeyMask) != 0) javaModifiers |= java_awt_Event_ALT_MASK; ++ jint javaModifiers = NsKeyModifiersToJavaModifiers(modifiers, NO); + + JNFCallVoidMethod(env, fPeer, jm_handleAction, UTC(currEvent), javaModifiers); // AWT_THREADING Safe (event) + } +@@ -117,10 +123,7 @@ + modifiers &= ~java_awt_event_KeyEvent_SHIFT_MASK; + } + +- if ((modifiers & java_awt_event_KeyEvent_SHIFT_MASK) != 0) modifierMask |= NSShiftKeyMask; +- if ((modifiers & java_awt_event_KeyEvent_CTRL_MASK) != 0) modifierMask |= NSControlKeyMask; +- if ((modifiers & java_awt_event_KeyEvent_ALT_MASK) != 0) modifierMask |= NSAlternateKeyMask; +- if ((modifiers & java_awt_event_KeyEvent_META_MASK) != 0) modifierMask |= NSCommandKeyMask; ++ modifierMask = JavaModifiersToNsKeyModifiers(modifiers, NO); + } + + [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ +--- jdk/src/macosx/native/sun/awt/DnDUtilities.h 2012-08-10 10:23:22.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/DnDUtilities.h 2013-01-16 08:58:10.000000000 -0800 +@@ -42,7 +42,6 @@ + + (jint)narrowJavaDropActions:(jint)actions; + + // Mouse and key modifiers mapping: +-+ (NSUInteger)mapJavaExtModifiersToNSKeyModifiers:(jint)modifiers; + + (NSUInteger)mapJavaExtModifiersToNSMouseDownButtons:(jint)modifiers; + + (NSUInteger)mapJavaExtModifiersToNSMouseUpButtons:(jint)modifiers; + +@@ -50,9 +49,6 @@ + + (jint)extractJavaExtKeyModifiersFromJavaExtModifiers:(jint)modifiers; + + (jint)extractJavaExtMouseModifiersFromJavaExtModifiers:(jint)modifiers; + +-// Get the current keyboard modifier keys as java modifiers (for operationChanged) +-+ (jint)currentJavaExtKeyModifiers; +- + // Getting the state of the current Drag + + (NSDragOperation)nsDragOperationForModifiers:(NSUInteger)modifiers; + + (jint) javaKeyModifiersForNSDragOperation:(NSDragOperation)dragOp; +--- jdk/src/macosx/native/sun/awt/DnDUtilities.m 2012-08-10 10:23:22.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/DnDUtilities.m 2013-01-16 08:58:10.000000000 -0800 +@@ -161,28 +161,6 @@ + } + + // Mouse and key modifiers mapping: +-+ (NSUInteger)mapJavaExtModifiersToNSKeyModifiers:(jint)modifiers +-{ +- NSUInteger result = 0; +- +- if ((modifiers & java_awt_event_InputEvent_SHIFT_DOWN_MASK) != 0) +- result |= NSShiftKeyMask; +- +- if ((modifiers & java_awt_event_InputEvent_CTRL_DOWN_MASK) != 0) +- result |= NSControlKeyMask; +- +- if ((modifiers & java_awt_event_InputEvent_META_DOWN_MASK) != 0) +- result |= NSCommandKeyMask; +- +- if ((modifiers & java_awt_event_InputEvent_ALT_DOWN_MASK) != 0) +- result |= NSAlternateKeyMask; +- +- if ((modifiers & java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK) != 0) +- result |= NSAlternateKeyMask; +- +- return result; +-} +- + + (NSUInteger)mapJavaExtModifiersToNSMouseDownButtons:(jint)modifiers + { + NSUInteger result = NSLeftMouseDown; +@@ -245,32 +223,6 @@ + return modifiers & mask; + } + +- +-+ (jint)currentJavaExtKeyModifiers +-{ +- NSUInteger modifiers = [NSEvent modifierFlags]; +- jint jmodifiers = 0; +- +- if(modifiers & NSShiftKeyMask) { +- jmodifiers |= java_awt_event_InputEvent_SHIFT_DOWN_MASK; +- } +- +- if(modifiers & NSControlKeyMask) { +- jmodifiers |= java_awt_event_InputEvent_CTRL_DOWN_MASK; +- } +- +- if(modifiers & NSAlternateKeyMask) { +- jmodifiers |= java_awt_event_InputEvent_ALT_DOWN_MASK; +- } +- +- if(modifiers & NSCommandKeyMask) { +- jmodifiers |= java_awt_event_InputEvent_META_DOWN_MASK; +- } +- +- return jmodifiers; +-} +- +- + + (NSDragOperation) nsDragOperationForModifiers:(NSUInteger)modifiers { + + // Java first +--- jdk/src/macosx/native/sun/awt/ImageSurfaceData.h 2012-08-10 10:23:22.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/ImageSurfaceData.h 2013-01-16 08:58:10.000000000 -0800 +@@ -41,7 +41,7 @@ + // If there is an image present, this is a no-op + void makeSureImageIsCreated(ImageSDOps* isdo); + +-struct _ContextInfo ++typedef struct _ContextInfo + { + BOOL useWindowContextReference; + BOOL canUseJavaPixelsAsContext; +@@ -50,10 +50,9 @@ + size_t bytesPerRow; + CGImageAlphaInfo alphaInfo; + CGColorSpaceRef colorSpace; +-} +-typedef ContextInfo; ++} ContextInfo; + +-struct _ImageInfo ++typedef struct _ImageInfo + { + size_t bitsPerComponent; + size_t bitsPerPixel; +@@ -61,8 +60,7 @@ + size_t bytesPerRow; + CGImageAlphaInfo alphaInfo; + CGColorSpaceRef colorSpace; +-} +-typedef ImageInfo; ++} ImageInfo; + + struct _ImageSDOps + { +--- jdk/src/macosx/native/sun/awt/ImageSurfaceData.m 2012-08-10 10:23:22.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/ImageSurfaceData.m 2013-01-16 08:58:10.000000000 -0800 +@@ -53,10 +53,6 @@ + // for vImage framework headers + #include <Accelerate/Accelerate.h> + +- +-// private Quartz routines needed here +-CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx); +- + static ContextInfo sDefaultContextInfo[sun_java2d_OSXOffScreenSurfaceData_TYPE_3BYTE_RGB+1] = + { + {YES, YES, 8, 4, 0, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, NULL}, // TYPE_CUSTOM // special case +@@ -942,7 +938,6 @@ + // intitalize the context to match the Java coordinate system + + // BG, since the context is created above, we can just concat +- //CGContextSetCTM(qsdo->cgRef, CGAffineTransformMake(1, 0, 0, -1, 0, isdo->height)); + CGContextConcatCTM(qsdo->cgRef, CGAffineTransformMake(1, 0, 0, -1, 0, isdo->height)); + + CGContextSaveGState(qsdo->cgRef); // this will make sure we don't go pass device context settings +@@ -1114,7 +1109,9 @@ + if (qsdo->cgRef != NULL) + { + CGContextSaveGState(qsdo->cgRef); +- CGContextSetCTM(qsdo->cgRef, CGAffineTransformMake(1, 0, 0, 1, 0, 0)); ++ CGAffineTransform currCTM = CGContextGetCTM(qsdo->cgRef); ++ CGAffineTransform inverse = CGAffineTransformInvert(currCTM); ++ CGContextConcatCTM(qsdo->cgRef, inverse); + CGContextSetBlendMode(qsdo->cgRef, kCGBlendModeCopy); + CGContextSetAlpha(qsdo->cgRef, 1.0f); + CGContextDrawImage(qsdo->cgRef, CGRectMake(0, 0, width, height), javaImg); +--- jdk/src/macosx/native/sun/awt/QuartzRenderer.m 2012-08-10 10:23:24.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/QuartzRenderer.m 2013-01-16 08:58:10.000000000 -0800 +@@ -50,9 +50,6 @@ + // same value as defined in Sun's own code + #define XOR_ALPHA_CUTOFF 128 + +-// private Quartz routines needed here +-CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx); +- + + static CGFloat gRoundRectCtrlpts[10][12] = + { +@@ -536,7 +533,7 @@ + + makeSureImageIsCreated(isdo); + +- CGAffineTransform ctm = CGContextGetCTM(cgRef); ++ CGContextSaveGState(cgRef); + CGContextConcatCTM(cgRef, CGAffineTransformMake(a, b, c, d, tx, ty)); + jint alphaInfo = isdo->contextInfo.alphaInfo & kCGBitmapAlphaInfoMask; + +@@ -551,7 +548,7 @@ + CGImageRelease(subImg); + } + +- CGContextSetCTM(cgRef, ctm); ++ CGContextRestoreGState(cgRef); + UnlockImage(env, isdo); + } + +--- jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m 2012-08-10 10:23:24.000000000 -0700 ++++ jdk/src/macosx/native/sun/awt/QuartzSurfaceData.m 2013-01-16 08:58:10.000000000 -0800 +@@ -40,9 +40,6 @@ + #import <AppKit/AppKit.h> + #import "ThreadUtilities.h" + +-// private Quartz routines needed here +-CG_EXTERN void CGContextSetCTM(CGContextRef ref, CGAffineTransform tx); +- + //#define DEBUG + #if defined DEBUG + #define PRINT(msg) {fprintf(stderr, "%s\n", msg);} +@@ -50,9 +47,6 @@ + #define PRINT(msg) {} + #endif + +-// from CGAffineTransformPrivate.h +-extern CGPoint CGPointApplyInverseAffineTransform(CGPoint point, CGAffineTransform t); +- + #define kOffset (0.5f) + + BOOL gAdjustForJavaDrawing; +@@ -608,7 +602,8 @@ + // We need to flip both y coefficeints to flip the offset point into the java coordinate system. + ctm.b = -ctm.b; ctm.d = -ctm.d; ctm.tx = 0.0f; ctm.ty = 0.0f; + CGPoint offsets = {kOffset, kOffset}; +- offsets = CGPointApplyInverseAffineTransform(offsets, ctm); ++ CGAffineTransform inverse = CGAffineTransformInvert(ctm); ++ offsets = CGPointApplyAffineTransform(offsets, inverse); + qsdo->graphicsStateInfo.offsetX = offsets.x; + qsdo->graphicsStateInfo.offsetY = offsets.y; + } +--- jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m 2012-08-10 10:23:24.000000000 -0700 ++++ jdk/src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m 2013-01-16 08:58:10.000000000 -0800 +@@ -445,3 +445,20 @@ + return cglinfo->context->caps; + } + } ++ ++JNIEXPORT jint JNICALL ++Java_sun_java2d_opengl_CGLGraphicsConfig__1getMaxTextureSize ++ (JNIEnv *env, jclass cglgc) ++{ ++ J2dTraceLn(J2D_TRACE_INFO, "CGLGraphicsConfig__1getMaxTextureSize"); ++ ++ __block int max = 0; ++ ++ [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ ++ [sharedContext makeCurrentContext]; ++ j2d_glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max); ++ }]; ++ ++ return (jint)max; ++} ++ +--- jdk/src/share/bin/java.c 2012-08-10 10:23:29.000000000 -0700 ++++ jdk/src/share/bin/java.c 2013-01-16 08:58:15.000000000 -0800 +@@ -104,7 +104,6 @@ + static jboolean InitializeJVM(JavaVM **pvm, JNIEnv **penv, + InvocationFunctions *ifn); + static jstring NewPlatformString(JNIEnv *env, char *s); +-static jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc); + static jclass LoadMainClass(JNIEnv *env, int mode, char *name); + + static void TranslateApplicationArgs(int jargc, const char **jargv, int *pargc, char ***pargv); +@@ -160,7 +159,7 @@ + * Running Java code in primordial thread caused many problems. We will + * create a new thread to invoke JVM. See 6316197 for more information. + */ +-static jlong threadStackSize = 0; /* stack size of the new thread */ ++static jlong threadStackSize = 0; /* stack size of the new thread */ + static jlong maxHeapSize = 0; /* max heap size */ + static jlong initialHeapSize = 0; /* inital heap size */ + +@@ -202,6 +201,14 @@ + + InitLauncher(javaw); + DumpState(); ++ if (JLI_IsTraceLauncher()) { ++ int i; ++ printf("Command line args:\n"); ++ for (i = 0; i < argc ; i++) { ++ printf("argv[%d] = %s\n", i, argv[i]); ++ } ++ AddOption("-Dsun.java.launcher.diag=true", NULL); ++ } + + /* + * Make sure the specified version of the JRE is running. +@@ -222,15 +229,6 @@ + */ + SelectVersion(argc, argv, &main_class); + +- if (JLI_IsTraceLauncher()) { +- int i; +- printf("Command line args:\n"); +- for (i = 0; i < argc ; i++) { +- printf("argv[%d] = %s\n", i, argv[i]); +- } +- AddOption("-Dsun.java.launcher.diag=true", NULL); +- } +- + CreateExecutionEnvironment(&argc, &argv, + jrepath, sizeof(jrepath), + jvmpath, sizeof(jvmpath), +@@ -435,8 +433,8 @@ + "([Ljava/lang/String;)V"); + CHECK_EXCEPTION_NULL_LEAVE(mainID); + +- /* Build argument array */ +- mainArgs = NewPlatformStringArray(env, argv, argc); ++ /* Build platform specific argument array */ ++ mainArgs = CreateApplicationArgs(env, argv, argc); + CHECK_EXCEPTION_NULL_LEAVE(mainArgs); + + /* Invoke main method. */ +@@ -1113,8 +1111,9 @@ + + static jclass helperClass = NULL; + +-static jclass +-GetLauncherHelperClass(JNIEnv *env) { ++jclass ++GetLauncherHelperClass(JNIEnv *env) ++{ + if (helperClass == NULL) { + NULL_CHECK0(helperClass = FindBootStrapClass(env, + "sun/launcher/LauncherHelper")); +@@ -1158,7 +1157,7 @@ + * Returns a new array of Java string objects for the specified + * array of platform strings. + */ +-static jobjectArray ++jobjectArray + NewPlatformStringArray(JNIEnv *env, char **strv, int strc) + { + jarray cls; +@@ -1203,7 +1202,7 @@ + end = CounterGet(); + printf("%ld micro seconds to load main class\n", + (long)(jint)Counter2Micros(end-start)); +- printf("----_JAVA_LAUNCHER_DEBUG----\n"); ++ printf("----%s----\n", JLDEBUG_ENV_ENTRY); + } + + return (jclass)result; +--- jdk/src/share/bin/java.h 2012-08-10 10:23:29.000000000 -0700 ++++ jdk/src/share/bin/java.h 2013-01-16 08:58:10.000000000 -0800 +@@ -219,6 +219,10 @@ + const char *name)); + jclass FindBootStrapClass(JNIEnv *env, const char *classname); + ++jobjectArray CreateApplicationArgs(JNIEnv *env, char **strv, int argc); ++jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc); ++jclass GetLauncherHelperClass(JNIEnv *env); ++ + int JNICALL JavaMain(void * args); /* entry point */ + + enum LaunchMode { // cf. sun.launcher.LauncherHelper +--- jdk/src/share/bin/jli_util.c 2012-08-10 10:23:29.000000000 -0700 ++++ jdk/src/share/bin/jli_util.c 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2012, 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 +@@ -102,9 +102,9 @@ + void + JLI_SetTraceLauncher() + { +- if (getenv("_JAVA_LAUNCHER_DEBUG") != 0) { ++ if (getenv(JLDEBUG_ENV_ENTRY) != 0) { + _launcher_debug = JNI_TRUE; +- JLI_TraceLauncher("----_JAVA_LAUNCHER_DEBUG----\n"); ++ JLI_TraceLauncher("----%s----\n", JLDEBUG_ENV_ENTRY); + } + } + +--- jdk/src/share/bin/jli_util.h 2012-08-10 10:23:29.000000000 -0700 ++++ jdk/src/share/bin/jli_util.h 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,7 +27,10 @@ + #define _JLI_UTIL_H + + #include <stdlib.h> ++#include <string.h> ++#include <stdio.h> + #include <jni.h> ++#define JLDEBUG_ENV_ENTRY "_JAVA_LAUNCHER_DEBUG" + + void *JLI_MemAlloc(size_t size); + void *JLI_MemRealloc(void *ptr, size_t size); +@@ -35,6 +38,14 @@ + void JLI_MemFree(void *ptr); + int JLI_StrCCmp(const char *s1, const char* s2); + ++typedef struct { ++ char *arg; ++ jboolean has_wildcard; ++} StdArg; ++ ++StdArg *JLI_GetStdArgs(); ++int JLI_GetStdArgc(); ++ + #define JLI_StrLen(p1) strlen((p1)) + #define JLI_StrChr(p1, p2) strchr((p1), (p2)) + #define JLI_StrRChr(p1, p2) strrchr((p1), (p2)) +@@ -56,8 +67,10 @@ + #define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2)) + #define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3)) + #define JLI_Snprintf _snprintf ++void JLI_CmdToArgs(char *cmdline); + #else + #include <unistd.h> ++#include <strings.h> + #define JLI_StrCaseCmp(p1, p2) strcasecmp((p1), (p2)) + #define JLI_StrNCaseCmp(p1, p2, p3) strncasecmp((p1), (p2), (p3)) + #define JLI_Snprintf snprintf +--- jdk/src/share/bin/main.c 2012-08-10 10:23:29.000000000 -0700 ++++ jdk/src/share/bin/main.c 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2012, 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 +@@ -87,22 +87,41 @@ + const jboolean const_javaw = JNI_TRUE; + + __initenv = _environ; +- margc = __argc; +- margv = __argv; +- + + #else /* JAVAW */ + int +-main(int argc, char ** argv) ++main(int argc, char **argv) + { + int margc; + char** margv; + const jboolean const_javaw = JNI_FALSE; +- ++#endif /* JAVAW */ ++#ifdef _WIN32 ++ { ++ int i = 0; ++ if (getenv(JLDEBUG_ENV_ENTRY) != NULL) { ++ printf("Windows original main args:\n"); ++ for (i = 0 ; i < __argc ; i++) { ++ printf("wwwd_args[%d] = %s\n", i, __argv[i]); ++ } ++ } ++ } ++ JLI_CmdToArgs(GetCommandLine()); ++ margc = JLI_GetStdArgc(); ++ // add one more to mark the end ++ margv = (char **)JLI_MemAlloc((margc + 1) * (sizeof(char *))); ++ { ++ int i = 0; ++ StdArg *stdargs = JLI_GetStdArgs(); ++ for (i = 0 ; i < margc ; i++) { ++ margv[i] = stdargs[i].arg; ++ } ++ margv[i] = NULL; ++ } ++#else /* *NIXES */ + margc = argc; + margv = argv; +-#endif /* JAVAW */ +- ++#endif /* WIN32 */ + return JLI_Launch(margc, margv, + sizeof(const_jargs) / sizeof(char *), const_jargs, + sizeof(const_appclasspath) / sizeof(char *), const_appclasspath, +--- jdk/src/share/bin/wildcard.c 2012-08-10 10:23:30.000000000 -0700 ++++ jdk/src/share/bin/wildcard.c 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2012, 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 +@@ -129,11 +129,11 @@ + HANDLE handle; + char *firstFile; /* Stupid FindFirstFile...FindNextFile */ + }; +- ++// since this is used repeatedly we keep it here. ++static WIN32_FIND_DATA find_data; + static WildcardIterator + WildcardIterator_for(const char *wildcard) + { +- WIN32_FIND_DATA find_data; + WildcardIterator it = NEW_(WildcardIterator); + HANDLE handle = FindFirstFile(wildcard, &find_data); + if (handle == INVALID_HANDLE_VALUE) +@@ -146,7 +146,6 @@ + static char * + WildcardIterator_next(WildcardIterator it) + { +- WIN32_FIND_DATA find_data; + if (it->firstFile != NULL) { + char *firstFile = it->firstFile; + it->firstFile = NULL; +@@ -412,7 +411,7 @@ + FileList_expandWildcards(fl); + expanded = FileList_join(fl, PATH_SEPARATOR); + FileList_free(fl); +- if (getenv("_JAVA_LAUNCHER_DEBUG") != 0) ++ if (getenv(JLDEBUG_ENV_ENTRY) != 0) + printf("Expanded wildcards:\n" + " before: \"%s\"\n" + " after : \"%s\"\n", --- jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-10 10:23:31.000000000 -0700 -+++ jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-19 12:39:49.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/TypeResolver.java 2013-01-16 00:07:02.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. @@ -6396,9 +10687,1403 @@ * Replaces a {@link GenericArrayType GenericArrayType} * with plain array class where it is possible. * Bug <a href="http://bugs.sun.com/view_bug.do?bug_id=5041784">5041784</a> +--- jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2012-08-10 10:23:31.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -37,6 +37,9 @@ + import java.util.HashMap; + import java.util.List; + import java.util.Map; ++import java.security.AccessControlContext; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + + import javax.xml.parsers.ParserConfigurationException; + import javax.xml.parsers.SAXParserFactory; +@@ -46,6 +49,8 @@ + import org.xml.sax.SAXException; + import org.xml.sax.helpers.DefaultHandler; + ++import sun.misc.SharedSecrets; ++ + /** + * The main class to parse JavaBeans XML archive. + * +@@ -56,11 +61,10 @@ + * @see ElementHandler + */ + public final class DocumentHandler extends DefaultHandler { +- private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<String, Class<? extends ElementHandler>>(); +- +- private final Map<String, Object> environment = new HashMap<String, Object>(); +- +- private final List<Object> objects = new ArrayList<Object>(); ++ private final AccessControlContext acc = AccessController.getContext(); ++ private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<>(); ++ private final Map<String, Object> environment = new HashMap<>(); ++ private final List<Object> objects = new ArrayList<>(); + + private Reference<ClassLoader> loader; + private ExceptionListener listener; +@@ -351,23 +355,32 @@ + * + * @param input the input source to parse + */ +- public void parse(InputSource input) { +- try { +- SAXParserFactory.newInstance().newSAXParser().parse(input, this); +- } +- catch (ParserConfigurationException exception) { +- handleException(exception); +- } +- catch (SAXException wrapper) { +- Exception exception = wrapper.getException(); +- if (exception == null) { +- exception = wrapper; ++ public void parse(final InputSource input) { ++ if ((this.acc == null) && (null != System.getSecurityManager())) { ++ throw new SecurityException("AccessControlContext is not set"); ++ } ++ AccessControlContext stack = AccessController.getContext(); ++ SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction<Void>() { ++ public Void run() { ++ try { ++ SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this); ++ } ++ catch (ParserConfigurationException exception) { ++ handleException(exception); ++ } ++ catch (SAXException wrapper) { ++ Exception exception = wrapper.getException(); ++ if (exception == null) { ++ exception = wrapper; ++ } ++ handleException(exception); ++ } ++ catch (IOException exception) { ++ handleException(exception); ++ } ++ return null; + } +- handleException(exception); +- } +- catch (IOException exception) { +- handleException(exception); +- } ++ }, stack, this.acc); + } + + /** +--- jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java 2012-08-10 10:23:32.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -28,6 +28,8 @@ + + import java.lang.reflect.Method; + ++import sun.reflect.misc.MethodUtil; ++ + /** + * This class is intended to handle <method> element. + * It describes invocation of the method. +@@ -101,7 +103,7 @@ + if (method.isVarArgs()) { + args = getArguments(args, method.getParameterTypes()); + } +- Object value = method.invoke(bean, args); ++ Object value = MethodUtil.invoke(method, bean, args); + return method.getReturnType().equals(void.class) + ? ValueObjectImpl.VOID + : ValueObjectImpl.create(value); +--- jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java 2012-08-10 10:23:32.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, 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 +@@ -35,6 +35,8 @@ + import java.lang.reflect.InvocationTargetException; + import java.lang.reflect.Method; + ++import sun.reflect.misc.MethodUtil; ++ + /** + * This class is intended to handle <property> element. + * This element simplifies access to the properties. +@@ -168,11 +170,11 @@ + private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { + Class<?> type = bean.getClass(); + if (index == null) { +- return findGetter(type, name).invoke(bean); ++ return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {}); + } else if (type.isArray() && (name == null)) { + return Array.get(bean, index); + } else { +- return findGetter(type, name, int.class).invoke(bean, index); ++ return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index}); + } + } + +@@ -197,11 +199,11 @@ + : null; + + if (index == null) { +- findSetter(type, name, param).invoke(bean, value); ++ MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value}); + } else if (type.isArray() && (name == null)) { + Array.set(bean, index, value); + } else { +- findSetter(type, name, int.class, param).invoke(bean, index, value); ++ MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value}); + } + } + +--- jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/BooleanEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,76 @@ ++/* ++ * Copyright (c) 2006, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "boolean" type. ++ */ ++ ++import java.beans.*; ++ ++public class BooleanEditor extends PropertyEditorSupport { ++ ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ return (value != null) ++ ? value.toString() ++ : "null"; ++ } ++ ++ public String getAsText() { ++ Object value = getValue(); ++ return (value instanceof Boolean) ++ ? getValidName((Boolean) value) ++ : null; ++ } ++ ++ public void setAsText(String text) throws java.lang.IllegalArgumentException { ++ if (text == null) { ++ setValue(null); ++ } else if (isValidName(true, text)) { ++ setValue(Boolean.TRUE); ++ } else if (isValidName(false, text)) { ++ setValue(Boolean.FALSE); ++ } else { ++ throw new java.lang.IllegalArgumentException(text); ++ } ++ } ++ ++ public String[] getTags() { ++ return new String[] {getValidName(true), getValidName(false)}; ++ } ++ ++ // the following method should be localized (4890258) ++ ++ private String getValidName(boolean value) { ++ return value ? "True" : "False"; ++ } ++ ++ private boolean isValidName(boolean value, String name) { ++ return getValidName(value).equalsIgnoreCase(name); ++ } ++} +--- jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/ByteEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "byte" type. ++ * ++ */ ++ ++import java.beans.*; ++ ++public class ByteEditor extends NumberEditor { ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ return (value != null) ++ ? "((byte)" + value + ")" ++ : "null"; ++ } ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Byte.decode(text)); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/ColorEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,214 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++import java.awt.*; ++import java.beans.*; ++ ++public class ColorEditor extends Panel implements PropertyEditor { ++ private static final long serialVersionUID = 1781257185164716054L; ++ ++ public ColorEditor() { ++ setLayout(null); ++ ++ ourWidth = hPad; ++ ++ // Create a sample color block bordered in black ++ Panel p = new Panel(); ++ p.setLayout(null); ++ p.setBackground(Color.black); ++ sample = new Canvas(); ++ p.add(sample); ++ sample.reshape(2, 2, sampleWidth, sampleHeight); ++ add(p); ++ p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4); ++ ourWidth += sampleWidth + 4 + hPad; ++ ++ text = new TextField("", 14); ++ add(text); ++ text.reshape(ourWidth,0,100,30); ++ ourWidth += 100 + hPad; ++ ++ choser = new Choice(); ++ int active = 0; ++ for (int i = 0; i < colorNames.length; i++) { ++ choser.addItem(colorNames[i]); ++ } ++ add(choser); ++ choser.reshape(ourWidth,0,100,30); ++ ourWidth += 100 + hPad; ++ ++ resize(ourWidth,40); ++ } ++ ++ public void setValue(Object o) { ++ Color c = (Color)o; ++ changeColor(c); ++ } ++ ++ public Dimension preferredSize() { ++ return new Dimension(ourWidth, 40); ++ } ++ ++ public boolean keyUp(Event e, int key) { ++ if (e.target == text) { ++ try { ++ setAsText(text.getText()); ++ } catch (IllegalArgumentException ex) { ++ // Quietly ignore. ++ } ++ } ++ return (false); ++ } ++ ++ public void setAsText(String s) throws java.lang.IllegalArgumentException { ++ if (s == null) { ++ changeColor(null); ++ return; ++ } ++ int c1 = s.indexOf(','); ++ int c2 = s.indexOf(',', c1+1); ++ if (c1 < 0 || c2 < 0) { ++ // Invalid string. ++ throw new IllegalArgumentException(s); ++ } ++ try { ++ int r = Integer.parseInt(s.substring(0,c1)); ++ int g = Integer.parseInt(s.substring(c1+1, c2)); ++ int b = Integer.parseInt(s.substring(c2+1)); ++ Color c = new Color(r,g,b); ++ changeColor(c); ++ } catch (Exception ex) { ++ throw new IllegalArgumentException(s); ++ } ++ ++ } ++ ++ public boolean action(Event e, Object arg) { ++ if (e.target == choser) { ++ changeColor(colors[choser.getSelectedIndex()]); ++ } ++ return false; ++ } ++ ++ public String getJavaInitializationString() { ++ return (this.color != null) ++ ? "new java.awt.Color(" + this.color.getRGB() + ",true)" ++ : "null"; ++ } ++ ++ ++ private void changeColor(Color c) { ++ ++ if (c == null) { ++ this.color = null; ++ this.text.setText(""); ++ return; ++ } ++ ++ color = c; ++ ++ text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue()); ++ ++ int active = 0; ++ for (int i = 0; i < colorNames.length; i++) { ++ if (color.equals(colors[i])) { ++ active = i; ++ } ++ } ++ choser.select(active); ++ ++ sample.setBackground(color); ++ sample.repaint(); ++ ++ support.firePropertyChange("", null, null); ++ } ++ ++ public Object getValue() { ++ return color; ++ } ++ ++ public boolean isPaintable() { ++ return true; ++ } ++ ++ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { ++ Color oldColor = gfx.getColor(); ++ gfx.setColor(Color.black); ++ gfx.drawRect(box.x, box.y, box.width-3, box.height-3); ++ gfx.setColor(color); ++ gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4); ++ gfx.setColor(oldColor); ++ } ++ ++ public String getAsText() { ++ return (this.color != null) ++ ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue() ++ : null; ++ } ++ ++ public String[] getTags() { ++ return null; ++ } ++ ++ public java.awt.Component getCustomEditor() { ++ return this; ++ } ++ ++ public boolean supportsCustomEditor() { ++ return true; ++ } ++ ++ public void addPropertyChangeListener(PropertyChangeListener l) { ++ support.addPropertyChangeListener(l); ++ } ++ ++ public void removePropertyChangeListener(PropertyChangeListener l) { ++ support.removePropertyChangeListener(l); ++ } ++ ++ ++ private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray", ++ "black", "red", "pink", "orange", ++ "yellow", "green", "magenta", "cyan", ++ "blue"}; ++ private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray, ++ Color.black, Color.red, Color.pink, Color.orange, ++ Color.yellow, Color.green, Color.magenta, Color.cyan, ++ Color.blue}; ++ ++ private Canvas sample; ++ private int sampleHeight = 20; ++ private int sampleWidth = 40; ++ private int hPad = 5; ++ private int ourWidth; ++ ++ private Color color; ++ private TextField text; ++ private Choice choser; ++ ++ private PropertyChangeSupport support = new PropertyChangeSupport(this); ++} +--- jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/DoubleEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "double" type. ++ * ++ */ ++ ++import java.beans.*; ++ ++public class DoubleEditor extends NumberEditor { ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Double.valueOf(text)); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,143 @@ ++/* ++ * Copyright (c) 2006, 2012, 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 com.sun.beans.editors; ++ ++import java.awt.Component; ++import java.awt.Graphics; ++import java.awt.Rectangle; ++import java.beans.PropertyChangeEvent; ++import java.beans.PropertyChangeListener; ++import java.beans.PropertyEditor; ++import java.util.ArrayList; ++import java.util.List; ++ ++/** ++ * Property editor for java.lang.Enum subclasses. ++ * ++ * @see PropertyEditor ++ * ++ * @since 1.7 ++ * ++ * @author Sergey A. Malenkov ++ */ ++public class EnumEditor implements PropertyEditor { ++ private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); ++ ++ private final Class type; ++ private final String[] tags; ++ ++ private Object value; ++ ++ public EnumEditor( Class type ) { ++ Object[] values = type.getEnumConstants(); ++ if ( values == null ) { ++ throw new IllegalArgumentException( "Unsupported " + type ); ++ } ++ this.type = type; ++ this.tags = new String[values.length]; ++ for ( int i = 0; i < values.length; i++ ) { ++ this.tags[i] = ( ( Enum )values[i] ).name(); ++ } ++ } ++ ++ public Object getValue() { ++ return this.value; ++ } ++ ++ public void setValue( Object value ) { ++ if ( ( value != null ) && !this.type.isInstance( value ) ) { ++ throw new IllegalArgumentException( "Unsupported value: " + value ); ++ } ++ Object oldValue; ++ PropertyChangeListener[] listeners; ++ synchronized ( this.listeners ) { ++ oldValue = this.value; ++ this.value = value; ++ ++ if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) { ++ return; // do not fire event if value is not changed ++ } ++ int size = this.listeners.size(); ++ if ( size == 0 ) { ++ return; // do not fire event if there are no any listener ++ } ++ listeners = this.listeners.toArray( new PropertyChangeListener[size] ); ++ } ++ PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value ); ++ for ( PropertyChangeListener listener : listeners ) { ++ listener.propertyChange( event ); ++ } ++ } ++ ++ public String getAsText() { ++ return ( this.value != null ) ++ ? ( ( Enum )this.value ).name() ++ : null; ++ } ++ ++ public void setAsText( String text ) { ++ setValue( ( text != null ) ++ ? Enum.valueOf( this.type, text ) ++ : null ); ++ } ++ ++ public String[] getTags() { ++ return this.tags.clone(); ++ } ++ ++ public String getJavaInitializationString() { ++ String name = getAsText(); ++ return ( name != null ) ++ ? this.type.getName() + '.' + name ++ : "null"; ++ } ++ ++ public boolean isPaintable() { ++ return false; ++ } ++ ++ public void paintValue( Graphics gfx, Rectangle box ) { ++ } ++ ++ public boolean supportsCustomEditor() { ++ return false; ++ } ++ ++ public Component getCustomEditor() { ++ return null; ++ } ++ ++ public void addPropertyChangeListener( PropertyChangeListener listener ) { ++ synchronized ( this.listeners ) { ++ this.listeners.add( listener ); ++ } ++ } ++ ++ public void removePropertyChangeListener( PropertyChangeListener listener ) { ++ synchronized ( this.listeners ) { ++ this.listeners.remove( listener ); ++ } ++ } ++} +--- jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/FloatEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "float" type. ++ * ++ */ ++ ++import java.beans.*; ++ ++public class FloatEditor extends NumberEditor { ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ return (value != null) ++ ? value + "F" ++ : "null"; ++ } ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Float.valueOf(text)); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/FontEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/FontEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,219 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++import java.awt.*; ++import java.beans.*; ++ ++public class FontEditor extends Panel implements java.beans.PropertyEditor { ++ private static final long serialVersionUID = 6732704486002715933L; ++ ++ public FontEditor() { ++ setLayout(null); ++ ++ toolkit = Toolkit.getDefaultToolkit(); ++ fonts = toolkit.getFontList(); ++ ++ familyChoser = new Choice(); ++ for (int i = 0; i < fonts.length; i++) { ++ familyChoser.addItem(fonts[i]); ++ } ++ add(familyChoser); ++ familyChoser.reshape(20, 5, 100, 30); ++ ++ styleChoser = new Choice(); ++ for (int i = 0; i < styleNames.length; i++) { ++ styleChoser.addItem(styleNames[i]); ++ } ++ add(styleChoser); ++ styleChoser.reshape(145, 5, 70, 30); ++ ++ sizeChoser = new Choice(); ++ for (int i = 0; i < pointSizes.length; i++) { ++ sizeChoser.addItem("" + pointSizes[i]); ++ } ++ add(sizeChoser); ++ sizeChoser.reshape(220, 5, 70, 30); ++ ++ resize(300,40); ++ } ++ ++ ++ public Dimension preferredSize() { ++ return new Dimension(300, 40); ++ } ++ ++ public void setValue(Object o) { ++ font = (Font) o; ++ if (this.font == null) ++ return; ++ ++ changeFont(font); ++ // Update the current GUI choices. ++ for (int i = 0; i < fonts.length; i++) { ++ if (fonts[i].equals(font.getFamily())) { ++ familyChoser.select(i); ++ break; ++ } ++ } ++ for (int i = 0; i < styleNames.length; i++) { ++ if (font.getStyle() == styles[i]) { ++ styleChoser.select(i); ++ break; ++ } ++ } ++ for (int i = 0; i < pointSizes.length; i++) { ++ if (font.getSize() <= pointSizes[i]) { ++ sizeChoser.select(i); ++ break; ++ } ++ } ++ } ++ ++ private void changeFont(Font f) { ++ font = f; ++ if (sample != null) { ++ remove(sample); ++ } ++ sample = new Label(sampleText); ++ sample.setFont(font); ++ add(sample); ++ Component p = getParent(); ++ if (p != null) { ++ p.invalidate(); ++ p.layout(); ++ } ++ invalidate(); ++ layout(); ++ repaint(); ++ support.firePropertyChange("", null, null); ++ } ++ ++ public Object getValue() { ++ return (font); ++ } ++ ++ public String getJavaInitializationString() { ++ if (this.font == null) ++ return "null"; ++ ++ return "new java.awt.Font(\"" + font.getName() + "\", " + ++ font.getStyle() + ", " + font.getSize() + ")"; ++ } ++ ++ public boolean action(Event e, Object arg) { ++ String family = familyChoser.getSelectedItem(); ++ int style = styles[styleChoser.getSelectedIndex()]; ++ int size = pointSizes[sizeChoser.getSelectedIndex()]; ++ try { ++ Font f = new Font(family, style, size); ++ changeFont(f); ++ } catch (Exception ex) { ++ System.err.println("Couldn't create font " + family + "-" + ++ styleNames[style] + "-" + size); ++ } ++ return (false); ++ } ++ ++ ++ public boolean isPaintable() { ++ return true; ++ } ++ ++ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { ++ // Silent noop. ++ Font oldFont = gfx.getFont(); ++ gfx.setFont(font); ++ FontMetrics fm = gfx.getFontMetrics(); ++ int vpad = (box.height - fm.getAscent())/2; ++ gfx.drawString(sampleText, 0, box.height-vpad); ++ gfx.setFont(oldFont); ++ } ++ ++ public String getAsText() { ++ if (this.font == null) { ++ return null; ++ } ++ StringBuilder sb = new StringBuilder(); ++ sb.append(this.font.getName()); ++ sb.append(' '); ++ ++ boolean b = this.font.isBold(); ++ if (b) { ++ sb.append("BOLD"); ++ } ++ boolean i = this.font.isItalic(); ++ if (i) { ++ sb.append("ITALIC"); ++ } ++ if (b || i) { ++ sb.append(' '); ++ } ++ sb.append(this.font.getSize()); ++ return sb.toString(); ++ } ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Font.decode(text)); ++ } ++ ++ public String[] getTags() { ++ return null; ++ } ++ ++ public java.awt.Component getCustomEditor() { ++ return this; ++ } ++ ++ public boolean supportsCustomEditor() { ++ return true; ++ } ++ ++ public void addPropertyChangeListener(PropertyChangeListener l) { ++ support.addPropertyChangeListener(l); ++ } ++ ++ public void removePropertyChangeListener(PropertyChangeListener l) { ++ support.removePropertyChangeListener(l); ++ } ++ ++ private Font font; ++ private Toolkit toolkit; ++ private String sampleText = "Abcde..."; ++ ++ private Label sample; ++ private Choice familyChoser; ++ private Choice styleChoser; ++ private Choice sizeChoser; ++ ++ private String fonts[]; ++ private String[] styleNames = { "plain", "bold", "italic" }; ++ private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC }; ++ private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 }; ++ ++ private PropertyChangeSupport support = new PropertyChangeSupport(this); ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/IntegerEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,42 @@ ++/* ++ * Copyright (c) 2006, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "int" type. ++ * ++ */ ++ ++import java.beans.*; ++ ++public class IntegerEditor extends NumberEditor { ++ ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Integer.decode(text)); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/LongEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/LongEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "long" type. ++ * ++ */ ++ ++import java.beans.*; ++ ++public class LongEditor extends NumberEditor { ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ return (value != null) ++ ? value + "L" ++ : "null"; ++ } ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Long.decode(text)); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/NumberEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,44 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Abstract Property editor for a java builtin number types. ++ * ++ */ ++ ++import java.beans.*; ++ ++abstract public class NumberEditor extends PropertyEditorSupport { ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ return (value != null) ++ ? value.toString() ++ : "null"; ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/ShortEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,49 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++/** ++ * Property editor for a java builtin "short" type. ++ * ++ */ ++ ++import java.beans.*; ++ ++public class ShortEditor extends NumberEditor { ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ return (value != null) ++ ? "((short)" + value + ")" ++ : "null"; ++ } ++ ++ public void setAsText(String text) throws IllegalArgumentException { ++ setValue((text == null) ? null : Short.decode(text)); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/editors/StringEditor.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/editors/StringEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,74 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.editors; ++ ++import java.beans.*; ++ ++public class StringEditor extends PropertyEditorSupport { ++ ++ public String getJavaInitializationString() { ++ Object value = getValue(); ++ if (value == null) ++ return "null"; ++ ++ String str = value.toString(); ++ int length = str.length(); ++ StringBuilder sb = new StringBuilder(length + 2); ++ sb.append('"'); ++ for (int i = 0; i < length; i++) { ++ char ch = str.charAt(i); ++ switch (ch) { ++ case '\b': sb.append("\\b"); break; ++ case '\t': sb.append("\\t"); break; ++ case '\n': sb.append("\\n"); break; ++ case '\f': sb.append("\\f"); break; ++ case '\r': sb.append("\\r"); break; ++ case '\"': sb.append("\\\""); break; ++ case '\\': sb.append("\\\\"); break; ++ default: ++ if ((ch < ' ') || (ch > '~')) { ++ sb.append("\\u"); ++ String hex = Integer.toHexString((int) ch); ++ for (int len = hex.length(); len < 4; len++) { ++ sb.append('0'); ++ } ++ sb.append(hex); ++ } else { ++ sb.append(ch); ++ } ++ break; ++ } ++ } ++ sb.append('"'); ++ return sb.toString(); ++ } ++ ++ public void setAsText(String text) { ++ setValue(text); ++ } ++ ++} +--- jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java 2012-08-10 10:23:32.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -42,6 +42,7 @@ + extends InstanceFinder<BeanInfo> { + + private static final String DEFAULT = "sun.beans.infos"; ++ private static final String DEFAULT_NEW = "com.sun.beans.infos"; + + public BeanInfoFinder() { + super(BeanInfo.class, true, "BeanInfo", DEFAULT); +@@ -53,10 +54,13 @@ + + @Override + protected BeanInfo instantiate(Class<?> type, String prefix, String name) { ++ if (DEFAULT.equals(prefix)) { ++ prefix = DEFAULT_NEW; ++ } + // this optimization will only use the BeanInfo search path + // if is has changed from the original + // or trying to get the ComponentBeanInfo +- BeanInfo info = !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name) ++ BeanInfo info = !DEFAULT_NEW.equals(prefix) || "ComponentBeanInfo".equals(name) + ? super.instantiate(type, prefix, name) + : null; + +--- jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java 2012-08-10 10:23:33.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2012, 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 +@@ -24,6 +24,8 @@ + */ + package com.sun.beans.finder; + ++import static sun.reflect.misc.ReflectUtil.checkPackageAccess; ++ + /** + * This is utility class that provides {@code static} methods + * to find a class with the specified name using the specified class loader. +@@ -54,6 +56,7 @@ + * @see Thread#getContextClassLoader() + */ + public static Class<?> findClass(String name) throws ClassNotFoundException { ++ checkPackageAccess(name); + try { + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + if (loader == null) { +@@ -94,6 +97,7 @@ + * @see Class#forName(String,boolean,ClassLoader) + */ + public static Class<?> findClass(String name, ClassLoader loader) throws ClassNotFoundException { ++ checkPackageAccess(name); + if (loader != null) { + try { + return Class.forName(name, false, loader); +--- jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java 2012-08-10 10:23:33.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -29,6 +29,8 @@ + import java.lang.reflect.Constructor; + import java.lang.reflect.Modifier; + ++import static sun.reflect.misc.ReflectUtil.isPackageAccessible; ++ + /** + * This utility class provides {@code static} methods + * to find a public constructor with specified parameter types +@@ -61,7 +63,7 @@ + if (Modifier.isAbstract(type.getModifiers())) { + throw new NoSuchMethodException("Abstract class cannot be instantiated"); + } +- if (!Modifier.isPublic(type.getModifiers())) { ++ if (!Modifier.isPublic(type.getModifiers()) || !isPackageAccessible(type)) { + throw new NoSuchMethodException("Class is not accessible"); + } + PrimitiveWrapperMap.replacePrimitivesWithWrappers(args); +--- jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java 2012-08-10 10:23:33.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,8 @@ + import java.lang.reflect.Field; + import java.lang.reflect.Modifier; + ++import static sun.reflect.misc.ReflectUtil.isPackageAccessible; ++ + /** + * This utility class provides {@code static} methods + * to find a public field with specified name +@@ -56,7 +58,8 @@ + if (!Modifier.isPublic(field.getModifiers())) { + throw new NoSuchFieldException("Field '" + name + "' is not public"); + } +- if (!Modifier.isPublic(field.getDeclaringClass().getModifiers())) { ++ type = field.getDeclaringClass(); ++ if (!Modifier.isPublic(type.getModifiers()) || !isPackageAccessible(type)) { + throw new NoSuchFieldException("Field '" + name + "' is not accessible"); + } + return field; --- jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2012-08-10 10:23:33.000000000 -0700 -+++ jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2012-08-19 12:39:49.000000000 -0700 -@@ -164,10 +164,8 @@ ++++ jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -33,6 +33,8 @@ + import java.lang.reflect.Type; + import java.util.Arrays; + ++import static sun.reflect.misc.ReflectUtil.isPackageAccessible; ++ + /** + * This utility class provides {@code static} methods + * to find a public method with specified name and parameter types +@@ -120,7 +122,7 @@ + */ + public static Method findAccessibleMethod(Method method) throws NoSuchMethodException { + Class<?> type = method.getDeclaringClass(); +- if (Modifier.isPublic(type.getModifiers())) { ++ if (Modifier.isPublic(type.getModifiers()) && isPackageAccessible(type)) { + return method; + } + if (Modifier.isStatic(method.getModifiers())) { +@@ -164,10 +166,8 @@ return findAccessibleMethod(m); } Type[] gpts = m.getGenericParameterTypes(); @@ -6411,8 +12096,446 @@ } } } +--- jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java 2012-08-10 10:23:33.000000000 -0700 ++++ jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -28,14 +28,14 @@ + + import java.beans.PropertyEditor; + +-import sun.beans.editors.BooleanEditor; +-import sun.beans.editors.ByteEditor; +-import sun.beans.editors.DoubleEditor; +-import sun.beans.editors.EnumEditor; +-import sun.beans.editors.FloatEditor; +-import sun.beans.editors.IntegerEditor; +-import sun.beans.editors.LongEditor; +-import sun.beans.editors.ShortEditor; ++import com.sun.beans.editors.BooleanEditor; ++import com.sun.beans.editors.ByteEditor; ++import com.sun.beans.editors.DoubleEditor; ++import com.sun.beans.editors.EnumEditor; ++import com.sun.beans.editors.FloatEditor; ++import com.sun.beans.editors.IntegerEditor; ++import com.sun.beans.editors.LongEditor; ++import com.sun.beans.editors.ShortEditor; + + /** + * This is utility class that provides functionality +@@ -48,10 +48,13 @@ + public final class PropertyEditorFinder + extends InstanceFinder<PropertyEditor> { + ++ private static final String DEFAULT = "sun.beans.editors"; ++ private static final String DEFAULT_NEW = "com.sun.beans.editors"; ++ + private final WeakCache<Class<?>, Class<?>> registry; + + public PropertyEditorFinder() { +- super(PropertyEditor.class, false, "Editor", "sun.beans.editors"); ++ super(PropertyEditor.class, false, "Editor", DEFAULT); + + this.registry = new WeakCache<Class<?>, Class<?>>(); + this.registry.put(Byte.TYPE, ByteEditor.class); +@@ -84,4 +87,9 @@ + } + return editor; + } ++ ++ @Override ++ protected PropertyEditor instantiate(Class<?> type, String prefix, String name) { ++ return super.instantiate(type, DEFAULT.equals(prefix) ? DEFAULT_NEW : prefix, name); ++ } + } +--- jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,62 @@ ++/* ++ * Copyright (c) 1996, 2012, 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 com.sun.beans.infos; ++ ++import java.beans.*; ++ ++/** ++ * BeanInfo descriptor for a standard AWT component. ++ */ ++ ++public class ComponentBeanInfo extends SimpleBeanInfo { ++ private static final Class beanClass = java.awt.Component.class; ++ ++ public PropertyDescriptor[] getPropertyDescriptors() { ++ try { ++ PropertyDescriptor ++ name = new PropertyDescriptor("name", beanClass), ++ background = new PropertyDescriptor("background", beanClass), ++ foreground = new PropertyDescriptor("foreground", beanClass), ++ font = new PropertyDescriptor("font", beanClass), ++ enabled = new PropertyDescriptor("enabled", beanClass), ++ visible = new PropertyDescriptor("visible", beanClass), ++ focusable = new PropertyDescriptor("focusable", beanClass); ++ ++ enabled.setExpert(true); ++ visible.setHidden(true); ++ ++ background.setBound(true); ++ foreground.setBound(true); ++ font.setBound(true); ++ focusable.setBound(true); ++ ++ PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable }; ++ return rv; ++ } catch (IntrospectionException e) { ++ throw new Error(e.toString()); ++ } ++ } ++} +--- jdk/src/share/classes/com/sun/crypto/provider/AESCrypt.java 2012-08-10 10:23:33.000000000 -0700 ++++ jdk/src/share/classes/com/sun/crypto/provider/AESCrypt.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -37,6 +37,7 @@ + package com.sun.crypto.provider; + + import java.security.InvalidKeyException; ++import java.util.Arrays; + + /** + * Rijndael --pronounced Reindaal-- is a symmetric cipher with a 128-bit +@@ -54,7 +55,12 @@ + private Object[] sessionK = null; + private int[] K = null; + +- /** (ROUNDS-1) * 4 */ ++ /** Cipher encryption/decryption key */ ++ // skip re-generating Session and Sub keys if the cipher key is ++ // the same ++ private byte[] lastKey = null; ++ ++ /** ROUNDS * 4 */ + private int limit = 0; + + AESCrypt() { +@@ -82,41 +88,45 @@ + key.length + " bytes"); + } + +- // generate session key and reset sub key. +- sessionK = makeKey(key); +- setSubKey(decrypting); ++ if (!Arrays.equals(key, lastKey)) { ++ // re-generate session key 'sessionK' when cipher key changes ++ makeSessionKey(key); ++ lastKey = key.clone(); // save cipher key ++ } ++ ++ // set sub key to the corresponding session Key ++ this.K = (int[]) sessionK[(decrypting? 1:0)]; + } + +- private void setSubKey(boolean decrypting) { +- int[][] Kd = (int[][]) sessionK[decrypting ? 1 : 0]; +- int rounds = Kd.length; +- this.K = new int[rounds*4]; +- for(int i=0; i<rounds; i++) { ++ /** ++ * Expand an int[(ROUNDS+1)][4] into int[(ROUNDS+1)*4]. ++ * For decryption round keys, need to rotate right by 4 ints. ++ * @param kr The round keys for encryption or decryption. ++ * @param decrypting True if 'kr' is for decryption and false otherwise. ++ */ ++ private static final int[] expandToSubKey(int[][] kr, boolean decrypting) { ++ int total = kr.length; ++ int[] expK = new int[total*4]; ++ if (decrypting) { ++ // decrypting, rotate right by 4 ints ++ // i.e. i==0 + for(int j=0; j<4; j++) { +- K[i*4 + j] = Kd[i][j]; ++ expK[j] = kr[total-1][j]; + } +- } +- +- if (decrypting) { +- int j0 = K[K.length-4]; +- int j1 = K[K.length-3]; +- int j2 = K[K.length-2]; +- int j3 = K[K.length-1]; +- +- for (int i=this.K.length-1; i>3; i--) { +- this.K[i] = this.K[i-4]; ++ for(int i=1; i<total; i++) { ++ for(int j=0; j<4; j++) { ++ expK[i*4 + j] = kr[i-1][j]; ++ } ++ } ++ } else { ++ // encrypting, straight expansion ++ for(int i=0; i<total; i++) { ++ for(int j=0; j<4; j++) { ++ expK[i*4 + j] = kr[i][j]; ++ } + } +- K[0] = j0; +- K[1] = j1; +- K[2] = j2; +- K[3] = j3; + } +- +- ROUNDS_12 = (rounds>=13); +- ROUNDS_14 = (rounds==15); +- +- rounds--; +- limit=rounds*4; ++ return expK; + } + + private static int[] +@@ -566,10 +576,10 @@ + /** + * Expand a user-supplied key material into a session key. + * +- * @param key The 128/192/256-bit user-key to use. ++ * @param k The 128/192/256-bit cipher key to use. + * @exception InvalidKeyException If the key is invalid. + */ +- private static Object[] makeKey(byte[] k) throws InvalidKeyException { ++ private void makeSessionKey(byte[] k) throws InvalidKeyException { + if (k == null) { + throw new InvalidKeyException("Empty key"); + } +@@ -639,10 +649,18 @@ + U4[ tt & 0xFF]; + } + } +- // assemble the encryption (Ke) and decryption (Kd) round keys into +- // one sessionKey object +- Object[] result = new Object[] {Ke, Kd}; +- return result; ++ ++ // assemble the encryption (Ke) and decryption (Kd) round keys ++ // and expand them into arrays of ints. ++ int[] expandedKe = expandToSubKey(Ke, false); // decrypting==false ++ int[] expandedKd = expandToSubKey(Kd, true); // decrypting==true ++ ++ ROUNDS_12 = (ROUNDS>=12); ++ ROUNDS_14 = (ROUNDS==14); ++ limit = ROUNDS*4; ++ ++ // store the expanded sub keys into 'sessionK' ++ sessionK = new Object[] { expandedKe, expandedKd }; + } + + +--- jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java 2012-08-10 10:24:01.000000000 -0700 ++++ jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java 2013-01-16 08:58:10.000000000 -0800 +@@ -30,6 +30,8 @@ + import java.awt.Event; + import java.awt.KeyEventPostProcessor; + import java.awt.Window; ++import java.awt.Toolkit; ++import sun.awt.SunToolkit; + + import java.awt.event.ActionEvent; + import java.awt.event.KeyEvent; +@@ -125,7 +127,19 @@ + } + JMenu menu = mbar != null ? mbar.getMenu(0) : null; + +- if (menu != null) { ++ // It might happen that the altRelease event is processed ++ // with a reasonable delay since it has been generated. ++ // Here we check the last deactivation time of the containing ++ // window. If this time appears to be greater than the altRelease ++ // event time the event is skipped to avoid unexpected menu ++ // activation. See 7121442. ++ boolean skip = false; ++ Toolkit tk = Toolkit.getDefaultToolkit(); ++ if (tk instanceof SunToolkit) { ++ skip = ev.getWhen() <= ((SunToolkit)tk).getWindowDeactivationTime(winAncestor); ++ } ++ ++ if (menu != null && !skip) { + MenuElement[] path = new MenuElement[2]; + path[0] = mbar; + path[1] = menu; +--- jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java 2012-08-10 10:24:20.000000000 -0700 ++++ jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -68,9 +68,9 @@ + this.notifBuffer = notifBuffer; + this.connectionId = connectionId; + connectionTimeout = EnvHelp.getServerConnectionTimeout(env); +- checkNotificationEmission = EnvHelp.computeBooleanFromString( +- env, +- "jmx.remote.x.check.notification.emission",false); ++ ++ String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission"); ++ checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean ); + notificationAccessController = + EnvHelp.getNotificationAccessController(env); + } +--- jdk/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java 2012-08-10 10:24:20.000000000 -0700 ++++ jdk/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java 2013-01-16 08:58:10.000000000 -0800 +@@ -665,97 +665,57 @@ + * Computes a boolean value from a string value retrieved from a + * property in the given map. + * +- * @param env the environment map. +- * @param prop the name of the property in the environment map whose +- * returned string value must be converted into a boolean value. +- * @param systemProperty if true, consult a system property of the +- * same name if there is no entry in the environment map. ++ * @param stringBoolean the string value that must be converted ++ * into a boolean value. + * + * @return + * <ul> +- * <li>{@code false} if {@code env.get(prop)} is {@code null}</li> ++ * <li>{@code false} if {@code stringBoolean} is {@code null}</li> + * <li>{@code false} if +- * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} ++ * {@code stringBoolean.equalsIgnoreCase("false")} + * is {@code true}</li> + * <li>{@code true} if +- * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} ++ * {@code stringBoolean.equalsIgnoreCase("true")} + * is {@code true}</li> + * </ul> + * +- * @throws IllegalArgumentException if {@code env} is {@code null} or +- * {@code env.get(prop)} is not {@code null} and ++ * @throws IllegalArgumentException if + * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and + * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are + * {@code false}. +- * @throws ClassCastException if {@code env.get(prop)} cannot be cast +- * to {@code String}. + */ +- public static boolean computeBooleanFromString( +- Map<String, ?> env, String prop, boolean systemProperty) { +- +- if (env == null) +- throw new IllegalArgumentException("env map cannot be null"); +- ++ public static boolean computeBooleanFromString(String stringBoolean) { + // returns a default value of 'false' if no property is found... +- return computeBooleanFromString(env,prop,systemProperty,false); ++ return computeBooleanFromString(stringBoolean,false); + } + + /** + * Computes a boolean value from a string value retrieved from a + * property in the given map. + * +- * @param env the environment map. +- * @param prop the name of the property in the environment map whose +- * returned string value must be converted into a boolean value. +- * @param systemProperty if true, consult a system property of the +- * same name if there is no entry in the environment map. ++ * @param stringBoolean the string value that must be converted ++ * into a boolean value. + * @param defaultValue a default value to return in case no property + * was defined. + * + * @return + * <ul> +- * <li>{@code defaultValue} if {@code env.get(prop)} is {@code null} +- * and {@code systemProperty} is {@code false}</li> +- * <li>{@code defaultValue} if {@code env.get(prop)} is {@code null} +- * and {@code systemProperty} is {@code true} and +- * {@code System.getProperty(prop)} is {@code null}</li> +- * <li>{@code false} if {@code env.get(prop)} is {@code null} +- * and {@code systemProperty} is {@code true} and +- * {@code System.getProperty(prop).equalsIgnoreCase("false")} +- * is {@code true}</li> +- * <li>{@code true} if {@code env.get(prop)} is {@code null} +- * and {@code systemProperty} is {@code true} and +- * {@code System.getProperty(prop).equalsIgnoreCase("true")} +- * is {@code true}</li> ++ * <li>{@code defaultValue} if {@code stringBoolean} ++ * is {@code null}</li> + * <li>{@code false} if +- * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} ++ * {@code stringBoolean.equalsIgnoreCase("false")} + * is {@code true}</li> + * <li>{@code true} if +- * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} ++ * {@code stringBoolean.equalsIgnoreCase("true")} + * is {@code true}</li> + * </ul> + * +- * @throws IllegalArgumentException if {@code env} is {@code null} or +- * {@code env.get(prop)} is not {@code null} and ++ * @throws IllegalArgumentException if + * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and + * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are + * {@code false}. +- * @throws ClassCastException if {@code env.get(prop)} cannot be cast +- * to {@code String}. + */ +- public static boolean computeBooleanFromString( +- Map<String, ?> env, String prop, +- boolean systemProperty, boolean defaultValue) { +- +- if (env == null) +- throw new IllegalArgumentException("env map cannot be null"); +- +- String stringBoolean = (String) env.get(prop); +- if (stringBoolean == null && systemProperty) { +- stringBoolean = +- AccessController.doPrivileged(new GetPropertyAction(prop)); +- } +- ++ public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) { + if (stringBoolean == null) + return defaultValue; + else if (stringBoolean.equalsIgnoreCase("true")) +@@ -763,8 +723,8 @@ + else if (stringBoolean.equalsIgnoreCase("false")) + return false; + else +- throw new IllegalArgumentException(prop + +- " must be \"true\" or \"false\" instead of \"" + ++ throw new IllegalArgumentException( ++ "Property value must be \"true\" or \"false\" instead of \"" + + stringBoolean + "\""); + } + --- jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2012-08-10 10:24:27.000000000 -0700 -+++ jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2013-01-16 00:07:03.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. @@ -6434,7 +12557,7 @@ --- jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2012-08-10 10:24:27.000000000 -0700 -+++ jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2013-01-16 00:07:03.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. @@ -6466,8 +12589,159 @@ } // Remove from pool +--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java 2012-08-10 10:25:05.000000000 -0700 ++++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/Init.java 2013-01-16 08:58:10.000000000 -0800 +@@ -154,7 +154,7 @@ + } + } + for (Node el=config.getFirstChild();el!=null;el=el.getNextSibling()) { +- if (!(el instanceof Element)) { ++ if (el.getNodeType() != Node.ELEMENT_NODE) { + continue; + } + String tag=el.getLocalName(); +--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java 2012-08-10 10:25:07.000000000 -0700 ++++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java 2013-01-16 08:58:10.000000000 -0800 +@@ -202,7 +202,7 @@ + try { + NameSpaceSymbTable ns=new NameSpaceSymbTable(); + int nodeLevel=NODE_BEFORE_DOCUMENT_ELEMENT; +- if (rootNode instanceof Element) { ++ if (rootNode != null && rootNode.getNodeType() == Node.ELEMENT_NODE) { + //Fills the nssymbtable with the definitions of the parent of the root subnode + getParentNameSpaces((Element)rootNode,ns); + nodeLevel=NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; +@@ -332,7 +332,7 @@ + return; + sibling=parentNode.getNextSibling(); + parentNode=parentNode.getParentNode(); +- if (!(parentNode instanceof Element)) { ++ if (parentNode !=null && parentNode.getNodeType() != Node.ELEMENT_NODE) { + documentLevel=NODE_AFTER_DOCUMENT_ELEMENT; + parentNode=null; + } +@@ -388,7 +388,7 @@ + return; + boolean currentNodeIsVisible = false; + NameSpaceSymbTable ns=new NameSpaceSymbTable(); +- if (currentNode instanceof Element) ++ if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE) + getParentNameSpaces((Element)currentNode,ns); + Node sibling=null; + Node parentNode=null; +@@ -509,7 +509,7 @@ + return; + sibling=parentNode.getNextSibling(); + parentNode=parentNode.getParentNode(); +- if (!(parentNode instanceof Element)) { ++ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) { + parentNode=null; + documentLevel=NODE_AFTER_DOCUMENT_ELEMENT; + } +@@ -591,18 +591,14 @@ + final void getParentNameSpaces(Element el,NameSpaceSymbTable ns) { + List parents=new ArrayList(10); + Node n1=el.getParentNode(); +- if (!(n1 instanceof Element)) { ++ if (n1 == null || n1.getNodeType() != Node.ELEMENT_NODE) { + return; + } + //Obtain all the parents of the elemnt +- Element parent=(Element) n1; +- while (parent!=null) { +- parents.add(parent); +- Node n=parent.getParentNode(); +- if (!(n instanceof Element )) { +- break; +- } +- parent=(Element)n; ++ Node parent = n1; ++ while (parent!=null && parent.getNodeType() == Node.ELEMENT_NODE) { ++ parents.add((Element)parent); ++ parent = parent.getParentNode(); + } + //Visit them in reverse order. + ListIterator it=parents.listIterator(parents.size()); +--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java 2012-08-10 10:25:08.000000000 -0700 ++++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1445,7 +1445,7 @@ + // The de-serialiser returns a fragment whose children we need to + // take on. + +- if (sourceParent instanceof Document) { ++ if (sourceParent != null && sourceParent.getNodeType() == Node.DOCUMENT_NODE) { + + // If this is a content decryption, this may have problems + +--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java 2012-08-10 10:25:22.000000000 -0700 ++++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java 2013-01-16 08:58:10.000000000 -0800 +@@ -283,7 +283,7 @@ + Element e=null; + while (it.hasNext()) { + Node currentNode=(Node)it.next(); +- if (currentNode instanceof Element) { ++ if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE) { + e=(Element)currentNode; + break; + } +@@ -292,14 +292,14 @@ + List parents=new ArrayList(10); + + //Obtain all the parents of the elemnt +- do { ++ while (e != null) { + parents.add(e); + Node n=e.getParentNode(); +- if (!(n instanceof Element )) { ++ if (n == null || n.getNodeType() != Node.ELEMENT_NODE) { + break; + } + e=(Element)n; +- } while (e!=null); ++ } + //Visit them in reverse order. + ListIterator it2=parents.listIterator(parents.size()-1); + Element ele=null; +--- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java 2012-08-10 10:25:34.000000000 -0700 ++++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java 2013-01-16 08:58:10.000000000 -0800 +@@ -223,7 +223,7 @@ + } while (sibling==null && parentNode!=null) { + sibling=parentNode.getNextSibling(); + parentNode=parentNode.getParentNode(); +- if (!(parentNode instanceof Element)) { ++ if (parentNode != null && parentNode.getNodeType() != Node.ELEMENT_NODE) { + parentNode=null; + } + } +--- jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java 2012-08-10 10:25:37.000000000 -0700 ++++ jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java 2013-01-16 08:58:10.000000000 -0800 +@@ -146,7 +146,11 @@ + */ + public RhinoScriptEngine() { + if (System.getSecurityManager() != null) { +- accCtxt = AccessController.getContext(); ++ try { ++ AccessController.checkPermission(new AllPermission()); ++ } catch (AccessControlException ace) { ++ accCtxt = AccessController.getContext(); ++ } + } + + Context cx = enterContext(); +--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties 2012-08-10 10:25:42.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties 2013-01-16 00:07:04.000000000 -0800 +@@ -71,9 +71,6 @@ + FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser help + FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Open selected directory + +-FileChooser.filesListAccessibleName=Files List +-FileChooser.filesDetailsAccessibleName=Files Details +- + ############ COLOR CHOOSER STRINGS ############# + ColorChooser.preview.textAndMnemonic=Preview + ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser-Hilfe FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Ausgew\u00E4hltes Verzeichnis \u00F6ffnen @@ -6479,7 +12753,7 @@ ColorChooser.preview.textAndMnemonic=Vorschau ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=Ayuda del Selector de Archivos FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Abrir directorio seleccionado @@ -6491,7 +12765,7 @@ ColorChooser.preview.textAndMnemonic=Vista Previa ColorChooser.ok.textAndMnemonic=Aceptar --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=Aide du s\u00E9lecteur de fichiers FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Ouvre le r\u00E9pertoire s\u00E9lectionn\u00E9 @@ -6503,7 +12777,7 @@ ColorChooser.preview.textAndMnemonic=Aper\u00E7u ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=Guida FileChooser FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Apre la directory selezionata @@ -6515,7 +12789,7 @@ ColorChooser.preview.textAndMnemonic=Anteprima ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser\u306E\u30D8\u30EB\u30D7\u3067\u3059 FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u9078\u629E\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u958B\u304D\u307E\u3059 @@ -6527,7 +12801,7 @@ ColorChooser.preview.textAndMnemonic=\u30D7\u30EC\u30D3\u30E5\u30FC ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0 FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uB514\uB809\uD1A0\uB9AC \uC5F4\uAE30 @@ -6539,7 +12813,7 @@ ColorChooser.preview.textAndMnemonic=\uBBF8\uB9AC\uBCF4\uAE30 ColorChooser.ok.textAndMnemonic=\uD655\uC778 --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=Ajuda do FileChooser FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Abrir diret\u00F3rio selecionado @@ -6551,7 +12825,7 @@ ColorChooser.preview.textAndMnemonic=Visualizar ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp - Filv\u00E4ljare FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u00D6ppna vald katalog @@ -6563,7 +12837,7 @@ ColorChooser.preview.textAndMnemonic=Granska ColorChooser.ok.textAndMnemonic=OK --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \u5E2E\u52A9 FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u6253\u5F00\u9009\u62E9\u7684\u76EE\u5F55 @@ -6575,7 +12849,7 @@ ColorChooser.preview.textAndMnemonic=\u9884\u89C8 ColorChooser.ok.textAndMnemonic=\u786E\u5B9A --- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2012-08-10 10:25:42.000000000 -0700 -+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2012-08-19 12:39:50.000000000 -0700 ++++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2013-01-16 00:07:04.000000000 -0800 @@ -70,9 +70,6 @@ FileChooser.helpButtonToolTip.textAndMnemonic=\u300C\u6A94\u6848\u9078\u64C7\u5668\u300D\u8AAA\u660E FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u958B\u555F\u9078\u53D6\u7684\u76EE\u9304 @@ -6586,8 +12860,446 @@ ############ COLOR CHOOSER STRINGS ############# ColorChooser.preview.textAndMnemonic=\u9810\u89BD ColorChooser.ok.textAndMnemonic=\u78BA\u5B9A +--- jdk/src/share/classes/java/awt/AWTEvent.java 2012-08-10 10:25:54.000000000 -0700 ++++ jdk/src/share/classes/java/awt/AWTEvent.java 2013-01-16 08:58:10.000000000 -0800 +@@ -35,8 +35,6 @@ + + import java.security.AccessControlContext; + import java.security.AccessController; +-import java.io.ObjectInputStream; +-import java.io.IOException; + + /** + * The root event class for all AWT events. +@@ -262,9 +260,11 @@ + public void setPosted(AWTEvent ev) { + ev.isPosted = true; + } ++ + public void setSystemGenerated(AWTEvent ev) { + ev.isSystemGenerated = true; + } ++ + public boolean isSystemGenerated(AWTEvent ev) { + return ev.isSystemGenerated; + } +@@ -272,6 +272,15 @@ + public AccessControlContext getAccessControlContext(AWTEvent ev) { + return ev.getAccessControlContext(); + } ++ ++ public byte[] getBData(AWTEvent ev) { ++ return ev.bdata; ++ } ++ ++ public void setBData(AWTEvent ev, byte[] bdata) { ++ ev.bdata = bdata; ++ } ++ + }); + } + +--- jdk/src/share/classes/java/awt/CheckboxMenuItem.java 2012-08-10 10:25:54.000000000 -0700 ++++ jdk/src/share/classes/java/awt/CheckboxMenuItem.java 2013-01-16 08:58:10.000000000 -0800 +@@ -31,6 +31,7 @@ + import java.io.ObjectInputStream; + import java.io.IOException; + import javax.accessibility.*; ++import sun.awt.AWTAccessor; + + + /** +@@ -68,6 +69,13 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ ++ AWTAccessor.setCheckboxMenuItemAccessor( ++ new AWTAccessor.CheckboxMenuItemAccessor() { ++ public boolean getState(CheckboxMenuItem cmi) { ++ return cmi.state; ++ } ++ }); + } + + /** +--- jdk/src/share/classes/java/awt/Cursor.java 2012-08-10 10:25:55.000000000 -0700 ++++ jdk/src/share/classes/java/awt/Cursor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -24,10 +24,6 @@ + */ + package java.awt; + +-import java.awt.AWTException; +-import java.awt.Point; +-import java.awt.Toolkit; +- + import java.io.File; + import java.io.FileInputStream; + +@@ -39,6 +35,7 @@ + import java.security.AccessController; + + import sun.util.logging.PlatformLogger; ++import sun.awt.AWTAccessor; + + /** + * A class to encapsulate the bitmap representation of the mouse cursor. +@@ -199,6 +196,21 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ ++ AWTAccessor.setCursorAccessor( ++ new AWTAccessor.CursorAccessor() { ++ public long getPData(Cursor cursor) { ++ return cursor.pData; ++ } ++ ++ public void setPData(Cursor cursor, long pData) { ++ cursor.pData = pData; ++ } ++ ++ public int getType(Cursor cursor) { ++ return cursor.type; ++ } ++ }); + } + + /** +--- jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java 2012-08-10 10:25:55.000000000 -0700 ++++ jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java 2013-01-16 08:58:10.000000000 -0800 +@@ -39,6 +39,7 @@ + + import sun.awt.AppContext; + import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + import sun.awt.CausedFocusEvent; + + /** +@@ -75,6 +76,15 @@ + typeAheadMarkers = new LinkedList(); + private boolean consumeNextKeyTyped; + ++ static { ++ AWTAccessor.setDefaultKeyboardFocusManagerAccessor( ++ new AWTAccessor.DefaultKeyboardFocusManagerAccessor() { ++ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e) { ++ dkfm.consumeNextKeyTyped(e); ++ } ++ }); ++ } ++ + private static class TypeAheadMarker { + long after; + Component untilFocused; +--- jdk/src/share/classes/java/awt/EventDispatchThread.java 2012-08-10 10:25:55.000000000 -0700 ++++ jdk/src/share/classes/java/awt/EventDispatchThread.java 2013-01-16 08:58:10.000000000 -0800 +@@ -67,8 +67,7 @@ + private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread"); + + private EventQueue theQueue; +- private boolean doDispatch = true; +- private volatile boolean shutdown = false; ++ private volatile boolean doDispatch = true; + + private static final int ANY_EVENT = -1; + +@@ -86,11 +85,6 @@ + doDispatch = false; + } + +- public void interrupt() { +- shutdown = true; +- super.interrupt(); +- } +- + public void run() { + while (true) { + try { +@@ -100,7 +94,12 @@ + } + }); + } finally { +- if(getEventQueue().detachDispatchThread(this, shutdown)) { ++ // 7189350: doDispatch is reset from stopDispatching(), ++ // on InterruptedException, or ThreadDeath. Either way, ++ // this indicates that we must force shutting down. ++ if (getEventQueue().detachDispatchThread(this, ++ !doDispatch || isInterrupted())) ++ { + break; + } + } +@@ -158,8 +157,7 @@ + void pumpEventsForFilter(int id, Conditional cond, EventFilter filter) { + addEventFilter(filter); + doDispatch = true; +- shutdown |= isInterrupted(); +- while (doDispatch && !shutdown && cond.evaluate()) { ++ while (doDispatch && !isInterrupted() && cond.evaluate()) { + pumpOneEventForFilters(id); + } + removeEventFilter(filter); +@@ -247,12 +245,12 @@ + } + } + catch (ThreadDeath death) { +- shutdown = true; ++ doDispatch = false; + throw death; + } + catch (InterruptedException interruptedException) { +- shutdown = true; // AppContext.dispose() interrupts all +- // Threads in the AppContext ++ doDispatch = false; // AppContext.dispose() interrupts all ++ // Threads in the AppContext + } + catch (Throwable e) { + processException(e); +--- jdk/src/share/classes/java/awt/EventQueue.java 2012-08-10 10:25:55.000000000 -0700 ++++ jdk/src/share/classes/java/awt/EventQueue.java 2013-01-16 08:58:10.000000000 -0800 +@@ -52,7 +52,6 @@ + import java.util.concurrent.atomic.AtomicInteger; + + import java.security.AccessControlContext; +-import java.security.ProtectionDomain; + + import sun.misc.SharedSecrets; + import sun.misc.JavaSecurityAccess; +@@ -188,6 +187,17 @@ + public boolean isDispatchThreadImpl(EventQueue eventQueue) { + return eventQueue.isDispatchThreadImpl(); + } ++ public void removeSourceEvents(EventQueue eventQueue, ++ Object source, ++ boolean removeAllEvents) { ++ eventQueue.removeSourceEvents(source, removeAllEvents); ++ } ++ public boolean noEvents(EventQueue eventQueue) { ++ return eventQueue.noEvents(); ++ } ++ public void wakeup(EventQueue eventQueue, boolean isShutdown) { ++ eventQueue.wakeup(isShutdown); ++ } + }); + } + +--- jdk/src/share/classes/java/awt/KeyboardFocusManager.java 2012-08-10 10:25:56.000000000 -0700 ++++ jdk/src/share/classes/java/awt/KeyboardFocusManager.java 2013-01-16 08:58:10.000000000 -0800 +@@ -56,7 +56,6 @@ + import sun.util.logging.PlatformLogger; + + import sun.awt.AppContext; +-import sun.awt.HeadlessToolkit; + import sun.awt.SunToolkit; + import sun.awt.CausedFocusEvent; + import sun.awt.KeyboardFocusManagerPeerProvider; +@@ -148,6 +147,9 @@ + public KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx) { + return KeyboardFocusManager.getCurrentKeyboardFocusManager(ctx); + } ++ public Container getCurrentFocusCycleRoot() { ++ return KeyboardFocusManager.currentFocusCycleRoot; ++ } + } + ); + } +--- jdk/src/share/classes/java/awt/Menu.java 2012-08-10 10:25:56.000000000 -0700 ++++ jdk/src/share/classes/java/awt/Menu.java 2013-01-16 08:58:10.000000000 -0800 +@@ -31,6 +31,7 @@ + import java.awt.peer.MenuPeer; + import java.awt.event.KeyEvent; + import javax.accessibility.*; ++import sun.awt.AWTAccessor; + + /** + * A <code>Menu</code> object is a pull-down menu component +@@ -62,6 +63,13 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ ++ AWTAccessor.setMenuAccessor( ++ new AWTAccessor.MenuAccessor() { ++ public Vector getItems(Menu menu) { ++ return menu.items; ++ } ++ }); + } + + /** +--- jdk/src/share/classes/java/awt/MenuBar.java 2012-08-10 10:25:56.000000000 -0700 ++++ jdk/src/share/classes/java/awt/MenuBar.java 2013-01-16 08:58:10.000000000 -0800 +@@ -28,6 +28,7 @@ + import java.io.ObjectInputStream; + import java.util.Vector; + import java.util.Enumeration; ++import sun.awt.AWTAccessor; + import java.awt.peer.MenuBarPeer; + import java.awt.event.KeyEvent; + import javax.accessibility.*; +@@ -74,6 +75,16 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ AWTAccessor.setMenuBarAccessor( ++ new AWTAccessor.MenuBarAccessor() { ++ public Menu getHelpMenu(MenuBar menuBar) { ++ return menuBar.helpMenu; ++ } ++ ++ public Vector getMenus(MenuBar menuBar) { ++ return menuBar.menus; ++ } ++ }); + } + + /** +--- jdk/src/share/classes/java/awt/MenuComponent.java 2012-08-10 10:25:56.000000000 -0700 ++++ jdk/src/share/classes/java/awt/MenuComponent.java 2013-01-16 08:58:10.000000000 -0800 +@@ -29,7 +29,6 @@ + import java.io.IOException; + import java.io.ObjectInputStream; + import sun.awt.AppContext; +-import sun.awt.SunToolkit; + import sun.awt.AWTAccessor; + import javax.accessibility.*; + +@@ -143,6 +142,9 @@ + public MenuContainer getParent(MenuComponent menuComp) { + return menuComp.parent; + } ++ public Font getFont_NoClientCode(MenuComponent menuComp) { ++ return menuComp.getFont_NoClientCode(); ++ } + }); + } + +--- jdk/src/share/classes/java/awt/MenuItem.java 2012-08-10 10:25:56.000000000 -0700 ++++ jdk/src/share/classes/java/awt/MenuItem.java 2013-01-16 08:58:10.000000000 -0800 +@@ -31,7 +31,7 @@ + import java.io.ObjectInputStream; + import java.io.IOException; + import javax.accessibility.*; +- ++import sun.awt.AWTAccessor; + + /** + * All items in a menu must belong to the class +@@ -76,6 +76,29 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ ++ AWTAccessor.setMenuItemAccessor( ++ new AWTAccessor.MenuItemAccessor() { ++ public boolean isEnabled(MenuItem item) { ++ return item.enabled; ++ } ++ ++ public String getLabel(MenuItem item) { ++ return item.label; ++ } ++ ++ public MenuShortcut getShortcut(MenuItem item) { ++ return item.shortcut; ++ } ++ ++ public String getActionCommandImpl(MenuItem item) { ++ return item.getActionCommandImpl(); ++ } ++ ++ public boolean isItemEnabled(MenuItem item) { ++ return item.isItemEnabled(); ++ } ++ }); + } + + /** +--- jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java 2012-08-10 10:25:57.000000000 -0700 ++++ jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java 2013-01-16 08:58:10.000000000 -0800 +@@ -24,6 +24,8 @@ + */ + package java.awt; + ++import sun.awt.AWTAccessor; ++ + import java.awt.event.AdjustmentEvent; + import java.awt.event.AdjustmentListener; + import java.awt.peer.ScrollPanePeer; +@@ -156,6 +158,13 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ AWTAccessor.setScrollPaneAdjustableAccessor( ++ new AWTAccessor.ScrollPaneAdjustableAccessor() { ++ public void setTypedValue(final ScrollPaneAdjustable adj, ++ final int v, final int type) { ++ adj.setTypedValue(v, type); ++ } ++ }); + } + + /** +--- jdk/src/share/classes/java/awt/SequencedEvent.java 2012-08-10 10:25:57.000000000 -0700 ++++ jdk/src/share/classes/java/awt/SequencedEvent.java 2013-01-16 08:58:10.000000000 -0800 +@@ -26,6 +26,7 @@ + package java.awt; + + import java.util.LinkedList; ++import sun.awt.AWTAccessor; + import sun.awt.AppContext; + import sun.awt.SunToolkit; + +@@ -54,6 +55,17 @@ + private AppContext appContext; + private boolean disposed; + ++ static { ++ AWTAccessor.setSequencedEventAccessor(new AWTAccessor.SequencedEventAccessor() { ++ public AWTEvent getNested(AWTEvent sequencedEvent) { ++ return ((SequencedEvent)sequencedEvent).nested; ++ } ++ public boolean isSequencedEvent(AWTEvent event) { ++ return event instanceof SequencedEvent; ++ } ++ }); ++ } ++ + /** + * Constructs a new SequencedEvent which will dispatch the specified + * nested event. +--- jdk/src/share/classes/java/awt/SystemTray.java 2012-08-10 10:25:57.000000000 -0700 ++++ jdk/src/share/classes/java/awt/SystemTray.java 2013-01-16 08:58:10.000000000 -0800 +@@ -33,6 +33,7 @@ + import sun.awt.SunToolkit; + import sun.awt.HeadlessToolkit; + import sun.security.util.SecurityConstants; ++import sun.awt.AWTAccessor; + + /** + * The <code>SystemTray</code> class represents the system tray for a +@@ -127,6 +128,18 @@ + + private static final TrayIcon[] EMPTY_TRAY_ARRAY = new TrayIcon[0]; + ++ static { ++ AWTAccessor.setSystemTrayAccessor( ++ new AWTAccessor.SystemTrayAccessor() { ++ public void firePropertyChange(SystemTray tray, ++ String propertyName, ++ Object oldValue, ++ Object newValue) { ++ tray.firePropertyChange(propertyName, oldValue, newValue); ++ } ++ }); ++ } ++ + /** + * Private <code>SystemTray</code> constructor. + * --- jdk/src/share/classes/java/awt/TextComponent.java 2012-08-10 10:25:57.000000000 -0700 -+++ jdk/src/share/classes/java/awt/TextComponent.java 2012-08-19 12:39:51.000000000 -0700 ++++ jdk/src/share/classes/java/awt/TextComponent.java 2013-01-16 00:07:05.000000000 -0800 @@ -233,14 +233,9 @@ * @see java.awt.TextComponent#getText */ @@ -6604,8 +13316,88 @@ peer.setText(text); } } +--- jdk/src/share/classes/java/awt/TrayIcon.java 2012-08-10 10:25:58.000000000 -0700 ++++ jdk/src/share/classes/java/awt/TrayIcon.java 2013-01-16 08:58:10.000000000 -0800 +@@ -25,19 +25,11 @@ + + package java.awt; + +-import java.awt.Point; +-import java.awt.Toolkit; +-import java.awt.GraphicsEnvironment; + import java.awt.event.*; +-import java.awt.AWTEvent; +-import java.awt.AWTEventMulticaster; +-import java.awt.EventQueue; +-import java.awt.PopupMenu; +-import java.awt.Image; +-import java.util.EventListener; + import java.awt.peer.TrayIconPeer; + import sun.awt.AppContext; + import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + import sun.awt.HeadlessToolkit; + import java.util.EventObject; + import java.security.AccessControlContext; +@@ -129,6 +121,16 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ ++ AWTAccessor.setTrayIconAccessor( ++ new AWTAccessor.TrayIconAccessor() { ++ public void addNotify(TrayIcon trayIcon) throws AWTException { ++ trayIcon.addNotify(); ++ } ++ public void removeNotify(TrayIcon trayIcon) { ++ trayIcon.removeNotify(); ++ } ++ }); + } + + private TrayIcon() +--- jdk/src/share/classes/java/awt/event/KeyEvent.java 2012-08-10 10:26:01.000000000 -0700 ++++ jdk/src/share/classes/java/awt/event/KeyEvent.java 2013-01-16 08:58:10.000000000 -0800 +@@ -25,12 +25,12 @@ + + package java.awt.event; + +-import java.awt.Event; + import java.awt.Component; + import java.awt.GraphicsEnvironment; + import java.awt.Toolkit; + import java.io.IOException; + import java.io.ObjectInputStream; ++import sun.awt.AWTAccessor; + + /** + * An event which indicates that a keystroke occurred in a component. +@@ -914,6 +914,23 @@ + if (!GraphicsEnvironment.isHeadless()) { + initIDs(); + } ++ ++ AWTAccessor.setKeyEventAccessor( ++ new AWTAccessor.KeyEventAccessor() { ++ public void setRawCode(KeyEvent ev, long rawCode) { ++ ev.rawCode = rawCode; ++ } ++ ++ public void setPrimaryLevelUnicode(KeyEvent ev, ++ long primaryLevelUnicode) { ++ ev.primaryLevelUnicode = primaryLevelUnicode; ++ } ++ ++ public void setExtendedKeyCode(KeyEvent ev, ++ long extendedKeyCode) { ++ ev.extendedKeyCode = extendedKeyCode; ++ } ++ }); + } + + /** --- jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2012-08-10 10:26:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2012-08-19 12:39:51.000000000 -0700 ++++ jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2013-01-16 08:58:10.000000000 -0800 @@ -181,21 +181,20 @@ // the Indexed readMethod was explicitly set to null. return null; @@ -6631,8 +13423,25 @@ indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args); } setIndexedReadMethod0(indexedReadMethod); +@@ -495,6 +494,16 @@ + indexedReadMethodName = old.indexedReadMethodName; + } + ++ void updateGenericsFor(Class<?> type) { ++ super.updateGenericsFor(type); ++ try { ++ setIndexedPropertyType(findIndexedPropertyType(getIndexedReadMethod0(), getIndexedWriteMethod0())); ++ } ++ catch (IntrospectionException exception) { ++ setIndexedPropertyType(null); ++ } ++ } ++ + /** + * Returns a hash code value for the object. + * See {@link java.lang.Object#hashCode} for a complete description. --- jdk/src/share/classes/java/beans/Introspector.java 2012-08-10 10:26:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/Introspector.java 2012-08-19 12:39:51.000000000 -0700 ++++ jdk/src/share/classes/java/beans/Introspector.java 2013-01-16 08:58:10.000000000 -0800 @@ -25,7 +25,6 @@ package java.beans; @@ -6649,7 +13458,52 @@ import java.util.Map; import java.util.ArrayList; -@@ -953,61 +951,44 @@ +@@ -574,26 +572,25 @@ + // replace existing property descriptor + // only if we have types to resolve + // in the context of this.beanClass +- try { +- String name = pd.getName(); +- Method read = pd.getReadMethod(); +- Method write = pd.getWriteMethod(); +- boolean cls = true; +- if (read != null) cls = cls && read.getGenericReturnType() instanceof Class; +- if (write != null) cls = cls && write.getGenericParameterTypes()[0] instanceof Class; +- if (pd instanceof IndexedPropertyDescriptor) { +- IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor)pd; +- Method readI = ipd.getIndexedReadMethod(); +- Method writeI = ipd.getIndexedWriteMethod(); +- if (readI != null) cls = cls && readI.getGenericReturnType() instanceof Class; +- if (writeI != null) cls = cls && writeI.getGenericParameterTypes()[1] instanceof Class; +- if (!cls) { +- pd = new IndexedPropertyDescriptor(this.beanClass, name, read, write, readI, writeI); +- } +- } else if (!cls) { +- pd = new PropertyDescriptor(this.beanClass, name, read, write); ++ Method read = pd.getReadMethod(); ++ Method write = pd.getWriteMethod(); ++ boolean cls = true; ++ if (read != null) cls = cls && read.getGenericReturnType() instanceof Class; ++ if (write != null) cls = cls && write.getGenericParameterTypes()[0] instanceof Class; ++ if (pd instanceof IndexedPropertyDescriptor) { ++ IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; ++ Method readI = ipd.getIndexedReadMethod(); ++ Method writeI = ipd.getIndexedWriteMethod(); ++ if (readI != null) cls = cls && readI.getGenericReturnType() instanceof Class; ++ if (writeI != null) cls = cls && writeI.getGenericParameterTypes()[1] instanceof Class; ++ if (!cls) { ++ pd = new IndexedPropertyDescriptor((IndexedPropertyDescriptor) pd); ++ pd.updateGenericsFor(this.beanClass); + } +- } catch ( IntrospectionException e ) { ++ } ++ else if (!cls) { ++ pd = new PropertyDescriptor(pd); ++ pd.updateGenericsFor(this.beanClass); + } + } + list.add(pd); +@@ -953,61 +950,44 @@ continue; } @@ -6742,7 +13596,7 @@ } } } -@@ -1259,11 +1240,11 @@ +@@ -1259,11 +1239,11 @@ private boolean isEventHandler(Method m) { // We assume that a method is an event handler if it has a single // argument, whose type inherit from java.util.Event. @@ -6756,7 +13610,7 @@ } /* -@@ -1315,25 +1296,24 @@ +@@ -1315,25 +1295,24 @@ } // make sure method signature matches. @@ -6795,8 +13649,55 @@ } } } +@@ -1460,7 +1439,7 @@ + private PropertyDescriptor[] properties; + private int defaultProperty; + private MethodDescriptor[] methods; +- private final Reference<BeanInfo> targetBeanInfoRef; ++ private Reference<BeanInfo> targetBeanInfoRef; + + public GenericBeanInfo(BeanDescriptor beanDescriptor, + EventSetDescriptor[] events, int defaultEvent, +@@ -1472,7 +1451,9 @@ + this.properties = properties; + this.defaultProperty = defaultProperty; + this.methods = methods; +- this.targetBeanInfoRef = new SoftReference<BeanInfo>(targetBeanInfo); ++ this.targetBeanInfoRef = (targetBeanInfo != null) ++ ? new SoftReference<>(targetBeanInfo) ++ : null; + } + + /** +@@ -1539,10 +1520,25 @@ + } + + public java.awt.Image getIcon(int iconKind) { +- BeanInfo targetBeanInfo = this.targetBeanInfoRef.get(); ++ BeanInfo targetBeanInfo = getTargetBeanInfo(); + if (targetBeanInfo != null) { + return targetBeanInfo.getIcon(iconKind); + } + return super.getIcon(iconKind); + } ++ ++ private BeanInfo getTargetBeanInfo() { ++ if (this.targetBeanInfoRef == null) { ++ return null; ++ } ++ BeanInfo targetBeanInfo = this.targetBeanInfoRef.get(); ++ if (targetBeanInfo == null) { ++ targetBeanInfo = ThreadGroupContext.getContext().getBeanInfoFinder() ++ .find(this.beanDescriptor.getBeanClass()); ++ if (targetBeanInfo != null) { ++ this.targetBeanInfoRef = new SoftReference<>(targetBeanInfo); ++ } ++ } ++ return targetBeanInfo; ++ } + } --- jdk/src/share/classes/java/beans/PropertyDescriptor.java 2012-08-10 10:26:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/PropertyDescriptor.java 2012-08-19 12:39:51.000000000 -0700 ++++ jdk/src/share/classes/java/beans/PropertyDescriptor.java 2013-01-16 08:58:10.000000000 -0800 @@ -210,13 +210,12 @@ // The read method was explicitly set to null. return null; @@ -6823,8 +13724,534 @@ readMethod = Introspector.findMethod(cls, readMethodName, 0); } try { +@@ -630,6 +629,16 @@ + constrained = old.constrained; + } + ++ void updateGenericsFor(Class<?> type) { ++ setClass0(type); ++ try { ++ setPropertyType(findPropertyType(getReadMethod0(), getWriteMethod0())); ++ } ++ catch (IntrospectionException exception) { ++ setPropertyType(null); ++ } ++ } ++ + /** + * Returns the property type that corresponds to the read and write method. + * The type precedence is given to the readMethod. +--- jdk/src/share/classes/java/beans/XMLDecoder.java 2012-08-10 10:26:09.000000000 -0700 ++++ jdk/src/share/classes/java/beans/XMLDecoder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -29,6 +29,9 @@ + import java.io.Closeable; + import java.io.InputStream; + import java.io.IOException; ++import java.security.AccessControlContext; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + + import org.xml.sax.InputSource; + import org.xml.sax.helpers.DefaultHandler; +@@ -61,6 +64,7 @@ + * @author Philip Milne + */ + public class XMLDecoder implements AutoCloseable { ++ private final AccessControlContext acc = AccessController.getContext(); + private final DocumentHandler handler = new DocumentHandler(); + private final InputSource input; + private Object owner; +@@ -189,7 +193,15 @@ + return false; + } + if (this.array == null) { +- this.handler.parse(this.input); ++ if ((this.acc == null) && (null != System.getSecurityManager())) { ++ throw new SecurityException("AccessControlContext is not set"); ++ } ++ AccessController.doPrivileged(new PrivilegedAction<Void>() { ++ public Void run() { ++ XMLDecoder.this.handler.parse(XMLDecoder.this.input); ++ return null; ++ } ++ }, this.acc); + this.array = this.handler.getObjects(); + } + return true; +--- jdk/src/share/classes/java/beans/XMLEncoder.java 2012-08-10 10:26:09.000000000 -0700 ++++ jdk/src/share/classes/java/beans/XMLEncoder.java 2013-01-16 08:58:10.000000000 -0800 +@@ -631,7 +631,12 @@ + } + + if (d.name != null) { +- outputXML(isArgument ? "object" : "void", " idref=" + quote(d.name), value); ++ if (isArgument) { ++ writeln("<object idref=" + quote(d.name) + "/>"); ++ } ++ else { ++ outputXML("void", " idref=" + quote(d.name), value); ++ } + } + else if (d.exp != null) { + outputStatement(d.exp, outer, isArgument); +@@ -710,12 +715,14 @@ + } + else { + d.refs = 2; +- getValueData(target).refs++; +- List<Statement> statements = statementList(target); +- if (!statements.contains(exp)) { +- statements.add(exp); ++ if (d.name == null) { ++ getValueData(target).refs++; ++ List<Statement> statements = statementList(target); ++ if (!statements.contains(exp)) { ++ statements.add(exp); ++ } ++ outputValue(target, outer, false); + } +- outputValue(target, outer, false); + if (expression) { + outputValue(value, outer, isArgument); + } +--- jdk/src/share/classes/java/io/FilePermission.java 2012-08-10 10:26:11.000000000 -0700 ++++ jdk/src/share/classes/java/io/FilePermission.java 2013-01-16 08:58:10.000000000 -0800 +@@ -418,7 +418,7 @@ + */ + + public int hashCode() { +- return this.cpath.hashCode(); ++ return 0; + } + + /** +--- jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-08-10 10:26:57.000000000 -0700 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,7 +25,6 @@ + + package java.lang.invoke; + +-import sun.invoke.util.VerifyType; + import java.security.AccessController; + import java.security.PrivilegedAction; + import java.util.ArrayList; +@@ -35,6 +34,7 @@ + import java.util.List; + import sun.invoke.empty.Empty; + import sun.invoke.util.ValueConversions; ++import sun.invoke.util.VerifyType; + import sun.invoke.util.Wrapper; + import sun.misc.Unsafe; + import static java.lang.invoke.MethodHandleStatics.*; +@@ -1258,4 +1258,169 @@ + return THROW_EXCEPTION; + } + static <T extends Throwable> Empty throwException(T t) throws T { throw t; } ++ ++ /** ++ * Create an alias for the method handle which, when called, ++ * appears to be called from the same class loader and protection domain ++ * as hostClass. ++ * This is an expensive no-op unless the method which is called ++ * is sensitive to its caller. A small number of system methods ++ * are in this category, including Class.forName and Method.invoke. ++ */ ++ static ++ MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) { ++ return BindCaller.bindCaller(mh, hostClass); ++ } ++ ++ // Put the whole mess into its own nested class. ++ // That way we can lazily load the code and set up the constants. ++ private static class BindCaller { ++ static ++ MethodHandle bindCaller(MethodHandle mh, Class<?> hostClass) { ++ // Do not use this function to inject calls into system classes. ++ if (hostClass == null) { ++ hostClass = C_Trampoline; ++ } else if (hostClass.isArray() || ++ hostClass.isPrimitive() || ++ hostClass.getName().startsWith("java.") || ++ hostClass.getName().startsWith("sun.")) { ++ throw new InternalError(); // does not happen, and should not anyway ++ } ++ // For simplicity, convert mh to a varargs-like method. ++ MethodHandle vamh = prepareForInvoker(mh); ++ // Cache the result of makeInjectedInvoker once per argument class. ++ MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass); ++ return restoreToType(bccInvoker.bindTo(vamh), mh.type()); ++ } ++ ++ // This class ("Trampoline") is known to be inside a dead-end class loader. ++ // Inject all doubtful calls into this class. ++ private static Class<?> C_Trampoline; ++ static { ++ Class<?> tramp = null; ++ try { ++ final int FRAME_COUNT_ARG = 1; // [0] Reflection [1] Trampoline ++ java.lang.reflect.Method gcc = sun.reflect.Reflection.class.getMethod("getCallerClass", int.class); ++ tramp = (Class<?>) sun.reflect.misc.MethodUtil.invoke(gcc, null, new Object[]{ FRAME_COUNT_ARG }); ++ if (tramp.getClassLoader() == BindCaller.class.getClassLoader()) ++ throw new RuntimeException(tramp.getName()+" class loader"); ++ } catch (Throwable ex) { ++ throw new InternalError(ex.toString()); ++ } ++ C_Trampoline = tramp; ++ } ++ ++ private static final Unsafe UNSAFE = Unsafe.getUnsafe(); ++ ++ private static MethodHandle makeInjectedInvoker(Class<?> hostClass) { ++ Class<?> bcc = UNSAFE.defineAnonymousClass(hostClass, T_BYTES, null); ++ if (hostClass.getClassLoader() != bcc.getClassLoader()) ++ throw new InternalError(hostClass.getName()+" (CL)"); ++ try { ++ if (hostClass.getProtectionDomain() != bcc.getProtectionDomain()) ++ throw new InternalError(hostClass.getName()+" (PD)"); ++ } catch (SecurityException ex) { ++ // Self-check was blocked by security manager. This is OK. ++ // In fact the whole try body could be turned into an assertion. ++ } ++ try { ++ MethodHandle init = IMPL_LOOKUP.findStatic(bcc, "init", MethodType.methodType(void.class)); ++ init.invokeExact(); // force initialization of the class ++ } catch (Throwable ex) { ++ throw uncaughtException(ex); ++ } ++ MethodHandle bccInvoker; ++ try { ++ MethodType invokerMT = MethodType.methodType(Object.class, MethodHandle.class, Object[].class); ++ bccInvoker = IMPL_LOOKUP.findStatic(bcc, "invoke_V", invokerMT); ++ } catch (ReflectiveOperationException ex) { ++ throw uncaughtException(ex); ++ } ++ // Test the invoker, to ensure that it really injects into the right place. ++ try { ++ MethodHandle vamh = prepareForInvoker(MH_checkCallerClass); ++ Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc}); ++ } catch (Throwable ex) { ++ throw new InternalError(ex.toString()); ++ } ++ return bccInvoker; ++ } ++ private static ClassValue<MethodHandle> CV_makeInjectedInvoker = new ClassValue<MethodHandle>() { ++ @Override protected MethodHandle computeValue(Class<?> hostClass) { ++ return makeInjectedInvoker(hostClass); ++ } ++ }; ++ ++ // Adapt mh so that it can be called directly from an injected invoker: ++ private static MethodHandle prepareForInvoker(MethodHandle mh) { ++ mh = mh.asFixedArity(); ++ MethodType mt = mh.type(); ++ int arity = mt.parameterCount(); ++ MethodHandle vamh = mh.asType(mt.generic()); ++ vamh = vamh.asSpreader(Object[].class, arity); ++ return vamh; ++ } ++ ++ // Undo the adapter effect of prepareForInvoker: ++ private static MethodHandle restoreToType(MethodHandle vamh, MethodType type) { ++ return vamh.asCollector(Object[].class, type.parameterCount()).asType(type); ++ } ++ ++ private static final MethodHandle MH_checkCallerClass; ++ static { ++ final Class<?> THIS_CLASS = BindCaller.class; ++ assert(checkCallerClass(THIS_CLASS, THIS_CLASS)); ++ try { ++ MH_checkCallerClass = IMPL_LOOKUP ++ .findStatic(THIS_CLASS, "checkCallerClass", ++ MethodType.methodType(boolean.class, Class.class, Class.class)); ++ assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); ++ } catch (Throwable ex) { ++ throw new InternalError(ex.toString()); ++ } ++ } ++ ++ private static boolean checkCallerClass(Class<?> expected, Class<?> expected2) { ++ final int FRAME_COUNT_ARG = 2; // [0] Reflection [1] BindCaller [2] Expected ++ Class<?> actual = sun.reflect.Reflection.getCallerClass(FRAME_COUNT_ARG); ++ if (actual != expected && actual != expected2) ++ throw new InternalError("found "+actual.getName()+", expected "+expected.getName() ++ +(expected == expected2 ? "" : ", or else "+expected2.getName())); ++ return true; ++ } ++ ++ private static final byte[] T_BYTES; ++ static { ++ final Object[] values = {null}; ++ AccessController.doPrivileged(new PrivilegedAction<Void>() { ++ public Void run() { ++ try { ++ Class<T> tClass = T.class; ++ String tName = tClass.getName(); ++ String tResource = tName.substring(tName.lastIndexOf('.')+1)+".class"; ++ java.net.URLConnection uconn = tClass.getResource(tResource).openConnection(); ++ int len = uconn.getContentLength(); ++ byte[] bytes = new byte[len]; ++ try (java.io.InputStream str = uconn.getInputStream()) { ++ int nr = str.read(bytes); ++ if (nr != len) throw new java.io.IOException(tResource); ++ } ++ values[0] = bytes; ++ } catch (java.io.IOException ex) { ++ throw new InternalError(ex.toString()); ++ } ++ return null; ++ } ++ }); ++ T_BYTES = (byte[]) values[0]; ++ } ++ ++ // The following class is used as a template for Unsafe.defineAnonymousClass: ++ private static class T { ++ static void init() { } // side effect: initializes this class ++ static Object invoke_V(MethodHandle vamh, Object[] args) throws Throwable { ++ return vamh.invokeExact(args); ++ } ++ } ++ } + } +--- jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2012-08-10 10:26:57.000000000 -0700 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, 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 +@@ -401,4 +401,101 @@ + assert(!HAVE_RICOCHET_FRAMES) : "this code should not be executed if `-XX:+UseRicochetFrames is enabled"; + return true; + } ++ ++ /** ++ * Is this method a caller-sensitive method? ++ * I.e., does it call Reflection.getCallerClass or a similer method ++ * to ask about the identity of its caller? ++ */ ++ // FIXME: Replace this pattern match by an annotation @sun.reflect.CallerSensitive. ++ static boolean isCallerSensitive(MemberName mem) { ++ assert(mem.isInvocable()); ++ Class<?> defc = mem.getDeclaringClass(); ++ switch (mem.getName()) { ++ case "doPrivileged": ++ return defc == java.security.AccessController.class; ++ case "getUnsafe": ++ return defc == sun.misc.Unsafe.class; ++ case "lookup": ++ return defc == java.lang.invoke.MethodHandles.class; ++ case "invoke": ++ return defc == java.lang.reflect.Method.class; ++ case "get": ++ case "getBoolean": ++ case "getByte": ++ case "getChar": ++ case "getShort": ++ case "getInt": ++ case "getLong": ++ case "getFloat": ++ case "getDouble": ++ case "set": ++ case "setBoolean": ++ case "setByte": ++ case "setChar": ++ case "setShort": ++ case "setInt": ++ case "setLong": ++ case "setFloat": ++ case "setDouble": ++ return defc == java.lang.reflect.Field.class; ++ case "newInstance": ++ if (defc == java.lang.reflect.Constructor.class) return true; ++ if (defc == java.lang.Class.class) return true; ++ break; ++ case "forName": ++ case "getClassLoader": ++ case "getClasses": ++ case "getFields": ++ case "getMethods": ++ case "getConstructors": ++ case "getDeclaredClasses": ++ case "getDeclaredFields": ++ case "getDeclaredMethods": ++ case "getDeclaredConstructors": ++ case "getField": ++ case "getMethod": ++ case "getConstructor": ++ case "getDeclaredField": ++ case "getDeclaredMethod": ++ case "getDeclaredConstructor": ++ return defc == java.lang.Class.class; ++ case "getConnection": ++ case "getDriver": ++ case "getDrivers": ++ case "deregisterDriver": ++ return defc == java.sql.DriverManager.class; ++ case "newUpdater": ++ if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true; ++ if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true; ++ if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class) return true; ++ break; ++ case "getContextClassLoader": ++ return defc == java.lang.Thread.class; ++ case "getPackage": ++ case "getPackages": ++ return defc == java.lang.Package.class; ++ case "getParent": ++ case "getSystemClassLoader": ++ return defc == java.lang.ClassLoader.class; ++ case "load": ++ case "loadLibrary": ++ if (defc == java.lang.Runtime.class) return true; ++ if (defc == java.lang.System.class) return true; ++ break; ++ case "getCallerClass": ++ if (defc == sun.reflect.Reflection.class) return true; ++ if (defc == java.lang.System.class) return true; ++ break; ++ case "getCallerClassLoader": ++ return defc == java.lang.ClassLoader.class; ++ case "getProxyClass": ++ case "newProxyInstance": ++ return defc == java.lang.reflect.Proxy.class; ++ case "getBundle": ++ case "clearCache": ++ return defc == java.util.ResourceBundle.class; ++ } ++ return false; ++ } + } +--- jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java 2012-08-10 10:26:57.000000000 -0700 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, 2012, 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 +@@ -107,7 +107,7 @@ + /*non-public*/ static RuntimeException newIllegalArgumentException(String message, Object obj, Object obj2) { + return new IllegalArgumentException(message(message, obj, obj2)); + } +- /*non-public*/ static Error uncaughtException(Exception ex) { ++ /*non-public*/ static Error uncaughtException(Throwable ex) { + Error err = new InternalError("uncaught exception"); + err.initCause(ex); + return err; +--- jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2012-08-10 10:26:57.000000000 -0700 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, 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 +@@ -589,7 +589,9 @@ + private + MethodHandle accessStatic(Class<?> refc, MemberName method) throws IllegalAccessException { + checkMethod(refc, method, true); +- return MethodHandleImpl.findMethod(method, false, lookupClassOrNull()); ++ MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull()); ++ mh = maybeBindCaller(method, mh); ++ return mh; + } + private + MethodHandle resolveStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException { +@@ -647,6 +649,7 @@ + private MethodHandle accessVirtual(Class<?> refc, MemberName method) throws IllegalAccessException { + checkMethod(refc, method, false); + MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull()); ++ mh = maybeBindCaller(method, mh); + return restrictProtectedReceiver(method, mh); + } + +@@ -687,6 +690,7 @@ + checkAccess(refc, ctor); + MethodHandle rawMH = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull()); + MethodHandle allocMH = MethodHandleImpl.makeAllocator(rawMH); ++ assert(!MethodHandleNatives.isCallerSensitive(ctor)); // maybeBindCaller not relevant here + return fixVarargs(allocMH, rawMH); + } + private MethodHandle resolveConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException { +@@ -755,6 +759,7 @@ + Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException { + checkMethod(refc, method, false); + MethodHandle mh = MethodHandleImpl.findMethod(method, false, specialCaller); ++ mh = maybeBindCaller(method, mh); + return restrictReceiver(method, mh, specialCaller); + } + private MethodHandle resolveSpecial(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException { +@@ -922,6 +927,8 @@ + checkSecurityManager(refc, method); // stack walk magic: do not refactor + checkMethod(refc, method, false); + MethodHandle dmh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull()); ++ MethodHandle bcmh = maybeBindCaller(method, dmh); ++ if (bcmh != dmh) return fixVarargs(bcmh.bindTo(receiver), dmh); + MethodHandle bmh = MethodHandleImpl.bindReceiver(dmh, receiver); + if (bmh == null) + throw method.makeAccessException("no access", this); +@@ -956,6 +963,7 @@ + return MethodHandleImpl.findMethod(method, true, /*no lookupClass*/ null); + checkMethod(method.getDeclaringClass(), method, method.isStatic()); + MethodHandle mh = MethodHandleImpl.findMethod(method, true, lookupClassOrNull()); ++ mh = maybeBindCaller(method, mh); + return restrictProtectedReceiver(method, mh); + } + +@@ -987,6 +995,7 @@ + // ignore m.isAccessible: this is a new kind of access + checkMethod(m.getDeclaringClass(), method, false); + MethodHandle mh = MethodHandleImpl.findMethod(method, false, lookupClassOrNull()); ++ mh = maybeBindCaller(method, mh); + return restrictReceiver(method, mh, specialCaller); + } + +@@ -1021,6 +1030,7 @@ + checkAccess(c.getDeclaringClass(), ctor); + rawCtor = MethodHandleImpl.findMethod(ctor, false, lookupClassOrNull()); + } ++ assert(!MethodHandleNatives.isCallerSensitive(ctor)); // maybeBindCaller not relevant here + MethodHandle allocator = MethodHandleImpl.makeAllocator(rawCtor); + return fixVarargs(allocator, rawCtor); + } +@@ -1232,6 +1242,16 @@ + MethodHandle narrowMH = MethodHandleImpl.convertArguments(mh, narrowType, rawType, 0); + return fixVarargs(narrowMH, mh); + } ++ private MethodHandle maybeBindCaller(MemberName method, MethodHandle mh) throws IllegalAccessException { ++ if (allowedModes == TRUSTED || !MethodHandleNatives.isCallerSensitive(method)) ++ return mh; ++ Class<?> hostClass = lookupClass; ++ if ((allowedModes & PRIVATE) == 0) // caller must use full-power lookup ++ hostClass = null; ++ MethodHandle cbmh = MethodHandleImpl.bindCaller(mh, hostClass); ++ cbmh = fixVarargs(cbmh, mh); // in JDK 7 version, varargs happens earlier and must be repaired ++ return cbmh; ++ } + + MethodHandle makeAccessor(Class<?> refc, MemberName field, + boolean trusted, boolean isSetter, --- jdk/src/share/classes/java/net/InMemoryCookieStore.java 2012-08-10 10:27:01.000000000 -0700 -+++ jdk/src/share/classes/java/net/InMemoryCookieStore.java 2012-08-19 12:39:52.000000000 -0700 ++++ jdk/src/share/classes/java/net/InMemoryCookieStore.java 2013-01-16 00:07:06.000000000 -0800 @@ -91,10 +91,8 @@ if (cookie.getDomain() != null) { addIndex(domainIndex, cookie.getDomain(), cookie); @@ -6838,9 +14265,245 @@ } } finally { lock.unlock(); +--- jdk/src/share/classes/java/net/URL.java 2012-08-10 10:27:02.000000000 -0700 ++++ jdk/src/share/classes/java/net/URL.java 2013-01-16 08:58:10.000000000 -0800 +@@ -28,6 +28,8 @@ + import java.io.IOException; + import java.io.InputStream; + import java.io.OutputStream; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + import java.util.Hashtable; + import java.util.StringTokenizer; + import sun.security.util.SecurityConstants; +@@ -1116,6 +1118,22 @@ + static Hashtable handlers = new Hashtable(); + private static Object streamHandlerLock = new Object(); + ++ // special case the gopher protocol, disabled by default ++ private static final String GOPHER = "gopher"; ++ private static final String ENABLE_GOPHER_PROP = "jdk.net.registerGopherProtocol"; ++ private static final boolean enableGopher = AccessController.doPrivileged( ++ new PrivilegedAction<Boolean>() { ++ @Override ++ public Boolean run() { ++ String prop = System.getProperty(ENABLE_GOPHER_PROP); ++ return prop == null ? false : ++ (prop.equalsIgnoreCase("false") ? false : true); ++ } ++ }); ++ ++ // package name of the JDK implementation protocol handlers ++ private static final String JDK_PACKAGE_PREFIX = "sun.net.www.protocol"; ++ + /** + * Returns the Stream Handler. + * @param protocol the protocol to use +@@ -1147,7 +1165,7 @@ + + // REMIND: decide whether to allow the "null" class prefix + // or not. +- packagePrefixList += "sun.net.www.protocol"; ++ packagePrefixList += JDK_PACKAGE_PREFIX; + + StringTokenizer packagePrefixIter = + new StringTokenizer(packagePrefixList, "|"); +@@ -1157,6 +1175,14 @@ + + String packagePrefix = + packagePrefixIter.nextToken().trim(); ++ ++ // do not try to instantiate the JDK gopher handler ++ // unless the system property had been explicitly set ++ if (protocol.equalsIgnoreCase(GOPHER) && ++ packagePrefix.equals(JDK_PACKAGE_PREFIX) && ++ !enableGopher) { ++ continue; ++ } + try { + String clsName = packagePrefix + "." + protocol + + ".Handler"; +--- jdk/src/share/classes/java/security/AccessController.java 2012-08-10 10:27:09.000000000 -0700 ++++ jdk/src/share/classes/java/security/AccessController.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2012, 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 +@@ -290,11 +290,11 @@ + */ + public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action) { + +- DomainCombiner dc = null; + AccessControlContext acc = getStackAccessControlContext(); +- if (acc == null || (dc = acc.getAssignedCombiner()) == null) { ++ if (acc == null) { + return AccessController.doPrivileged(action); + } ++ DomainCombiner dc = acc.getAssignedCombiner(); + return AccessController.doPrivileged(action, preserveCombiner(dc)); + } + +@@ -386,11 +386,11 @@ + public static <T> T doPrivilegedWithCombiner + (PrivilegedExceptionAction<T> action) throws PrivilegedActionException { + +- DomainCombiner dc = null; + AccessControlContext acc = getStackAccessControlContext(); +- if (acc == null || (dc = acc.getAssignedCombiner()) == null) { ++ if (acc == null) { + return AccessController.doPrivileged(action); + } ++ DomainCombiner dc = acc.getAssignedCombiner(); + return AccessController.doPrivileged(action, preserveCombiner(dc)); + } + +@@ -417,7 +417,12 @@ + // perform 'combine' on the caller of doPrivileged, + // even if the caller is from the bootclasspath + ProtectionDomain[] pds = new ProtectionDomain[] {callerPd}; +- return new AccessControlContext(combiner.combine(pds, null), combiner); ++ if (combiner == null) { ++ return new AccessControlContext(pds); ++ } else { ++ return new AccessControlContext(combiner.combine(pds, null), ++ combiner); ++ } + } + + +--- jdk/src/share/classes/java/util/ServiceLoader.java 2012-08-10 10:27:19.000000000 -0700 ++++ jdk/src/share/classes/java/util/ServiceLoader.java 2013-01-16 08:58:10.000000000 -0800 +@@ -358,14 +358,21 @@ + } + String cn = nextName; + nextName = null; ++ Class<?> c = null; + try { +- S p = service.cast(Class.forName(cn, true, loader) +- .newInstance()); +- providers.put(cn, p); +- return p; ++ c = Class.forName(cn, false, loader); + } catch (ClassNotFoundException x) { + fail(service, + "Provider " + cn + " not found"); ++ } ++ if (!service.isAssignableFrom(c)) { ++ fail(service, ++ "Provider " + cn + " not a subtype"); ++ } ++ try { ++ S p = service.cast(c.newInstance()); ++ providers.put(cn, p); ++ return p; + } catch (Throwable x) { + fail(service, + "Provider " + cn + " could not be instantiated: " + x, --- jdk/src/share/classes/java/util/TimeZone.java 2012-08-10 10:27:19.000000000 -0700 -+++ jdk/src/share/classes/java/util/TimeZone.java 2012-08-19 12:39:52.000000000 -0700 -@@ -890,15 +890,13 @@ ++++ jdk/src/share/classes/java/util/TimeZone.java 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2012, 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 +@@ -43,7 +43,8 @@ + import java.security.AccessController; + import java.security.PrivilegedAction; + import java.util.concurrent.ConcurrentHashMap; +-import sun.awt.AppContext; ++import sun.misc.SharedSecrets; ++import sun.misc.JavaAWTAccess; + import sun.security.action.GetPropertyAction; + import sun.util.TimeZoneNameUtility; + import sun.util.calendar.ZoneInfo; +@@ -161,6 +162,16 @@ + private static final int ONE_HOUR = 60*ONE_MINUTE; + private static final int ONE_DAY = 24*ONE_HOUR; + ++ /* ++ * Provides access implementation-private methods without using reflection ++ * ++ * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't ++ * been loaded. If so, it implies that AWTSecurityManager is not our ++ * SecurityManager and we can use a local static variable. ++ * This works around a build time issue. ++ */ ++ private static JavaAWTAccess javaAWTAccess; ++ + // Proclaim serialization compatibility with JDK 1.1 + static final long serialVersionUID = 3581463369166924961L; + +@@ -720,13 +731,19 @@ + * used or if the AppContext doesn't have the default TimeZone. + */ + private synchronized static TimeZone getDefaultInAppContext() { +- if (!hasSetInAppContext) { +- return null; +- } +- +- AppContext ac = AppContext.getAppContext(); +- if (ac != null && !ac.isDisposed()) { +- return (TimeZone) ac.get(TimeZone.class); ++ javaAWTAccess = SharedSecrets.getJavaAWTAccess(); ++ if (javaAWTAccess == null) { ++ return mainAppContextDefault; ++ } else { ++ if (!javaAWTAccess.isDisposed()) { ++ TimeZone tz = (TimeZone) ++ javaAWTAccess.get(TimeZone.class); ++ if (tz == null && javaAWTAccess.isMainAppContext()) { ++ return mainAppContextDefault; ++ } else { ++ return tz; ++ } ++ } + } + return null; + } +@@ -738,17 +755,15 @@ + * AppContext otherwise. + */ + private synchronized static void setDefaultInAppContext(TimeZone tz) { +- if (!hasSetInAppContext && tz == null) { +- return; +- } +- +- AppContext ac = AppContext.getAppContext(); +- if (ac != null && !ac.isDisposed()) { +- if (tz != null) { +- ac.put(TimeZone.class, tz); +- hasSetInAppContext = true; +- } else { +- ac.remove(TimeZone.class); ++ javaAWTAccess = SharedSecrets.getJavaAWTAccess(); ++ if (javaAWTAccess == null) { ++ mainAppContextDefault = tz; ++ } else { ++ if (!javaAWTAccess.isDisposed()) { ++ javaAWTAccess.put(TimeZone.class, tz); ++ if (javaAWTAccess.isMainAppContext()) { ++ mainAppContextDefault = null; ++ } + } + } + } +@@ -804,8 +819,8 @@ + static final String GMT_ID = "GMT"; + private static final int GMT_ID_LENGTH = 3; + +- // true if the default TimeZone has been set in any AppContext +- private static boolean hasSetInAppContext; ++ // a static TimeZone we can reference if no AppContext is in place ++ private static TimeZone mainAppContextDefault; + + /** + * Parses a custom time zone identifier and returns a corresponding zone. +@@ -890,15 +905,13 @@ } int gmtOffset = (hours * 60 + num) * 60 * 1000; @@ -6857,8 +14520,38 @@ } return zi; } +--- jdk/src/share/classes/java/util/concurrent/Executors.java 2012-08-10 10:27:20.000000000 -0700 ++++ jdk/src/share/classes/java/util/concurrent/Executors.java 2013-01-16 08:58:10.000000000 -0800 +@@ -530,18 +530,17 @@ + return AccessController.doPrivileged( + new PrivilegedExceptionAction<T>() { + public T run() throws Exception { +- ClassLoader savedcl = null; + Thread t = Thread.currentThread(); +- try { +- ClassLoader cl = t.getContextClassLoader(); +- if (ccl != cl) { +- t.setContextClassLoader(ccl); +- savedcl = cl; +- } ++ ClassLoader cl = t.getContextClassLoader(); ++ if (ccl == cl) { + return task.call(); +- } finally { +- if (savedcl != null) +- t.setContextClassLoader(savedcl); ++ } else { ++ t.setContextClassLoader(ccl); ++ try { ++ return task.call(); ++ } finally { ++ t.setContextClassLoader(cl); ++ } + } + } + }, acc); --- jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2012-08-10 10:27:20.000000000 -0700 -+++ jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2012-08-19 12:39:53.000000000 -0700 ++++ jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2013-01-16 00:07:07.000000000 -0800 @@ -35,8 +35,7 @@ package java.util.concurrent; @@ -7194,8 +14887,786 @@ */ private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { +--- jdk/src/share/classes/java/util/logging/FileHandler.java 2012-08-10 10:27:22.000000000 -0700 ++++ jdk/src/share/classes/java/util/logging/FileHandler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -220,7 +220,7 @@ + * @exception NullPointerException if pattern property is an empty String. + */ + public FileHandler() throws IOException, SecurityException { +- checkAccess(); ++ checkPermission(); + configure(); + openFiles(); + } +@@ -246,7 +246,7 @@ + if (pattern.length() < 1 ) { + throw new IllegalArgumentException(); + } +- checkAccess(); ++ checkPermission(); + configure(); + this.pattern = pattern; + this.limit = 0; +@@ -278,7 +278,7 @@ + if (pattern.length() < 1 ) { + throw new IllegalArgumentException(); + } +- checkAccess(); ++ checkPermission(); + configure(); + this.pattern = pattern; + this.limit = 0; +@@ -315,7 +315,7 @@ + if (limit < 0 || count < 1 || pattern.length() < 1) { + throw new IllegalArgumentException(); + } +- checkAccess(); ++ checkPermission(); + configure(); + this.pattern = pattern; + this.limit = limit; +@@ -354,7 +354,7 @@ + if (limit < 0 || count < 1 || pattern.length() < 1) { + throw new IllegalArgumentException(); + } +- checkAccess(); ++ checkPermission(); + configure(); + this.pattern = pattern; + this.limit = limit; +@@ -367,7 +367,7 @@ + // configured instance variables. + private void openFiles() throws IOException { + LogManager manager = LogManager.getLogManager(); +- manager.checkAccess(); ++ manager.checkPermission(); + if (count < 1) { + throw new IllegalArgumentException("file count = " + count); + } +--- jdk/src/share/classes/java/util/logging/Handler.java 2012-08-10 10:27:22.000000000 -0700 ++++ jdk/src/share/classes/java/util/logging/Handler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2012, 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 +@@ -111,7 +111,7 @@ + * the caller does not have <tt>LoggingPermission("control")</tt>. + */ + public void setFormatter(Formatter newFormatter) throws SecurityException { +- checkAccess(); ++ checkPermission(); + // Check for a null pointer: + newFormatter.getClass(); + formatter = newFormatter; +@@ -140,7 +140,7 @@ + */ + public void setEncoding(String encoding) + throws SecurityException, java.io.UnsupportedEncodingException { +- checkAccess(); ++ checkPermission(); + if (encoding != null) { + try { + if(!java.nio.charset.Charset.isSupported(encoding)) { +@@ -175,7 +175,7 @@ + * the caller does not have <tt>LoggingPermission("control")</tt>. + */ + public void setFilter(Filter newFilter) throws SecurityException { +- checkAccess(); ++ checkPermission(); + filter = newFilter; + } + +@@ -199,7 +199,7 @@ + * the caller does not have <tt>LoggingPermission("control")</tt>. + */ + public void setErrorManager(ErrorManager em) { +- checkAccess(); ++ checkPermission(); + if (em == null) { + throw new NullPointerException(); + } +@@ -213,7 +213,7 @@ + * the caller does not have <tt>LoggingPermission("control")</tt>. + */ + public ErrorManager getErrorManager() { +- checkAccess(); ++ checkPermission(); + return errorManager; + } + +@@ -253,7 +253,7 @@ + if (newLevel == null) { + throw new NullPointerException(); + } +- checkAccess(); ++ checkPermission(); + logLevel = newLevel; + } + +@@ -296,9 +296,9 @@ + // If "sealed" is true, we check that the caller has + // appropriate security privileges to update Handler + // state and if not throw a SecurityException. +- void checkAccess() throws SecurityException { ++ void checkPermission() throws SecurityException { + if (sealed) { +- manager.checkAccess(); ++ manager.checkPermission(); + } + } + } +--- jdk/src/share/classes/java/util/logging/LogManager.java 2012-08-10 10:27:22.000000000 -0700 ++++ jdk/src/share/classes/java/util/logging/LogManager.java 2013-01-16 08:58:10.000000000 -0800 +@@ -314,7 +314,7 @@ + if (l == null) { + throw new NullPointerException(); + } +- checkAccess(); ++ checkPermission(); + changes.addPropertyChangeListener(l); + } + +@@ -333,7 +333,7 @@ + * the caller does not have LoggingPermission("control"). + */ + public void removePropertyChangeListener(PropertyChangeListener l) throws SecurityException { +- checkAccess(); ++ checkPermission(); + changes.removePropertyChangeListener(l); + } + +@@ -772,7 +772,7 @@ + * @exception IOException if there are IO problems reading the configuration. + */ + public void readConfiguration() throws IOException, SecurityException { +- checkAccess(); ++ checkPermission(); + + // if a configuration class is specified, load it and use it. + String cname = System.getProperty("java.util.logging.config.class"); +@@ -830,7 +830,7 @@ + */ + + public void reset() throws SecurityException { +- checkAccess(); ++ checkPermission(); + synchronized (this) { + props = new Properties(); + // Since we are doing a reset we no longer want to initialize +@@ -915,7 +915,7 @@ + * @exception IOException if there are problems reading from the stream. + */ + public void readConfiguration(InputStream ins) throws IOException, SecurityException { +- checkAccess(); ++ checkPermission(); + reset(); + + // Load the properties +@@ -1077,7 +1077,13 @@ + } + + +- private Permission ourPermission = new LoggingPermission("control", null); ++ private final Permission controlPermission = new LoggingPermission("control", null); ++ ++ void checkPermission() { ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) ++ sm.checkPermission(controlPermission); ++ } + + /** + * Check that the current context is trusted to modify the logging +@@ -1090,11 +1096,7 @@ + * the caller does not have LoggingPermission("control"). + */ + public void checkAccess() throws SecurityException { +- SecurityManager sm = System.getSecurityManager(); +- if (sm == null) { +- return; +- } +- sm.checkPermission(ourPermission); ++ checkPermission(); + } + + // Nested class to represent a node in our tree of named loggers. +--- jdk/src/share/classes/java/util/logging/Logger.java 2012-08-10 10:27:22.000000000 -0700 ++++ jdk/src/share/classes/java/util/logging/Logger.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2012, 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 +@@ -273,13 +273,13 @@ + this.manager = manager; + } + +- private void checkAccess() throws SecurityException { ++ private void checkPermission() throws SecurityException { + if (!anonymous) { + if (manager == null) { + // Complete initialization of the global Logger. + manager = LogManager.getLogManager(); + } +- manager.checkAccess(); ++ manager.checkPermission(); + } + } + +@@ -482,7 +482,7 @@ + * the caller does not have LoggingPermission("control"). + */ + public void setFilter(Filter newFilter) throws SecurityException { +- checkAccess(); ++ checkPermission(); + filter = newFilter; + } + +@@ -1168,7 +1168,7 @@ + * the caller does not have LoggingPermission("control"). + */ + public void setLevel(Level newLevel) throws SecurityException { +- checkAccess(); ++ checkPermission(); + synchronized (treeLock) { + levelObject = newLevel; + updateEffectiveLevel(); +@@ -1223,7 +1223,7 @@ + public void addHandler(Handler handler) throws SecurityException { + // Check for null handler + handler.getClass(); +- checkAccess(); ++ checkPermission(); + handlers.add(handler); + } + +@@ -1237,7 +1237,7 @@ + * the caller does not have LoggingPermission("control"). + */ + public void removeHandler(Handler handler) throws SecurityException { +- checkAccess(); ++ checkPermission(); + if (handler == null) { + return; + } +@@ -1265,7 +1265,7 @@ + * the caller does not have LoggingPermission("control"). + */ + public void setUseParentHandlers(boolean useParentHandlers) { +- checkAccess(); ++ checkPermission(); + this.useParentHandlers = useParentHandlers; + } + +@@ -1405,7 +1405,7 @@ + if (parent == null) { + throw new NullPointerException(); + } +- manager.checkAccess(); ++ manager.checkPermission(); + doSetParent(parent); + } + +--- jdk/src/share/classes/java/util/logging/MemoryHandler.java 2012-08-10 10:27:22.000000000 -0700 ++++ jdk/src/share/classes/java/util/logging/MemoryHandler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -238,7 +238,7 @@ + throw new NullPointerException(); + } + LogManager manager = LogManager.getLogManager(); +- checkAccess(); ++ checkPermission(); + pushLevel = newLevel; + } + +--- jdk/src/share/classes/java/util/logging/StreamHandler.java 2012-08-10 10:27:22.000000000 -0700 ++++ jdk/src/share/classes/java/util/logging/StreamHandler.java 2013-01-16 08:58:10.000000000 -0800 +@@ -249,7 +249,7 @@ + } + + private synchronized void flushAndClose() throws SecurityException { +- checkAccess(); ++ checkPermission(); + if (writer != null) { + try { + if (!doneHeader) { +--- jdk/src/share/classes/javax/crypto/CryptoPermissions.java 2012-08-10 10:27:27.000000000 -0700 ++++ jdk/src/share/classes/javax/crypto/CryptoPermissions.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -30,10 +30,16 @@ + import java.util.Hashtable; + import java.util.Vector; + import java.util.NoSuchElementException; ++import java.util.concurrent.ConcurrentHashMap; + import java.io.Serializable; + import java.io.InputStream; + import java.io.InputStreamReader; + import java.io.BufferedReader; ++import java.io.ObjectStreamField; ++import java.io.ObjectInputStream; ++import java.io.ObjectInputStream.GetField; ++import java.io.ObjectOutputStream; ++import java.io.ObjectOutputStream.PutField; + import java.io.IOException; + + /** +@@ -61,15 +67,24 @@ + + private static final long serialVersionUID = 4946547168093391015L; + +- // This class is similar to java.security.Permissions +- private Hashtable perms; ++ /** ++ * @serialField perms java.util.Hashtable ++ */ ++ private static final ObjectStreamField[] serialPersistentFields = { ++ new ObjectStreamField("perms", Hashtable.class), ++ }; ++ ++ // Switched from Hashtable to ConcurrentHashMap to improve scalability. ++ // To maintain serialization compatibility, this field is made transient ++ // and custom readObject/writeObject methods are used. ++ private transient ConcurrentHashMap<String,PermissionCollection> perms; + + /** + * Creates a new CryptoPermissions object containing + * no CryptoPermissionCollections. + */ + CryptoPermissions() { +- perms = new Hashtable(7); ++ perms = new ConcurrentHashMap<>(7); + } + + /** +@@ -132,9 +147,7 @@ + getPermissionCollection(cryptoPerm); + pc.add(cryptoPerm); + String alg = cryptoPerm.getAlgorithm(); +- if (!perms.containsKey(alg)) { +- perms.put(alg, pc); +- } ++ perms.putIfAbsent(alg, pc); + } + + /** +@@ -382,20 +395,17 @@ + PermissionCollection getPermissionCollection(String alg) { + // If this CryptoPermissions includes CryptoAllPermission, + // we should return CryptoAllPermission. +- if (perms.containsKey(CryptoAllPermission.ALG_NAME)) { +- return +- (PermissionCollection)(perms.get(CryptoAllPermission.ALG_NAME)); +- } +- +- PermissionCollection pc = (PermissionCollection)perms.get(alg); +- +- // If there isn't a PermissionCollection for +- // the given algorithm,we should return the +- // PermissionCollection for the wildcard +- // if there is one. ++ PermissionCollection pc = perms.get(CryptoAllPermission.ALG_NAME); + if (pc == null) { +- pc = (PermissionCollection)perms.get( +- CryptoPermission.ALG_NAME_WILDCARD); ++ pc = perms.get(alg); ++ ++ // If there isn't a PermissionCollection for ++ // the given algorithm,we should return the ++ // PermissionCollection for the wildcard ++ // if there is one. ++ if (pc == null) { ++ pc = perms.get(CryptoPermission.ALG_NAME_WILDCARD); ++ } + } + return pc; + } +@@ -421,6 +431,28 @@ + } + return pc; + } ++ ++ private void readObject(ObjectInputStream s) ++ throws IOException, ClassNotFoundException { ++ ObjectInputStream.GetField fields = s.readFields(); ++ @SuppressWarnings("unchecked") ++ Hashtable<String,PermissionCollection> permTable = ++ (Hashtable<String,PermissionCollection>) ++ (fields.get("perms", null)); ++ if (permTable != null) { ++ perms = new ConcurrentHashMap<>(permTable); ++ } else { ++ perms = new ConcurrentHashMap<>(); ++ } ++ } ++ ++ private void writeObject(ObjectOutputStream s) throws IOException { ++ Hashtable<String,PermissionCollection> permTable = ++ new Hashtable<>(perms); ++ ObjectOutputStream.PutField fields = s.putFields(); ++ fields.put("perms", permTable); ++ s.writeFields(); ++ } + } + + final class PermissionsEnumerator implements Enumeration { +@@ -463,7 +495,6 @@ + } else { + throw new NoSuchElementException("PermissionsEnumerator"); + } +- + } + + private Enumeration getNextEnumWithMore() { +--- jdk/src/share/classes/javax/crypto/JceSecurityManager.java 2012-08-10 10:27:28.000000000 -0700 ++++ jdk/src/share/classes/javax/crypto/JceSecurityManager.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -29,6 +29,8 @@ + import java.net.*; + import java.util.*; + import java.util.jar.*; ++import java.util.concurrent.ConcurrentHashMap; ++import java.util.concurrent.ConcurrentMap; + + /** + * The JCE security manager. +@@ -51,7 +53,10 @@ + private static final CryptoPermissions exemptPolicy; + private static final CryptoAllPermission allPerm; + private static final Vector TrustedCallersCache = new Vector(2); +- private static final Map exemptCache = new HashMap(); ++ private static final ConcurrentMap<URL,CryptoPermissions> exemptCache = ++ new ConcurrentHashMap<>(); ++ private static final CryptoPermissions CACHE_NULL_MARK = ++ new CryptoPermissions(); + + // singleton instance + static final JceSecurityManager INSTANCE; +@@ -116,17 +121,19 @@ + return defaultPerm; + } + +- CryptoPermissions appPerms; +- synchronized (this.getClass()) { +- if (exemptCache.containsKey(callerCodeBase)) { +- appPerms = (CryptoPermissions)exemptCache.get(callerCodeBase); +- } else { +- appPerms = getAppPermissions(callerCodeBase); +- exemptCache.put(callerCodeBase, appPerms); ++ CryptoPermissions appPerms = exemptCache.get(callerCodeBase); ++ if (appPerms == null) { ++ // no match found in cache ++ synchronized (this.getClass()) { ++ appPerms = exemptCache.get(callerCodeBase); ++ if (appPerms == null) { ++ appPerms = getAppPermissions(callerCodeBase); ++ exemptCache.putIfAbsent(callerCodeBase, ++ (appPerms == null? CACHE_NULL_MARK:appPerms)); ++ } + } + } +- +- if (appPerms == null) { ++ if (appPerms == null || appPerms == CACHE_NULL_MARK) { + return defaultPerm; + } + +--- jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java 2012-08-10 10:27:37.000000000 -0700 ++++ jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1245,13 +1245,12 @@ + return s.substring(1, s.length() - 1); + } + final String className = s.substring(1, slash); ++ + final Constructor<?> constr; + try { ++ ReflectUtil.checkPackageAccess(className); + final ClassLoader contextClassLoader = + Thread.currentThread().getContextClassLoader(); +- if (contextClassLoader == null) { +- ReflectUtil.checkPackageAccess(className); +- } + final Class<?> c = + Class.forName(className, false, contextClassLoader); + constr = c.getConstructor(new Class<?>[] {String.class}); +--- jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-08-10 10:27:41.000000000 -0700 ++++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -39,11 +39,17 @@ + import java.rmi.MarshalledObject; + import java.rmi.UnmarshalException; + import java.rmi.server.Unreferenced; ++ + import java.security.AccessControlContext; + import java.security.AccessController; ++import java.security.Permission; ++import java.security.PermissionCollection; ++import java.security.Permissions; + import java.security.PrivilegedAction; + import java.security.PrivilegedActionException; + import java.security.PrivilegedExceptionAction; ++import java.security.ProtectionDomain; ++ + import java.util.Arrays; + import java.util.Collections; + import java.util.Map; +@@ -60,6 +66,7 @@ + import javax.management.MBeanException; + import javax.management.MBeanInfo; + import javax.management.MBeanRegistrationException; ++import javax.management.MBeanPermission; + import javax.management.MBeanServer; + import javax.management.NotCompliantMBeanException; + import javax.management.NotificationFilter; +@@ -143,6 +150,7 @@ + this.mbeanServer = rmiServer.getMBeanServer(); + + final ClassLoader dcl = defaultClassLoader; ++ + this.classLoaderWithRepository = + AccessController.doPrivileged( + new PrivilegedAction<ClassLoaderWithRepository>() { +@@ -151,13 +159,40 @@ + mbeanServer.getClassLoaderRepository(), + dcl); + } ++ }, ++ ++ withPermissions( new MBeanPermission("*", "getClassLoaderRepository"), ++ new RuntimePermission("createClassLoader")) ++ ); ++ ++ ++ this.defaultContextClassLoader = ++ AccessController.doPrivileged( ++ new PrivilegedAction<ClassLoader>() { ++ @Override ++ public ClassLoader run() { ++ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), ++ dcl); ++ } + }); ++ + serverCommunicatorAdmin = new + RMIServerCommunicatorAdmin(EnvHelp.getServerConnectionTimeout(env)); + + this.env = env; + } + ++ private static AccessControlContext withPermissions(Permission ... perms){ ++ Permissions col = new Permissions(); ++ ++ for (Permission thePerm : perms ) { ++ col.add(thePerm); ++ } ++ ++ final ProtectionDomain pd = new ProtectionDomain(null, col); ++ return new AccessControlContext( new ProtectionDomain[] { pd }); ++ } ++ + private synchronized ServerNotifForwarder getServerNotifFwd() { + // Lazily created when first use. Mainly when + // addNotificationListener is first called. +@@ -507,7 +542,7 @@ + "connectionId=" + connectionId + +" unwrapping query with defaultClassLoader."); + +- queryValue = unwrap(query, defaultClassLoader, QueryExp.class); ++ queryValue = unwrap(query, defaultContextClassLoader, QueryExp.class); + + try { + final Object params[] = new Object[] { name, queryValue }; +@@ -542,7 +577,7 @@ + "connectionId=" + connectionId + +" unwrapping query with defaultClassLoader."); + +- queryValue = unwrap(query, defaultClassLoader, QueryExp.class); ++ queryValue = unwrap(query, defaultContextClassLoader, QueryExp.class); + + try { + final Object params[] = new Object[] { name, queryValue }; +@@ -1330,7 +1365,9 @@ + public ClassLoader run() throws InstanceNotFoundException { + return mbeanServer.getClassLoader(name); + } +- }); ++ }, ++ withPermissions(new MBeanPermission("*", "getClassLoader")) ++ ); + } catch (PrivilegedActionException pe) { + throw (InstanceNotFoundException) extractException(pe); + } +@@ -1345,7 +1382,9 @@ + public Object run() throws InstanceNotFoundException { + return mbeanServer.getClassLoaderFor(name); + } +- }); ++ }, ++ withPermissions(new MBeanPermission("*", "getClassLoaderFor")) ++ ); + } catch (PrivilegedActionException pe) { + throw (InstanceNotFoundException) extractException(pe); + } +@@ -1572,7 +1611,8 @@ + ClassLoader orderCL = AccessController.doPrivileged( + new PrivilegedExceptionAction<ClassLoader>() { + public ClassLoader run() throws Exception { +- return new OrderClassLoaders(cl1, cl2); ++ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), ++ new OrderClassLoaders(cl1, cl2)); + } + } + ); +@@ -1664,6 +1704,8 @@ + + private final ClassLoader defaultClassLoader; + ++ private final ClassLoader defaultContextClassLoader; ++ + private final ClassLoaderWithRepository classLoaderWithRepository; + + private boolean terminated = false; +@@ -1746,4 +1788,43 @@ + + private static final ClassLogger logger = + new ClassLogger("javax.management.remote.rmi", "RMIConnectionImpl"); ++ ++ private static final class CombinedClassLoader extends ClassLoader { ++ ++ private final static class ClassLoaderWrapper extends ClassLoader { ++ ClassLoaderWrapper(ClassLoader cl) { ++ super(cl); ++ } ++ ++ @Override ++ protected Class<?> loadClass(String name, boolean resolve) ++ throws ClassNotFoundException { ++ return super.loadClass(name, resolve); ++ } ++ }; ++ ++ final ClassLoaderWrapper defaultCL; ++ ++ private CombinedClassLoader(ClassLoader parent, ClassLoader defaultCL) { ++ super(parent); ++ this.defaultCL = new ClassLoaderWrapper(defaultCL); ++ } ++ ++ @Override ++ protected Class<?> loadClass(String name, boolean resolve) ++ throws ClassNotFoundException { ++ try { ++ super.loadClass(name, resolve); ++ } catch(Exception e) { ++ for(Throwable t = e; t != null; t = t.getCause()) { ++ if(t instanceof SecurityException) { ++ throw t==e?(SecurityException)t:new SecurityException(t.getMessage(), e); ++ } ++ } ++ } ++ final Class<?> cl = defaultCL.loadClass(name, resolve); ++ return cl; ++ } ++ ++ } + } +--- jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2012-08-10 10:27:41.000000000 -0700 ++++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2013-01-16 08:58:10.000000000 -0800 +@@ -277,9 +277,9 @@ + // Check for secure RMIServer stub if the corresponding + // client-side environment property is set to "true". + // +- boolean checkStub = EnvHelp.computeBooleanFromString( +- usemap, +- "jmx.remote.x.check.stub",false); ++ String stringBoolean = (String) usemap.get("jmx.remote.x.check.stub"); ++ boolean checkStub = EnvHelp.computeBooleanFromString(stringBoolean); ++ + if (checkStub) checkStub(stub, rmiServerImplStubClass); + + // Connect IIOP Stub if needed. +--- jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java 2012-08-10 10:27:41.000000000 -0700 ++++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java 2013-01-16 08:58:10.000000000 -0800 +@@ -412,9 +412,8 @@ + if (tracing) + logger.trace("start", "Using external directory: " + jndiUrl); + +- final boolean rebind = EnvHelp.computeBooleanFromString( +- attributes, +- JNDI_REBIND_ATTRIBUTE,false); ++ String stringBoolean = (String) attributes.get(JNDI_REBIND_ATTRIBUTE); ++ final boolean rebind = EnvHelp.computeBooleanFromString( stringBoolean ); + + if (tracing) + logger.trace("start", JNDI_REBIND_ATTRIBUTE + "=" + rebind); +--- jdk/src/share/classes/javax/swing/AncestorNotifier.java 2012-08-10 10:27:55.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/AncestorNotifier.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -44,7 +44,7 @@ + + class AncestorNotifier implements ComponentListener, PropertyChangeListener, Serializable + { +- Component firstInvisibleAncestor; ++ transient Component firstInvisibleAncestor; + EventListenerList listenerList = new EventListenerList(); + JComponent root; + +--- jdk/src/share/classes/javax/swing/ClientPropertyKey.java 2012-08-10 10:27:55.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/ClientPropertyKey.java 2013-01-16 08:58:10.000000000 -0800 +@@ -25,6 +25,8 @@ + + package javax.swing; + ++import sun.awt.AWTAccessor; ++ + /** + * An enumeration for keys used as client properties within the Swing + * implementation. +@@ -86,6 +88,15 @@ + */ + private final boolean reportValueNotSerializable; + ++ static { ++ AWTAccessor.setClientPropertyKeyAccessor( ++ new AWTAccessor.ClientPropertyKeyAccessor() { ++ public Object getJComponent_TRANSFER_HANDLER() { ++ return JComponent_TRANSFER_HANDLER; ++ } ++ }); ++ } ++ + /** + * Constructs a key with the {@code reportValueNotSerializable} property + * set to {@code false}. --- jdk/src/share/classes/javax/swing/JComponent.java 2012-08-10 10:27:56.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/JComponent.java 2012-08-19 12:39:54.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/JComponent.java 2013-01-16 00:07:09.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. @@ -7253,7 +15724,7 @@ - } --- jdk/src/share/classes/javax/swing/JViewport.java 2012-08-10 10:27:59.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/JViewport.java 2012-08-19 12:39:54.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/JViewport.java 2013-01-16 00:07:09.000000000 -0800 @@ -1586,18 +1586,10 @@ int bdx = blitToX - blitFromX; int bdy = blitToY - blitFromY; @@ -7275,7 +15746,7 @@ int x = view.getX(); int y = view.getY(); --- jdk/src/share/classes/javax/swing/RepaintManager.java 2012-08-10 10:28:00.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/RepaintManager.java 2012-08-19 12:39:54.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/RepaintManager.java 2013-01-16 00:07:09.000000000 -0800 @@ -119,11 +119,6 @@ // Whether or not a VolatileImage should be used for double-buffered painting static boolean volatileImageBufferEnabled = true; @@ -7341,7 +15812,7 @@ } } --- jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2012-08-10 10:28:13.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2012-08-19 12:39:54.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2013-01-16 00:07:10.000000000 -0800 @@ -403,10 +403,6 @@ * @see MouseListener#mouseClicked */ @@ -7353,8 +15824,726 @@ int nclicks = SwingUtilities2.getAdjustedClickCount(getComponent(), e); if (! e.isConsumed()) { +--- jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2012-08-10 10:28:13.000000000 -0700 ++++ jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2013-01-16 08:58:10.000000000 -0800 +@@ -24,6 +24,8 @@ + */ + package javax.swing.text; + ++import sun.reflect.misc.ConstructorUtil; ++ + import java.io.Serializable; + import java.lang.reflect.*; + import java.text.ParseException; +@@ -245,7 +247,7 @@ + Constructor cons; + + try { +- cons = vc.getConstructor(new Class[] { String.class }); ++ cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class}); + + } catch (NoSuchMethodException nsme) { + cons = null; +--- jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-08-10 10:28:23.000000000 -0700 ++++ jdk/src/share/classes/sun/awt/AWTAccessor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -27,17 +27,18 @@ + + import java.awt.*; + import java.awt.KeyboardFocusManager; ++import java.awt.DefaultKeyboardFocusManager; + import java.awt.event.InputEvent; ++import java.awt.event.KeyEvent; + import java.awt.geom.Point2D; +-import java.awt.image.BufferedImage; + + import sun.misc.Unsafe; + import java.awt.peer.ComponentPeer; + +-import java.security.AccessController; + import java.security.AccessControlContext; + + import java.io.File; ++import java.util.Vector; + + /** + * The AWTAccessor utility class. +@@ -317,7 +318,7 @@ + void setTrayIconWindow(Window w, boolean isTrayIconWindow); + } + +- /* ++ /** + * An accessor for the AWTEvent class. + */ + public interface AWTEventAccessor { +@@ -337,12 +338,20 @@ + */ + boolean isSystemGenerated(AWTEvent ev); + +- +- /* ++ /** + * Returns the acc this event was constructed with. + */ + AccessControlContext getAccessControlContext(AWTEvent ev); + ++ /** ++ * Returns binary data associated with this event; ++ */ ++ byte[] getBData(AWTEvent ev); ++ ++ /** ++ * Associates binary data with this event; ++ */ ++ void setBData(AWTEvent ev, byte[] bdata); + } + + public interface InputEventAccessor { +@@ -370,11 +379,11 @@ + Rectangle getMaximizedBounds(Frame frame); + } + +- /* ++ /** + * An interface of accessor for the java.awt.KeyboardFocusManager class. + */ + public interface KeyboardFocusManagerAccessor { +- /* ++ /** + * Indicates whether the native implementation should + * proceed with a pending focus request for the heavyweight. + */ +@@ -384,7 +393,7 @@ + boolean focusedWindowChangeAllowed, + long time, + CausedFocusEvent.Cause cause); +- /* ++ /** + * Delivers focus for the lightweight descendant of the heavyweight + * synchronously. + */ +@@ -393,23 +402,28 @@ + boolean temporary, + boolean focusedWindowChangeAllowed, + long time); +- /* ++ /** + * Removes the last focus request for the heavyweight from the queue. + */ + void removeLastFocusRequest(Component heavyweight); + +- /* ++ /** + * Sets the most recent focus owner in the window. + */ + void setMostRecentFocusOwner(Window window, Component component); + +- /* ++ /** + * Returns current KFM of the specified AppContext. + */ + KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx); ++ ++ /** ++ * Return the current focus cycle root ++ */ ++ Container getCurrentFocusCycleRoot(); + } + +- /* ++ /** + * An accessor for the MenuComponent class. + */ + public interface MenuComponentAccessor { +@@ -427,20 +441,42 @@ + * Returns the menu container of the menu component + */ + MenuContainer getParent(MenuComponent menuComp); ++ ++ /** ++ * Gets the font used for this menu component. ++ */ ++ Font getFont_NoClientCode(MenuComponent menuComp); + } + +- /* ++ /** + * An accessor for the EventQueue class + */ + public interface EventQueueAccessor { +- /* ++ /** + * Gets the event dispatch thread. + */ + Thread getDispatchThread(EventQueue eventQueue); +- /* ++ ++ /** + * Checks if the current thread is EDT for the given EQ. + */ + public boolean isDispatchThreadImpl(EventQueue eventQueue); ++ ++ /** ++ * Removes any pending events for the specified source object. ++ */ ++ void removeSourceEvents(EventQueue eventQueue, Object source, boolean removeAllEvents); ++ ++ /** ++ * Returns whether an event is pending on any of the separate Queues. ++ */ ++ boolean noEvents(EventQueue eventQueue); ++ ++ /** ++ * Called from PostEventQueue.postEvent to notify that a new event ++ * appeared. ++ */ ++ void wakeup(EventQueue eventQueue, boolean isShutdown); + } + + /* +@@ -478,6 +514,174 @@ + boolean isMultipleMode(FileDialog fileDialog); + } + ++ /** ++ * An accessor for the ScrollPaneAdjustable class. ++ */ ++ public interface ScrollPaneAdjustableAccessor { ++ /** ++ * Sets the value of this scrollbar to the specified value. ++ */ ++ void setTypedValue(final ScrollPaneAdjustable adj, final int v, ++ final int type); ++ } ++ ++ /** ++ * An accessor for the CheckboxMenuItem class ++ */ ++ public interface CheckboxMenuItemAccessor { ++ /** ++ * Returns whether menu item is checked ++ */ ++ boolean getState(CheckboxMenuItem cmi); ++ } ++ ++ /** ++ * An accessor for the Cursor class ++ */ ++ public interface CursorAccessor { ++ /** ++ * Returns pData of the Cursor class ++ */ ++ long getPData(Cursor cursor); ++ ++ /** ++ * Sets pData to the Cursor class ++ */ ++ void setPData(Cursor cursor, long pData); ++ ++ /** ++ * Return type of the Cursor class ++ */ ++ int getType(Cursor cursor); ++ } ++ ++ /** ++ * An accessor for the MenuBar class ++ */ ++ public interface MenuBarAccessor { ++ /** ++ * Returns help menu ++ */ ++ Menu getHelpMenu(MenuBar menuBar); ++ ++ /** ++ * Returns menus ++ */ ++ Vector getMenus(MenuBar menuBar); ++ } ++ ++ /** ++ * An accessor for the MenuItem class ++ */ ++ public interface MenuItemAccessor { ++ /** ++ * Returns whether menu item is enabled ++ */ ++ boolean isEnabled(MenuItem item); ++ ++ /** ++ * Gets the command name of the action event that is fired ++ * by this menu item. ++ */ ++ String getActionCommandImpl(MenuItem item); ++ ++ /** ++ * Returns true if the item and all its ancestors are ++ * enabled, false otherwise ++ */ ++ boolean isItemEnabled(MenuItem item); ++ ++ /** ++ * Returns label ++ */ ++ String getLabel(MenuItem item); ++ ++ /** ++ * Returns shortcut ++ */ ++ MenuShortcut getShortcut(MenuItem item); ++ } ++ ++ /** ++ * An accessor for the Menu class ++ */ ++ public interface MenuAccessor { ++ /** ++ * Returns vector of the items that are part of the Menu ++ */ ++ Vector getItems(Menu menu); ++ } ++ ++ /** ++ * An accessor for the KeyEvent class ++ */ ++ public interface KeyEventAccessor { ++ /** ++ * Sets rawCode field for KeyEvent ++ */ ++ void setRawCode(KeyEvent ev, long rawCode); ++ ++ /** ++ * Sets primaryLevelUnicode field for KeyEvent ++ */ ++ void setPrimaryLevelUnicode(KeyEvent ev, long primaryLevelUnicode); ++ ++ /** ++ * Sets extendedKeyCode field for KeyEvent ++ */ ++ void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode); ++ } ++ ++ /** ++ * An accessor for the ClientPropertyKey class ++ */ ++ public interface ClientPropertyKeyAccessor { ++ /** ++ * Retrieves JComponent_TRANSFER_HANDLER enum object ++ */ ++ Object getJComponent_TRANSFER_HANDLER(); ++ } ++ ++ /** ++ * An accessor for the SystemTray class ++ */ ++ public interface SystemTrayAccessor { ++ /** ++ * Support for reporting bound property changes for Object properties. ++ */ ++ void firePropertyChange(SystemTray tray, String propertyName, Object oldValue, Object newValue); ++ } ++ ++ /** ++ * An accessor for the TrayIcon class ++ */ ++ public interface TrayIconAccessor { ++ void addNotify(TrayIcon trayIcon) throws AWTException; ++ void removeNotify(TrayIcon trayIcon); ++ } ++ ++ /** ++ * An accessor for the DefaultKeyboardFocusManager class ++ */ ++ public interface DefaultKeyboardFocusManagerAccessor { ++ public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e); ++ } ++ ++ /* ++ * An accessor for the SequencedEventAccessor class ++ */ ++ public interface SequencedEventAccessor { ++ /* ++ * Returns the nested event. ++ */ ++ AWTEvent getNested(AWTEvent sequencedEvent); ++ ++ /* ++ * Returns true if the event is an instances of SequencedEvent. ++ */ ++ boolean isSequencedEvent(AWTEvent event); ++ } ++ + /* + * Accessor instances are initialized in the static initializers of + * corresponding AWT classes by using setters defined below. +@@ -493,6 +697,18 @@ + private static EventQueueAccessor eventQueueAccessor; + private static PopupMenuAccessor popupMenuAccessor; + private static FileDialogAccessor fileDialogAccessor; ++ private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor; ++ private static CheckboxMenuItemAccessor checkboxMenuItemAccessor; ++ private static CursorAccessor cursorAccessor; ++ private static MenuBarAccessor menuBarAccessor; ++ private static MenuItemAccessor menuItemAccessor; ++ private static MenuAccessor menuAccessor; ++ private static KeyEventAccessor keyEventAccessor; ++ private static ClientPropertyKeyAccessor clientPropertyKeyAccessor; ++ private static SystemTrayAccessor systemTrayAccessor; ++ private static TrayIconAccessor trayIconAccessor; ++ private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor; ++ private static SequencedEventAccessor sequencedEventAccessor; + + /* + * Set an accessor object for the java.awt.Component class. +@@ -683,4 +899,208 @@ + return fileDialogAccessor; + } + ++ /** ++ * Set an accessor object for the java.awt.ScrollPaneAdjustable class. ++ */ ++ public static void setScrollPaneAdjustableAccessor(ScrollPaneAdjustableAccessor adj) { ++ scrollPaneAdjustableAccessor = adj; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.ScrollPaneAdjustable ++ * class. ++ */ ++ public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() { ++ if (scrollPaneAdjustableAccessor == null) { ++ unsafe.ensureClassInitialized(ScrollPaneAdjustable.class); ++ } ++ return scrollPaneAdjustableAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.CheckboxMenuItem class. ++ */ ++ public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) { ++ checkboxMenuItemAccessor = cmia; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.CheckboxMenuItem class. ++ */ ++ public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() { ++ if (checkboxMenuItemAccessor == null) { ++ unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class); ++ } ++ return checkboxMenuItemAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.Cursor class. ++ */ ++ public static void setCursorAccessor(CursorAccessor ca) { ++ cursorAccessor = ca; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.Cursor class. ++ */ ++ public static CursorAccessor getCursorAccessor() { ++ if (cursorAccessor == null) { ++ unsafe.ensureClassInitialized(CursorAccessor.class); ++ } ++ return cursorAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.MenuBar class. ++ */ ++ public static void setMenuBarAccessor(MenuBarAccessor mba) { ++ menuBarAccessor = mba; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.MenuBar class. ++ */ ++ public static MenuBarAccessor getMenuBarAccessor() { ++ if (menuBarAccessor == null) { ++ unsafe.ensureClassInitialized(MenuBarAccessor.class); ++ } ++ return menuBarAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.MenuItem class. ++ */ ++ public static void setMenuItemAccessor(MenuItemAccessor mia) { ++ menuItemAccessor = mia; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.MenuItem class. ++ */ ++ public static MenuItemAccessor getMenuItemAccessor() { ++ if (menuItemAccessor == null) { ++ unsafe.ensureClassInitialized(MenuItemAccessor.class); ++ } ++ return menuItemAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.Menu class. ++ */ ++ public static void setMenuAccessor(MenuAccessor ma) { ++ menuAccessor = ma; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.Menu class. ++ */ ++ public static MenuAccessor getMenuAccessor() { ++ if (menuAccessor == null) { ++ unsafe.ensureClassInitialized(MenuAccessor.class); ++ } ++ return menuAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.event.KeyEvent class. ++ */ ++ public static void setKeyEventAccessor(KeyEventAccessor kea) { ++ keyEventAccessor = kea; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.event.KeyEvent class. ++ */ ++ public static KeyEventAccessor getKeyEventAccessor() { ++ if (keyEventAccessor == null) { ++ unsafe.ensureClassInitialized(KeyEventAccessor.class); ++ } ++ return keyEventAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the javax.swing.ClientPropertyKey class. ++ */ ++ public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) { ++ clientPropertyKeyAccessor = cpka; ++ } ++ ++ /** ++ * Retrieve the accessor object for the javax.swing.ClientPropertyKey class. ++ */ ++ public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() { ++ if (clientPropertyKeyAccessor == null) { ++ unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class); ++ } ++ return clientPropertyKeyAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.SystemTray class. ++ */ ++ public static void setSystemTrayAccessor(SystemTrayAccessor sta) { ++ systemTrayAccessor = sta; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.SystemTray class. ++ */ ++ public static SystemTrayAccessor getSystemTrayAccessor() { ++ if (systemTrayAccessor == null) { ++ unsafe.ensureClassInitialized(SystemTrayAccessor.class); ++ } ++ return systemTrayAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.TrayIcon class. ++ */ ++ public static void setTrayIconAccessor(TrayIconAccessor tia) { ++ trayIconAccessor = tia; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.TrayIcon class. ++ */ ++ public static TrayIconAccessor getTrayIconAccessor() { ++ if (trayIconAccessor == null) { ++ unsafe.ensureClassInitialized(TrayIconAccessor.class); ++ } ++ return trayIconAccessor; ++ } ++ ++ /** ++ * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class. ++ */ ++ public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) { ++ defaultKeyboardFocusManagerAccessor = dkfma; ++ } ++ ++ /** ++ * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class. ++ */ ++ public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() { ++ if (defaultKeyboardFocusManagerAccessor == null) { ++ unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class); ++ } ++ return defaultKeyboardFocusManagerAccessor; ++ } ++ ++ /* ++ * Set an accessor object for the java.awt.SequencedEvent class. ++ */ ++ public static void setSequencedEventAccessor(SequencedEventAccessor sea) { ++ sequencedEventAccessor = sea; ++ } ++ ++ /* ++ * Get the accessor object for the java.awt.SequencedEvent class. ++ */ ++ public static SequencedEventAccessor getSequencedEventAccessor() { ++ // The class is not public. So we can't ensure it's initialized. ++ // Null returned value means it's not initialized ++ // (so not a single instance of the event has been created). ++ return sequencedEventAccessor; ++ } + } +--- jdk/src/share/classes/sun/awt/AppContext.java 2012-08-10 10:28:23.000000000 -0700 ++++ jdk/src/share/classes/sun/awt/AppContext.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2012, 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 +@@ -787,6 +787,27 @@ + } + return changeSupport.getPropertyChangeListeners(propertyName); + } ++ ++ // Set up JavaAWTAccess in SharedSecrets ++ static { ++ sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() { ++ public Object get(Object key) { ++ return getAppContext().get(key); ++ } ++ public void put(Object key, Object value) { ++ getAppContext().put(key, value); ++ } ++ public void remove(Object key) { ++ getAppContext().remove(key); ++ } ++ public boolean isDisposed() { ++ return getAppContext().isDisposed(); ++ } ++ public boolean isMainAppContext() { ++ return (numAppContexts == 1); ++ } ++ }); ++ } + } + + final class MostRecentKeyValue { +--- jdk/src/share/classes/sun/awt/EmbeddedFrame.java 2012-08-10 10:28:23.000000000 -0700 ++++ jdk/src/share/classes/sun/awt/EmbeddedFrame.java 2013-01-16 08:58:10.000000000 -0800 +@@ -29,12 +29,6 @@ + import java.awt.event.*; + import java.awt.image.*; + import java.awt.peer.*; +-import java.security.AccessController; +-import java.security.PrivilegedAction; +-import java.lang.reflect.Constructor; +-import java.lang.reflect.InvocationTargetException; +-import java.lang.reflect.Modifier; +-import java.lang.reflect.Field; + import java.beans.PropertyChangeListener; + import java.beans.PropertyChangeEvent; + import java.util.Set; +@@ -63,8 +57,6 @@ + implements KeyEventDispatcher, PropertyChangeListener { + + private boolean isCursorAllowed = true; +- private static Field fieldPeer; +- private static Field currentCycleRoot; + private boolean supportsXEmbed = false; + private KeyboardFocusManager appletKFM; + // JDK 1.1 compatibility +@@ -208,39 +200,8 @@ + */ + public boolean dispatchKeyEvent(KeyEvent e) { + +- // We can't guarantee that this is called on the same AppContext as EmbeddedFrame +- // belongs to. That's why we can't use public methods to find current focus cycle +- // root. Instead, we access KFM's private field directly. +- if (currentCycleRoot == null) { +- currentCycleRoot = (Field)AccessController.doPrivileged(new PrivilegedAction() { +- public Object run() { +- try { +- Field unaccessibleRoot = KeyboardFocusManager.class. +- getDeclaredField("currentFocusCycleRoot"); +- if (unaccessibleRoot != null) { +- unaccessibleRoot.setAccessible(true); +- } +- return unaccessibleRoot; +- } catch (NoSuchFieldException e1) { +- assert false; +- } catch (SecurityException e2) { +- assert false; +- } +- return null; +- } +- }); +- } +- +- Container currentRoot = null; +- if (currentCycleRoot != null) { +- try { +- // The field is static, so we can pass null to Field.get() as the argument. +- currentRoot = (Container)currentCycleRoot.get(null); +- } catch (IllegalAccessException e3) { +- // This is impossible: currentCycleRoot would be null if setAccessible failed. +- assert false; +- } +- } ++ Container currentRoot = AWTAccessor.getKeyboardFocusManagerAccessor() ++ .getCurrentFocusCycleRoot(); + + // if we are not in EmbeddedFrame's cycle, we should not try to leave. + if (this != currentRoot) { +@@ -381,32 +342,8 @@ + } + + protected void setPeer(final ComponentPeer p){ +- if (fieldPeer == null) { +- fieldPeer = (Field)AccessController.doPrivileged(new PrivilegedAction() { +- public Object run() { +- try { +- Field lnkPeer = Component.class.getDeclaredField("peer"); +- if (lnkPeer != null) { +- lnkPeer.setAccessible(true); +- } +- return lnkPeer; +- } catch (NoSuchFieldException e) { +- assert false; +- } catch (SecurityException e) { +- assert false; +- } +- return null; +- }//run +- }); +- } +- try{ +- if (fieldPeer !=null){ +- fieldPeer.set(EmbeddedFrame.this, p); +- } +- } catch (IllegalAccessException e) { +- assert false; +- } +- }; //setPeer method ends ++ AWTAccessor.getComponentAccessor().setPeer(EmbeddedFrame.this, p); ++ }; + + /** + * Synthesize native message to activate or deactivate EmbeddedFrame window --- jdk/src/share/classes/sun/awt/FontConfiguration.java 2012-08-10 10:28:23.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2012-08-19 12:39:55.000000000 -0700 ++++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2013-01-16 08:58:15.000000000 -0800 @@ -1146,7 +1146,7 @@ */ HashMap<String, Boolean> existsMap; @@ -7365,7 +16554,7 @@ } else if (existsMap == null) { existsMap = new HashMap<String, Boolean>(); --- jdk/src/share/classes/sun/awt/OSInfo.java 2012-08-10 10:28:24.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/OSInfo.java 2012-08-19 12:39:55.000000000 -0700 ++++ jdk/src/share/classes/sun/awt/OSInfo.java 2013-01-16 08:58:15.000000000 -0800 @@ -39,6 +39,7 @@ WINDOWS, LINUX, @@ -7386,8 +16575,269 @@ return MACOSX; } --- jdk/src/share/classes/sun/awt/SunToolkit.java 2012-08-10 10:28:24.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/SunToolkit.java 2012-08-19 12:39:55.000000000 -0700 -@@ -1976,13 +1976,6 @@ ++++ jdk/src/share/classes/sun/awt/SunToolkit.java 2013-01-16 08:58:10.000000000 -0800 +@@ -51,14 +51,8 @@ + import sun.awt.image.*; + import sun.security.action.GetPropertyAction; + import sun.security.action.GetBooleanAction; +-import java.lang.reflect.Field; +-import java.lang.reflect.Method; +-import java.lang.reflect.Constructor; + import java.lang.reflect.InvocationTargetException; + import java.security.AccessController; +-import java.security.PrivilegedAction; +-import java.security.PrivilegedActionException; +-import java.security.PrivilegedExceptionAction; + + public abstract class SunToolkit extends Toolkit + implements WindowClosingSupport, WindowClosingListener, +@@ -80,7 +74,6 @@ + */ + public static final int GRAB_EVENT_MASK = 0x80000000; + +- private static Method wakeupMethod; + /* The key to put()/get() the PostEventQueue into/from the AppContext. + */ + private static final String POST_EVENT_QUEUE_KEY = "PostEventQueue"; +@@ -294,52 +287,8 @@ + return appContext; + } + +- public static Field getField(final Class klass, final String fieldName) { +- return AccessController.doPrivileged(new PrivilegedAction<Field>() { +- public Field run() { +- try { +- Field field = klass.getDeclaredField(fieldName); +- assert (field != null); +- field.setAccessible(true); +- return field; +- } catch (SecurityException e) { +- assert false; +- } catch (NoSuchFieldException e) { +- assert false; +- } +- return null; +- }//run +- }); +- } +- + static void wakeupEventQueue(EventQueue q, boolean isShutdown){ +- if (wakeupMethod == null){ +- wakeupMethod = (Method)AccessController.doPrivileged(new PrivilegedAction(){ +- public Object run(){ +- try { +- Method method = EventQueue.class.getDeclaredMethod("wakeup",new Class [] {Boolean.TYPE} ); +- if (method != null) { +- method.setAccessible(true); +- } +- return method; +- } catch (NoSuchMethodException e) { +- assert false; +- } catch (SecurityException e) { +- assert false; +- } +- return null; +- }//run +- }); +- } +- try{ +- if (wakeupMethod != null){ +- wakeupMethod.invoke(q, new Object[]{Boolean.valueOf(isShutdown)}); +- } +- } catch (InvocationTargetException e){ +- assert false; +- } catch (IllegalAccessException e) { +- assert false; +- } ++ AWTAccessor.getEventQueueAccessor().wakeup(q, isShutdown); + } + + /* +@@ -513,6 +462,19 @@ + if (event == null) { + throw new NullPointerException(); + } ++ ++ AWTAccessor.SequencedEventAccessor sea = AWTAccessor.getSequencedEventAccessor(); ++ if (sea != null && sea.isSequencedEvent(event)) { ++ AWTEvent nested = sea.getNested(event); ++ if (nested.getID() == WindowEvent.WINDOW_LOST_FOCUS && ++ nested instanceof TimedWindowEvent) ++ { ++ TimedWindowEvent twe = (TimedWindowEvent)nested; ++ ((SunToolkit)Toolkit.getDefaultToolkit()). ++ setWindowDeactivationTime((Window)twe.getSource(), twe.getWhen()); ++ } ++ } ++ + // All events posted via this method are system-generated. + // Placing the following call here reduces considerably the + // number of places throughout the toolkit that would +@@ -556,15 +518,19 @@ + // Don't call flushPendingEvents() recursively + if (!isFlushingPendingEvents) { + isFlushingPendingEvents = true; +- AppContext appContext = AppContext.getAppContext(); +- PostEventQueue postEventQueue = +- (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY); +- if (postEventQueue != null) { +- postEventQueue.flush(); ++ try { ++ AppContext appContext = AppContext.getAppContext(); ++ PostEventQueue postEventQueue = ++ (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY); ++ if (postEventQueue != null) { ++ postEventQueue.flush(); ++ } ++ } ++ finally { ++ isFlushingPendingEvents = false; + } + } + } finally { +- isFlushingPendingEvents = false; + flushLock.unlock(); + } + } +@@ -1455,22 +1421,6 @@ + || comp instanceof Window); + } + +- public static Method getMethod(final Class clz, final String methodName, final Class[] params) { +- Method res = null; +- try { +- res = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() { +- public Method run() throws Exception { +- Method m = clz.getDeclaredMethod(methodName, params); +- m.setAccessible(true); +- return m; +- } +- }); +- } catch (PrivilegedActionException ex) { +- ex.printStackTrace(); +- } +- return res; +- } +- + public static class OperationTimedOut extends RuntimeException { + public OperationTimedOut(String msg) { + super(msg); +@@ -1613,21 +1563,9 @@ + private boolean queueEmpty = false; + private final Object waitLock = "Wait Lock"; + +- static Method eqNoEvents; +- + private boolean isEQEmpty() { + EventQueue queue = getSystemEventQueueImpl(); +- synchronized(SunToolkit.class) { +- if (eqNoEvents == null) { +- eqNoEvents = getMethod(java.awt.EventQueue.class, "noEvents", null); +- } +- } +- try { +- return (Boolean)eqNoEvents.invoke(queue); +- } catch (Exception e) { +- e.printStackTrace(); +- return false; +- } ++ return AWTAccessor.getEventQueueAccessor().noEvents(queue); + } + + /** +@@ -1882,20 +1820,14 @@ + * consumeNextKeyTyped() method is not currently used, + * however Swing could use it in the future. + */ +- private static Method consumeNextKeyTypedMethod = null; + public static synchronized void consumeNextKeyTyped(KeyEvent keyEvent) { +- if (consumeNextKeyTypedMethod == null) { +- consumeNextKeyTypedMethod = getMethod(DefaultKeyboardFocusManager.class, +- "consumeNextKeyTyped", +- new Class[] {KeyEvent.class}); +- } + try { +- consumeNextKeyTypedMethod.invoke(KeyboardFocusManager.getCurrentKeyboardFocusManager(), +- keyEvent); +- } catch (IllegalAccessException iae) { +- iae.printStackTrace(); +- } catch (InvocationTargetException ite) { +- ite.printStackTrace(); ++ AWTAccessor.getDefaultKeyboardFocusManagerAccessor().consumeNextKeyTyped( ++ (DefaultKeyboardFocusManager)KeyboardFocusManager. ++ getCurrentKeyboardFocusManager(), ++ keyEvent); ++ } catch (ClassCastException cce) { ++ cce.printStackTrace(); + } + } + +@@ -1915,25 +1847,6 @@ + return (Window)comp; + } + +- /** +- * Returns the value of the system property indicated by the specified key. +- */ +- public static String getSystemProperty(final String key) { +- return (String)AccessController.doPrivileged(new PrivilegedAction() { +- public Object run() { +- return System.getProperty(key); +- } +- }); +- } +- +- /** +- * Returns the boolean value of the system property indicated by the specified key. +- */ +- protected static Boolean getBooleanSystemProperty(String key) { +- return Boolean.valueOf(AccessController. +- doPrivileged(new GetBooleanAction(key))); +- } +- + private static Boolean sunAwtDisableMixing = null; + + /** +@@ -1942,7 +1855,8 @@ + */ + public synchronized static boolean getSunAwtDisableMixing() { + if (sunAwtDisableMixing == null) { +- sunAwtDisableMixing = getBooleanSystemProperty("sun.awt.disableMixing"); ++ sunAwtDisableMixing = AccessController.doPrivileged( ++ new GetBooleanAction("sun.awt.disableMixing")); + } + return sunAwtDisableMixing.booleanValue(); + } +@@ -1956,6 +1870,28 @@ + return false; + } + ++ private static final Object DEACTIVATION_TIMES_MAP_KEY = new Object(); ++ ++ public synchronized void setWindowDeactivationTime(Window w, long time) { ++ AppContext ctx = getAppContext(w); ++ WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY); ++ if (map == null) { ++ map = new WeakHashMap<Window, Long>(); ++ ctx.put(DEACTIVATION_TIMES_MAP_KEY, map); ++ } ++ map.put(w, time); ++ } ++ ++ public synchronized long getWindowDeactivationTime(Window w) { ++ AppContext ctx = getAppContext(w); ++ WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY); ++ if (map == null) { ++ return -1; ++ } ++ Long time = map.get(w); ++ return time == null ? -1 : time; ++ } ++ + // Cosntant alpha + public boolean isWindowOpacitySupported() { + return false; +@@ -1976,13 +1912,6 @@ } /** @@ -7401,57 +16851,1086 @@ * Returns whether or not a containing top level window for the passed * component is * {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT PERPIXEL_TRANSLUCENT}. -@@ -2103,41 +2096,25 @@ - private EventQueueItem queueTail = null; - private final EventQueue eventQueue; +--- jdk/src/share/classes/sun/awt/TextureSizeConstraining.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/sun/awt/TextureSizeConstraining.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,45 @@ ++/* ++ * Copyright (c) 2012, 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 sun.awt; ++ ++/** ++ * A GraphicsConfiguration implements the TextureSizeConstraining ++ * interface to indicate that it imposes certain limitations on the ++ * maximum size of supported textures. ++ */ ++public interface TextureSizeConstraining { ++ ++ /** ++ * Returns the maximum width of any texture image. ++ */ ++ public int getMaxTextureWidth(); ++ ++ /** ++ * Returns the maximum height of any texture image. ++ */ ++ public int getMaxTextureHeight(); ++ ++} +--- jdk/src/share/classes/sun/awt/TimedWindowEvent.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/sun/awt/TimedWindowEvent.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,51 @@ ++/* ++ * Copyright (c) 2012, 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 sun.awt; ++ ++import java.awt.event.WindowEvent; ++import java.awt.Window; ++ ++public class TimedWindowEvent extends WindowEvent { ++ ++ private long time; ++ ++ public long getWhen() { ++ return time; ++ } ++ ++ public TimedWindowEvent(Window source, int id, Window opposite, long time) { ++ super(source, id, opposite); ++ this.time = time; ++ } ++ ++ public TimedWindowEvent(Window source, int id, Window opposite, ++ int oldState, int newState, long time) ++ { ++ super(source, id, opposite, oldState, newState); ++ this.time = time; ++ } ++} ++ +--- jdk/src/share/classes/sun/beans/editors/BooleanEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/BooleanEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,51 +26,7 @@ + package sun.beans.editors; -- // For the case when queue is cleared but events are not posted -- private volatile boolean isFlushing = false; + /** +- * Property editor for a java builtin "boolean" type. ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ - - PostEventQueue(EventQueue eq) { - eventQueue = eq; - } +-import java.beans.*; +- +-public class BooleanEditor extends PropertyEditorSupport { +- +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- return (value != null) +- ? value.toString() +- : "null"; +- } +- +- public String getAsText() { +- Object value = getValue(); +- return (value instanceof Boolean) +- ? getValidName((Boolean) value) +- : null; +- } +- +- public void setAsText(String text) throws java.lang.IllegalArgumentException { +- if (text == null) { +- setValue(null); +- } else if (isValidName(true, text)) { +- setValue(Boolean.TRUE); +- } else if (isValidName(false, text)) { +- setValue(Boolean.FALSE); +- } else { +- throw new java.lang.IllegalArgumentException(text); +- } +- } +- +- public String[] getTags() { +- return new String[] {getValidName(true), getValidName(false)}; +- } +- +- // the following method should be localized (4890258) +- +- private String getValidName(boolean value) { +- return value ? "True" : "False"; +- } +- +- private boolean isValidName(boolean value, String name) { +- return getValidName(value).equalsIgnoreCase(name); +- } ++public class BooleanEditor extends com.sun.beans.editors.BooleanEditor { + } +--- jdk/src/share/classes/sun/beans/editors/ByteEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/ByteEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,23 +26,7 @@ + package sun.beans.editors; - public synchronized boolean noEvents() { -- return queueHead == null && !isFlushing; -+ return queueHead == null; - } + /** +- * Property editor for a java builtin "byte" type. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-public class ByteEditor extends NumberEditor { +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- return (value != null) +- ? "((byte)" + value + ")" +- : "null"; +- } +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Byte.decode(text)); +- } +- ++public class ByteEditor extends com.sun.beans.editors.ByteEditor { + } +--- jdk/src/share/classes/sun/beans/editors/ColorEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/ColorEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,190 +25,8 @@ - /* - * Continually post pending AWTEvents to the Java EventQueue. The method - * is synchronized to ensure the flush is completed before a new event - * can be posted to this queue. -- * -- * 7177040: The method couldn't be wholly synchronized because of calls -- * of EventQueue.postEvent() that uses pushPopLock, otherwise it could -- * potentially lead to deadlock - */ -- public void flush() { -- EventQueueItem tempQueue; -- synchronized (this) { -- tempQueue = queueHead; -- queueHead = queueTail = null; -- isFlushing = (tempQueue != null); + package sun.beans.editors; + +-import java.awt.*; +-import java.beans.*; +- +-public class ColorEditor extends Panel implements PropertyEditor { +- private static final long serialVersionUID = 1781257185164716054L; +- +- public ColorEditor() { +- setLayout(null); +- +- ourWidth = hPad; +- +- // Create a sample color block bordered in black +- Panel p = new Panel(); +- p.setLayout(null); +- p.setBackground(Color.black); +- sample = new Canvas(); +- p.add(sample); +- sample.reshape(2, 2, sampleWidth, sampleHeight); +- add(p); +- p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4); +- ourWidth += sampleWidth + 4 + hPad; +- +- text = new TextField("", 14); +- add(text); +- text.reshape(ourWidth,0,100,30); +- ourWidth += 100 + hPad; +- +- choser = new Choice(); +- int active = 0; +- for (int i = 0; i < colorNames.length; i++) { +- choser.addItem(colorNames[i]); +- } +- add(choser); +- choser.reshape(ourWidth,0,100,30); +- ourWidth += 100 + hPad; +- +- resize(ourWidth,40); +- } +- +- public void setValue(Object o) { +- Color c = (Color)o; +- changeColor(c); +- } +- +- public Dimension preferredSize() { +- return new Dimension(ourWidth, 40); +- } +- +- public boolean keyUp(Event e, int key) { +- if (e.target == text) { +- try { +- setAsText(text.getText()); +- } catch (IllegalArgumentException ex) { +- // Quietly ignore. +- } +- } +- return (false); +- } +- +- public void setAsText(String s) throws java.lang.IllegalArgumentException { +- if (s == null) { +- changeColor(null); +- return; +- } +- int c1 = s.indexOf(','); +- int c2 = s.indexOf(',', c1+1); +- if (c1 < 0 || c2 < 0) { +- // Invalid string. +- throw new IllegalArgumentException(s); - } - try { -- while (tempQueue != null) { -- eventQueue.postEvent(tempQueue.event); -- tempQueue = tempQueue.next; +- int r = Integer.parseInt(s.substring(0,c1)); +- int g = Integer.parseInt(s.substring(c1+1, c2)); +- int b = Integer.parseInt(s.substring(c2+1)); +- Color c = new Color(r,g,b); +- changeColor(c); +- } catch (Exception ex) { +- throw new IllegalArgumentException(s); +- } +- +- } +- +- public boolean action(Event e, Object arg) { +- if (e.target == choser) { +- changeColor(colors[choser.getSelectedIndex()]); +- } +- return false; +- } +- +- public String getJavaInitializationString() { +- return (this.color != null) +- ? "new java.awt.Color(" + this.color.getRGB() + ",true)" +- : "null"; +- } +- +- +- private void changeColor(Color c) { +- +- if (c == null) { +- this.color = null; +- this.text.setText(""); +- return; +- } +- +- color = c; +- +- text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue()); +- +- int active = 0; +- for (int i = 0; i < colorNames.length; i++) { +- if (color.equals(colors[i])) { +- active = i; - } - } -- finally { -- isFlushing = false; -+ public synchronized void flush() { -+ EventQueueItem tempQueue = queueHead; -+ queueHead = queueTail = null; -+ while (tempQueue != null) { -+ eventQueue.postEvent(tempQueue.event); -+ tempQueue = tempQueue.next; - } +- choser.select(active); +- +- sample.setBackground(color); +- sample.repaint(); +- +- support.firePropertyChange("", null, null); +- } +- +- public Object getValue() { +- return color; +- } +- +- public boolean isPaintable() { +- return true; +- } +- +- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { +- Color oldColor = gfx.getColor(); +- gfx.setColor(Color.black); +- gfx.drawRect(box.x, box.y, box.width-3, box.height-3); +- gfx.setColor(color); +- gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4); +- gfx.setColor(oldColor); +- } +- +- public String getAsText() { +- return (this.color != null) +- ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue() +- : null; +- } +- +- public String[] getTags() { +- return null; +- } +- +- public java.awt.Component getCustomEditor() { +- return this; +- } +- +- public boolean supportsCustomEditor() { +- return true; +- } +- +- public void addPropertyChangeListener(PropertyChangeListener l) { +- support.addPropertyChangeListener(l); +- } +- +- public void removePropertyChangeListener(PropertyChangeListener l) { +- support.removePropertyChangeListener(l); +- } +- +- +- private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray", +- "black", "red", "pink", "orange", +- "yellow", "green", "magenta", "cyan", +- "blue"}; +- private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray, +- Color.black, Color.red, Color.pink, Color.orange, +- Color.yellow, Color.green, Color.magenta, Color.cyan, +- Color.blue}; +- +- private Canvas sample; +- private int sampleHeight = 20; +- private int sampleWidth = 40; +- private int hPad = 5; +- private int ourWidth; +- +- private Color color; +- private TextField text; +- private Choice choser; +- +- private PropertyChangeSupport support = new PropertyChangeSupport(this); ++/** ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. ++ */ ++public class ColorEditor extends com.sun.beans.editors.ColorEditor { + } +--- jdk/src/share/classes/sun/beans/editors/DoubleEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/DoubleEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,16 +26,7 @@ + package sun.beans.editors; + + /** +- * Property editor for a java builtin "double" type. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-public class DoubleEditor extends NumberEditor { +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Double.valueOf(text)); +- } +- ++public class DoubleEditor extends com.sun.beans.editors.DoubleEditor { + } +--- jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -22,122 +22,14 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +-package sun.beans.editors; + +-import java.awt.Component; +-import java.awt.Graphics; +-import java.awt.Rectangle; +-import java.beans.PropertyChangeEvent; +-import java.beans.PropertyChangeListener; +-import java.beans.PropertyEditor; +-import java.util.ArrayList; +-import java.util.List; ++package sun.beans.editors; + + /** +- * Property editor for java.lang.Enum subclasses. +- * +- * @see PropertyEditor +- * +- * @since 1.7 +- * +- * @author Sergey A. Malenkov ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +-public final class EnumEditor implements PropertyEditor { +- private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); +- +- private final Class type; +- private final String[] tags; +- +- private Object value; +- +- public EnumEditor( Class type ) { +- Object[] values = type.getEnumConstants(); +- if ( values == null ) { +- throw new IllegalArgumentException( "Unsupported " + type ); +- } +- this.type = type; +- this.tags = new String[values.length]; +- for ( int i = 0; i < values.length; i++ ) { +- this.tags[i] = ( ( Enum )values[i] ).name(); +- } +- } +- +- public Object getValue() { +- return this.value; +- } +- +- public void setValue( Object value ) { +- if ( ( value != null ) && !this.type.isInstance( value ) ) { +- throw new IllegalArgumentException( "Unsupported value: " + value ); +- } +- Object oldValue; +- PropertyChangeListener[] listeners; +- synchronized ( this.listeners ) { +- oldValue = this.value; +- this.value = value; +- +- if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) { +- return; // do not fire event if value is not changed +- } +- int size = this.listeners.size(); +- if ( size == 0 ) { +- return; // do not fire event if there are no any listener +- } +- listeners = this.listeners.toArray( new PropertyChangeListener[size] ); +- } +- PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value ); +- for ( PropertyChangeListener listener : listeners ) { +- listener.propertyChange( event ); +- } +- } +- +- public String getAsText() { +- return ( this.value != null ) +- ? ( ( Enum )this.value ).name() +- : null; +- } +- +- public void setAsText( String text ) { +- setValue( ( text != null ) +- ? Enum.valueOf( this.type, text ) +- : null ); +- } +- +- public String[] getTags() { +- return this.tags.clone(); +- } +- +- public String getJavaInitializationString() { +- String name = getAsText(); +- return ( name != null ) +- ? this.type.getName() + '.' + name +- : "null"; +- } +- +- public boolean isPaintable() { +- return false; +- } +- +- public void paintValue( Graphics gfx, Rectangle box ) { +- } +- +- public boolean supportsCustomEditor() { +- return false; +- } +- +- public Component getCustomEditor() { +- return null; +- } +- +- public void addPropertyChangeListener( PropertyChangeListener listener ) { +- synchronized ( this.listeners ) { +- this.listeners.add( listener ); +- } +- } +- +- public void removePropertyChangeListener( PropertyChangeListener listener ) { +- synchronized ( this.listeners ) { +- this.listeners.remove( listener ); +- } ++public class EnumEditor extends com.sun.beans.editors.EnumEditor { ++ public EnumEditor(Class type) { ++ super(type); } + } +--- jdk/src/share/classes/sun/beans/editors/FloatEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/FloatEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,23 +26,7 @@ + package sun.beans.editors; + + /** +- * Property editor for a java builtin "float" type. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-public class FloatEditor extends NumberEditor { +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- return (value != null) +- ? value + "F" +- : "null"; +- } +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Float.valueOf(text)); +- } +- ++public class FloatEditor extends com.sun.beans.editors.FloatEditor { + } +--- jdk/src/share/classes/sun/beans/editors/FontEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/FontEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,195 +25,8 @@ + package sun.beans.editors; + +-import java.awt.*; +-import java.beans.*; +- +-public class FontEditor extends Panel implements java.beans.PropertyEditor { +- private static final long serialVersionUID = 6732704486002715933L; +- +- public FontEditor() { +- setLayout(null); +- +- toolkit = Toolkit.getDefaultToolkit(); +- fonts = toolkit.getFontList(); +- +- familyChoser = new Choice(); +- for (int i = 0; i < fonts.length; i++) { +- familyChoser.addItem(fonts[i]); +- } +- add(familyChoser); +- familyChoser.reshape(20, 5, 100, 30); +- +- styleChoser = new Choice(); +- for (int i = 0; i < styleNames.length; i++) { +- styleChoser.addItem(styleNames[i]); +- } +- add(styleChoser); +- styleChoser.reshape(145, 5, 70, 30); +- +- sizeChoser = new Choice(); +- for (int i = 0; i < pointSizes.length; i++) { +- sizeChoser.addItem("" + pointSizes[i]); +- } +- add(sizeChoser); +- sizeChoser.reshape(220, 5, 70, 30); +- +- resize(300,40); +- } +- +- +- public Dimension preferredSize() { +- return new Dimension(300, 40); +- } +- +- public void setValue(Object o) { +- font = (Font) o; +- if (this.font == null) +- return; +- +- changeFont(font); +- // Update the current GUI choices. +- for (int i = 0; i < fonts.length; i++) { +- if (fonts[i].equals(font.getFamily())) { +- familyChoser.select(i); +- break; +- } +- } +- for (int i = 0; i < styleNames.length; i++) { +- if (font.getStyle() == styles[i]) { +- styleChoser.select(i); +- break; +- } +- } +- for (int i = 0; i < pointSizes.length; i++) { +- if (font.getSize() <= pointSizes[i]) { +- sizeChoser.select(i); +- break; +- } +- } +- } +- +- private void changeFont(Font f) { +- font = f; +- if (sample != null) { +- remove(sample); +- } +- sample = new Label(sampleText); +- sample.setFont(font); +- add(sample); +- Component p = getParent(); +- if (p != null) { +- p.invalidate(); +- p.layout(); +- } +- invalidate(); +- layout(); +- repaint(); +- support.firePropertyChange("", null, null); +- } +- +- public Object getValue() { +- return (font); +- } +- +- public String getJavaInitializationString() { +- if (this.font == null) +- return "null"; +- +- return "new java.awt.Font(\"" + font.getName() + "\", " + +- font.getStyle() + ", " + font.getSize() + ")"; +- } +- +- public boolean action(Event e, Object arg) { +- String family = familyChoser.getSelectedItem(); +- int style = styles[styleChoser.getSelectedIndex()]; +- int size = pointSizes[sizeChoser.getSelectedIndex()]; +- try { +- Font f = new Font(family, style, size); +- changeFont(f); +- } catch (Exception ex) { +- System.err.println("Couldn't create font " + family + "-" + +- styleNames[style] + "-" + size); +- } +- return (false); +- } +- +- +- public boolean isPaintable() { +- return true; +- } +- +- public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { +- // Silent noop. +- Font oldFont = gfx.getFont(); +- gfx.setFont(font); +- FontMetrics fm = gfx.getFontMetrics(); +- int vpad = (box.height - fm.getAscent())/2; +- gfx.drawString(sampleText, 0, box.height-vpad); +- gfx.setFont(oldFont); +- } +- +- public String getAsText() { +- if (this.font == null) { +- return null; +- } +- StringBuilder sb = new StringBuilder(); +- sb.append(this.font.getName()); +- sb.append(' '); +- +- boolean b = this.font.isBold(); +- if (b) { +- sb.append("BOLD"); +- } +- boolean i = this.font.isItalic(); +- if (i) { +- sb.append("ITALIC"); +- } +- if (b || i) { +- sb.append(' '); +- } +- sb.append(this.font.getSize()); +- return sb.toString(); +- } +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Font.decode(text)); +- } +- +- public String[] getTags() { +- return null; +- } +- +- public java.awt.Component getCustomEditor() { +- return this; +- } +- +- public boolean supportsCustomEditor() { +- return true; +- } +- +- public void addPropertyChangeListener(PropertyChangeListener l) { +- support.addPropertyChangeListener(l); +- } +- +- public void removePropertyChangeListener(PropertyChangeListener l) { +- support.removePropertyChangeListener(l); +- } +- +- private Font font; +- private Toolkit toolkit; +- private String sampleText = "Abcde..."; +- +- private Label sample; +- private Choice familyChoser; +- private Choice styleChoser; +- private Choice sizeChoser; +- +- private String fonts[]; +- private String[] styleNames = { "plain", "bold", "italic" }; +- private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC }; +- private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 }; +- +- private PropertyChangeSupport support = new PropertyChangeSupport(this); +- ++/** ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. ++ */ ++public class FontEditor extends com.sun.beans.editors.FontEditor { + } +--- jdk/src/share/classes/sun/beans/editors/IntegerEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/IntegerEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,17 +26,7 @@ + package sun.beans.editors; + + /** +- * Property editor for a java builtin "int" type. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-public class IntegerEditor extends NumberEditor { +- +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Integer.decode(text)); +- } +- ++public class IntegerEditor extends com.sun.beans.editors.IntegerEditor { + } +--- jdk/src/share/classes/sun/beans/editors/LongEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/LongEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,23 +26,7 @@ + package sun.beans.editors; + + /** +- * Property editor for a java builtin "long" type. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-public class LongEditor extends NumberEditor { +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- return (value != null) +- ? value + "L" +- : "null"; +- } +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Long.decode(text)); +- } +- ++public class LongEditor extends com.sun.beans.editors.LongEditor { + } +--- jdk/src/share/classes/sun/beans/editors/NumberEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/NumberEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,19 +26,7 @@ + package sun.beans.editors; + + /** +- * Abstract Property editor for a java builtin number types. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-abstract public class NumberEditor extends PropertyEditorSupport { +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- return (value != null) +- ? value.toString() +- : "null"; +- } +- ++abstract public class NumberEditor extends com.sun.beans.editors.NumberEditor { + } +--- jdk/src/share/classes/sun/beans/editors/ShortEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/ShortEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -23,27 +23,10 @@ + * questions. + */ + +- + package sun.beans.editors; + + /** +- * Property editor for a java builtin "short" type. +- * ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. + */ +- +-import java.beans.*; +- +-public class ShortEditor extends NumberEditor { +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- return (value != null) +- ? "((short)" + value + ")" +- : "null"; +- } +- +- public void setAsText(String text) throws IllegalArgumentException { +- setValue((text == null) ? null : Short.decode(text)); +- } +- ++public class ShortEditor extends com.sun.beans.editors.ShortEditor { + } +--- jdk/src/share/classes/sun/beans/editors/StringEditor.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/editors/StringEditor.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -23,52 +23,10 @@ + * questions. + */ + +- + package sun.beans.editors; + +-import java.beans.*; +- +-public class StringEditor extends PropertyEditorSupport { +- +- public String getJavaInitializationString() { +- Object value = getValue(); +- if (value == null) +- return "null"; +- +- String str = value.toString(); +- int length = str.length(); +- StringBuilder sb = new StringBuilder(length + 2); +- sb.append('"'); +- for (int i = 0; i < length; i++) { +- char ch = str.charAt(i); +- switch (ch) { +- case '\b': sb.append("\\b"); break; +- case '\t': sb.append("\\t"); break; +- case '\n': sb.append("\\n"); break; +- case '\f': sb.append("\\f"); break; +- case '\r': sb.append("\\r"); break; +- case '\"': sb.append("\\\""); break; +- case '\\': sb.append("\\\\"); break; +- default: +- if ((ch < ' ') || (ch > '~')) { +- sb.append("\\u"); +- String hex = Integer.toHexString((int) ch); +- for (int len = hex.length(); len < 4; len++) { +- sb.append('0'); +- } +- sb.append(hex); +- } else { +- sb.append(ch); +- } +- break; +- } +- } +- sb.append('"'); +- return sb.toString(); +- } +- +- public void setAsText(String text) { +- setValue(text); +- } +- ++/** ++ * FOR BACKWARD COMPATIBILITY ONLY - DO NOT USE. ++ */ ++public class StringEditor extends com.sun.beans.editors.StringEditor { + } +--- jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java 2012-08-10 10:28:28.000000000 -0700 ++++ jdk/src/share/classes/sun/beans/infos/ComponentBeanInfo.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,62 +0,0 @@ +-/* +- * Copyright (c) 1996, 2002, 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 sun.beans.infos; +- +-import java.beans.*; +- +-/** +- * BeanInfo descriptor for a standard AWT component. +- */ +- +-public class ComponentBeanInfo extends SimpleBeanInfo { +- private static final Class beanClass = java.awt.Component.class; +- +- public PropertyDescriptor[] getPropertyDescriptors() { +- try { +- PropertyDescriptor +- name = new PropertyDescriptor("name", beanClass), +- background = new PropertyDescriptor("background", beanClass), +- foreground = new PropertyDescriptor("foreground", beanClass), +- font = new PropertyDescriptor("font", beanClass), +- enabled = new PropertyDescriptor("enabled", beanClass), +- visible = new PropertyDescriptor("visible", beanClass), +- focusable = new PropertyDescriptor("focusable", beanClass); +- +- enabled.setExpert(true); +- visible.setHidden(true); +- +- background.setBound(true); +- foreground.setBound(true); +- font.setBound(true); +- focusable.setBound(true); +- +- PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable }; +- return rv; +- } catch (IntrospectionException e) { +- throw new Error(e.toString()); +- } +- } +-} --- jdk/src/share/classes/sun/font/FontUtilities.java 2012-08-10 10:28:29.000000000 -0700 -+++ jdk/src/share/classes/sun/font/FontUtilities.java 2012-08-19 12:39:55.000000000 -0700 ++++ jdk/src/share/classes/sun/font/FontUtilities.java 2013-01-16 08:58:15.000000000 -0800 @@ -48,6 +48,8 @@ public static boolean isLinux; @@ -7474,7 +17953,7 @@ String t2kStr = System.getProperty("sun.java2d.font.scaler"); --- jdk/src/share/classes/sun/font/SunFontManager.java 2012-08-10 10:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/SunFontManager.java 2012-08-19 12:39:55.000000000 -0700 ++++ jdk/src/share/classes/sun/font/SunFontManager.java 2013-01-16 08:58:15.000000000 -0800 @@ -417,7 +417,7 @@ * registerFonts method as on-screen these JRE fonts * always go through the T2K rasteriser. @@ -7484,8 +17963,422 @@ /* Linux font configuration uses these fonts */ registerFontDir(jreFontDirName); } +--- jdk/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java 2012-08-10 10:28:31.000000000 -0700 ++++ jdk/src/share/classes/sun/invoke/anon/AnonymousClassLoader.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -73,74 +73,14 @@ + public class AnonymousClassLoader { + final Class<?> hostClass; + +- // Note: Do not refactor the calls to checkHostClass unless you +- // also adjust this constant: +- private static int CHC_CALLERS = 3; +- +- public AnonymousClassLoader() { +- this.hostClass = checkHostClass(null); +- } +- public AnonymousClassLoader(Class<?> hostClass) { +- this.hostClass = checkHostClass(hostClass); +- } +- +- private static Class<?> getTopLevelClass(Class<?> clazz) { +- for(Class<?> outer = clazz.getDeclaringClass(); outer != null; +- outer = outer.getDeclaringClass()) { +- clazz = outer; +- } +- return clazz; ++ // Privileged constructor. ++ private AnonymousClassLoader(Class<?> hostClass) { ++ this.hostClass = hostClass; + } + +- private static Class<?> checkHostClass(Class<?> hostClass) { +- // called only from the constructor +- // does a context-sensitive check on caller class +- // CC[0..3] = {Reflection, this.checkHostClass, this.<init>, caller} +- Class<?> caller = sun.reflect.Reflection.getCallerClass(CHC_CALLERS); +- +- if (caller == null) { +- // called from the JVM directly +- if (hostClass == null) +- return AnonymousClassLoader.class; // anything central will do +- return hostClass; +- } +- +- if (hostClass == null) +- hostClass = caller; // default value is caller itself +- +- // anonymous class will access hostClass on behalf of caller +- Class<?> callee = hostClass; +- +- if (caller == callee) +- // caller can always nominate itself to grant caller's own access rights +- return hostClass; +- +- // normalize caller and callee to their top-level classes: +- caller = getTopLevelClass(caller); +- callee = getTopLevelClass(callee); +- if (caller == callee) +- return caller; +- +- ClassLoader callerCL = caller.getClassLoader(); +- if (callerCL == null) { +- // caller is trusted code, so accept the proposed hostClass +- return hostClass; +- } +- +- // %%% should do something with doPrivileged, because trusted +- // code should have a way to execute on behalf of +- // partially-trusted clients +- +- // Does the caller have the right to access the private +- // members of the callee? If not, raise an error. +- final int ACC_PRIVATE = 2; +- try { +- sun.reflect.Reflection.ensureMemberAccess(caller, callee, null, ACC_PRIVATE); +- } catch (IllegalAccessException ee) { +- throw new IllegalArgumentException(ee); +- } +- +- return hostClass; ++ public static AnonymousClassLoader make(sun.misc.Unsafe unsafe, Class<?> hostClass) { ++ if (unsafe == null) throw new NullPointerException(); ++ return new AnonymousClassLoader(hostClass); + } + + public Class<?> loadClass(byte[] classFile) { +@@ -249,7 +189,7 @@ + private static int fakeNameCounter = 99999; + + // ignore two warnings on this line: +- static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); ++ private static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + // preceding line requires that this class be on the boot class path + + static private final Method defineAnonymousClass; +--- jdk/src/share/classes/sun/launcher/LauncherHelper.java 2012-08-10 10:28:48.000000000 -0700 ++++ jdk/src/share/classes/sun/launcher/LauncherHelper.java 2013-01-16 08:58:10.000000000 -0800 +@@ -48,6 +48,9 @@ + import java.math.BigDecimal; + import java.math.RoundingMode; + import java.nio.charset.Charset; ++import java.nio.file.DirectoryStream; ++import java.nio.file.Files; ++import java.nio.file.Path; + import java.util.ResourceBundle; + import java.text.MessageFormat; + import java.util.ArrayList; +@@ -69,8 +72,6 @@ + + private static StringBuilder outBuf = new StringBuilder(); + +- private static ResourceBundle javarb = null; +- + private static final String INDENT = " "; + private static final String VM_SETTINGS = "VM settings:"; + private static final String PROP_SETTINGS = "Property settings:"; +@@ -78,6 +79,7 @@ + + // sync with java.c and sun.misc.VM + private static final String diagprop = "sun.java.launcher.diag"; ++ final static boolean trace = sun.misc.VM.getSavedProperty(diagprop) != null; + + private static final String defaultBundleName = + "sun.launcher.resources.launcher"; +@@ -428,11 +430,11 @@ + if (msgKey != null) { + ostream.println(getLocalizedMessage(msgKey, args)); + } +- if (sun.misc.VM.getSavedProperty(diagprop) != null) { ++ if (trace) { + if (t != null) { + t.printStackTrace(); + } else { +- Thread.currentThread().dumpStack(); ++ Thread.dumpStack(); + } + } + System.exit(1); +@@ -532,4 +534,82 @@ + } + return null; // keep the compiler happy + } ++ ++ static String[] expandArgs(String[] argArray) { ++ List<StdArg> aList = new ArrayList<>(); ++ for (String x : argArray) { ++ aList.add(new StdArg(x)); ++ } ++ return expandArgs(aList); ++ } ++ ++ static String[] expandArgs(List<StdArg> argList) { ++ ArrayList<String> out = new ArrayList<>(); ++ if (trace) { ++ System.err.println("Incoming arguments:"); ++ } ++ for (StdArg a : argList) { ++ if (trace) { ++ System.err.println(a); ++ } ++ if (a.needsExpansion) { ++ File x = new File(a.arg); ++ File parent = x.getParentFile(); ++ String glob = x.getName(); ++ if (parent == null) { ++ parent = new File("."); ++ } ++ try (DirectoryStream<Path> dstream = ++ Files.newDirectoryStream(parent.toPath(), glob)) { ++ int entries = 0; ++ for (Path p : dstream) { ++ out.add(p.normalize().toString()); ++ entries++; ++ } ++ if (entries == 0) { ++ out.add(a.arg); ++ } ++ } catch (Exception e) { ++ out.add(a.arg); ++ if (trace) { ++ System.err.println("Warning: passing argument as-is " + a); ++ System.err.print(e); ++ } ++ } ++ } else { ++ out.add(a.arg); ++ } ++ } ++ String[] oarray = new String[out.size()]; ++ out.toArray(oarray); ++ ++ if (trace) { ++ System.err.println("Expanded arguments:"); ++ for (String x : oarray) { ++ System.err.println(x); ++ } ++ } ++ return oarray; ++ } ++ ++ /* duplicate of the native StdArg struct */ ++ private static class StdArg { ++ final String arg; ++ final boolean needsExpansion; ++ StdArg(String arg, boolean expand) { ++ this.arg = arg; ++ this.needsExpansion = expand; ++ } ++ // protocol: first char indicates whether expansion is required ++ // 'T' = true ; needs expansion ++ // 'F' = false; needs no expansion ++ StdArg(String in) { ++ this.arg = in.substring(1); ++ needsExpansion = in.charAt(0) == 'T'; ++ } ++ public String toString() { ++ return "StdArg{" + "arg=" + arg + ", needsExpansion=" + needsExpansion + '}'; ++ } ++ } + } ++ +--- jdk/src/share/classes/sun/launcher/resources/launcher.properties 2012-08-10 10:28:48.000000000 -0700 ++++ jdk/src/share/classes/sun/launcher/resources/launcher.properties 2013-01-16 08:58:10.000000000 -0800 +@@ -43,7 +43,7 @@ + \ and ZIP archives to search for class files.\n\ + \ -D<name>=<value>\n\ + \ set a system property\n\ +-\ -verbose[:class|gc|jni]\n\ ++\ -verbose:[class|gc|jni]\n\ + \ enable verbose output\n\ + \ -version print product version and exit\n\ + \ -version:<value>\n\ +@@ -136,3 +136,4 @@ + Error: An unexpected error occurred while trying to open file {0} + java.launcher.jar.error2=manifest not found in {0} + java.launcher.jar.error3=no main manifest attribute, in {0} ++java.launcher.init.error=initialization error +--- jdk/src/share/classes/sun/misc/JavaAWTAccess.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/share/classes/sun/misc/JavaAWTAccess.java 2013-01-16 08:58:10.000000000 -0800 +@@ -0,0 +1,34 @@ ++/* ++ * Copyright (c) 2012, 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 sun.misc; ++ ++public interface JavaAWTAccess { ++ public Object get(Object key); ++ public void put(Object key, Object value); ++ public void remove(Object key); ++ public boolean isDisposed(); ++ public boolean isMainAppContext(); ++} +--- jdk/src/share/classes/sun/misc/Service.java 2012-08-10 10:28:57.000000000 -0700 ++++ jdk/src/share/classes/sun/misc/Service.java 2013-01-16 08:58:10.000000000 -0800 +@@ -284,12 +284,20 @@ + } + String cn = nextName; + nextName = null; ++ Class<?> c = null; + try { +- return Class.forName(cn, true, loader).newInstance(); ++ c = Class.forName(cn, false, loader); + } catch (ClassNotFoundException x) { + fail(service, + "Provider " + cn + " not found"); +- } catch (Exception x) { ++ } ++ if (!service.isAssignableFrom(c)) { ++ fail(service, ++ "Provider " + cn + " not a subtype"); ++ } ++ try { ++ return service.cast(c.newInstance()); ++ } catch (Throwable x) { + fail(service, + "Provider " + cn + " could not be instantiated: " + x, + x); +--- jdk/src/share/classes/sun/misc/SharedSecrets.java 2012-08-10 10:28:57.000000000 -0700 ++++ jdk/src/share/classes/sun/misc/SharedSecrets.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2012, 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 +@@ -56,6 +56,7 @@ + private static JavaSecurityAccess javaSecurityAccess; + private static JavaxSecurityAuthKerberosAccess javaxSecurityAuthKerberosAccess; + private static JavaUtilZipAccess javaUtilZipAccess; ++ private static JavaAWTAccess javaAWTAccess; + + public static JavaUtilJarAccess javaUtilJarAccess() { + if (javaUtilJarAccess == null) { +@@ -177,4 +178,14 @@ + } + return javaUtilZipAccess; + } ++ ++ public static void setJavaAWTAccess(JavaAWTAccess jaa) { ++ javaAWTAccess = jaa; ++ } ++ ++ public static JavaAWTAccess getJavaAWTAccess() { ++ // this may return null in which case calling code needs to ++ // provision for. ++ return javaAWTAccess; ++ } + } +--- jdk/src/share/classes/sun/net/www/MessageHeader.java 2012-08-10 10:29:01.000000000 -0700 ++++ jdk/src/share/classes/sun/net/www/MessageHeader.java 2013-01-16 08:58:10.000000000 -0800 +@@ -138,6 +138,43 @@ + return null; + } + ++ /** ++ * Removes bare Negotiate and Kerberos headers when an "NTLM ..." ++ * appears. All Performed on headers with key being k. ++ * @return true if there is a change ++ */ ++ public boolean filterNTLMResponses(String k) { ++ boolean found = false; ++ for (int i=0; i<nkeys; i++) { ++ if (k.equalsIgnoreCase(keys[i]) ++ && values[i] != null && values[i].length() > 5 ++ && values[i].substring(0, 5).equalsIgnoreCase("NTLM ")) { ++ found = true; ++ break; ++ } ++ } ++ if (found) { ++ int j = 0; ++ for (int i=0; i<nkeys; i++) { ++ if (k.equalsIgnoreCase(keys[i]) && ( ++ "Negotiate".equalsIgnoreCase(values[i]) || ++ "Kerberos".equalsIgnoreCase(values[i]))) { ++ continue; ++ } ++ if (i != j) { ++ keys[j] = keys[i]; ++ values[j] = values[i]; ++ } ++ j++; ++ } ++ if (j != nkeys) { ++ nkeys = j; ++ return true; ++ } ++ } ++ return false; ++ } ++ + class HeaderIterator implements Iterator<String> { + int index = 0; + int next = -1; +--- jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2012-08-10 10:29:02.000000000 -0700 ++++ jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1323,6 +1323,16 @@ + if (logger.isLoggable(PlatformLogger.FINE)) { + logger.fine(responses.toString()); + } ++ ++ boolean b1 = responses.filterNTLMResponses("WWW-Authenticate"); ++ boolean b2 = responses.filterNTLMResponses("Proxy-Authenticate"); ++ if (b1 || b2) { ++ if (logger.isLoggable(PlatformLogger.FINE)) { ++ logger.fine(">>>> Headers are filtered"); ++ logger.fine(responses.toString()); ++ } ++ } ++ + inputStream = http.getInputStream(); + + respCode = getResponseCode(); +@@ -1782,6 +1792,13 @@ + logger.fine(responses.toString()); + } + ++ if (responses.filterNTLMResponses("Proxy-Authenticate")) { ++ if (logger.isLoggable(PlatformLogger.FINE)) { ++ logger.fine(">>>> Headers are filtered"); ++ logger.fine(responses.toString()); ++ } ++ } ++ + statusLine = responses.getValue(0); + StringTokenizer st = new StringTokenizer(statusLine); + st.nextToken(); --- jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2012-08-10 10:29:03.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2012-08-19 12:39:56.000000000 -0700 ++++ jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2013-01-16 00:07:12.000000000 -0800 @@ -749,8 +749,7 @@ if (sm != null) sm.checkConnect(isa.getAddress().getHostAddress(), @@ -7505,84 +18398,8 @@ throws IOException; private native int receive0(FileDescriptor fd, long address, int len, ---- jdk/src/share/classes/sun/nio/ch/IOUtil.java 2012-08-10 10:29:03.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/IOUtil.java 2012-08-19 12:39:56.000000000 -0700 -@@ -36,11 +36,6 @@ - - class IOUtil { - -- /** -- * Max number of iovec structures that readv/writev supports -- */ -- static final int IOV_MAX; -- - private IOUtil() { } // No instantiation - - static int write(FileDescriptor fd, ByteBuffer src, long position, -@@ -116,8 +111,7 @@ - - // Iterate over buffers to populate native iovec array. - int count = offset + length; -- int i = offset; -- while (i < count && iov_len < IOV_MAX) { -+ for (int i=offset; i<count; i++) { - ByteBuffer buf = bufs[i]; - int pos = buf.position(); - int lim = buf.limit(); -@@ -141,7 +135,6 @@ - vec.putLen(iov_len, rem); - iov_len++; - } -- i++; - } - if (iov_len == 0) - return 0L; -@@ -247,8 +240,7 @@ - - // Iterate over buffers to populate native iovec array. - int count = offset + length; -- int i = offset; -- while (i < count && iov_len < IOV_MAX) { -+ for (int i=offset; i<count; i++) { - ByteBuffer buf = bufs[i]; - if (buf.isReadOnly()) - throw new IllegalArgumentException("Read-only buffer"); -@@ -272,7 +264,6 @@ - vec.putLen(iov_len, rem); - iov_len++; - } -- i++; - } - if (iov_len == 0) - return 0L; -@@ -342,14 +333,11 @@ - - static native void setfdVal(FileDescriptor fd, int value); - -- static native int iovMax(); -- - static native void initIDs(); - - static { - // Note that IOUtil.initIDs is called from within Util.load. - Util.load(); -- IOV_MAX = iovMax(); - } - - } ---- jdk/src/share/classes/sun/nio/ch/Util.java 2012-08-10 10:29:04.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/Util.java 2012-08-19 12:39:56.000000000 -0700 -@@ -45,7 +45,7 @@ - // -- Caches -- - - // The number of temp buffers in our pool -- private static final int TEMP_BUF_POOL_SIZE = IOUtil.IOV_MAX; -+ private static final int TEMP_BUF_POOL_SIZE = 8; - - // Per-thread cache of temporary direct buffers - private static ThreadLocal<BufferCache> bufferCache = --- jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-08-10 10:29:08.000000000 -0700 -+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-08-19 12:39:56.000000000 -0700 ++++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2013-01-16 08:58:15.000000000 -0800 @@ -1537,7 +1537,7 @@ } @@ -7592,8 +18409,20 @@ execCmd = new String[ncomps]; execCmd[n++] = "/usr/bin/lpr"; if ((pFlags & PRINTER) != 0) { +--- jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2012-08-10 10:29:15.000000000 -0700 ++++ jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2013-01-16 08:58:10.000000000 -0800 +@@ -405,7 +405,8 @@ + */ + perms.add(new SocketPermission("*", "connect,accept")); + +- perms.add(new RuntimePermission("accessClassInPackage.sun.*")); ++ perms.add(new RuntimePermission("accessClassInPackage.sun.jvmstat.*")); ++ perms.add(new RuntimePermission("accessClassInPackage.sun.jvm.hotspot.*")); + + perms.add(new FilePermission("<<ALL FILES>>", "read")); + --- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2012-08-10 10:29:20.000000000 -0700 -+++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2012-08-19 12:39:57.000000000 -0700 ++++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2013-01-16 08:58:15.000000000 -0800 @@ -83,7 +83,8 @@ String osname = System.getProperty("os.name"); if (osname.startsWith("SunOS")) { @@ -7604,8 +18433,357 @@ gssLibs = new String[]{ "libgssapi.so", "libgssapi_krb5.so", +--- jdk/src/share/classes/sun/security/provider/SecureRandom.java 2012-08-10 10:29:25.000000000 -0700 ++++ jdk/src/share/classes/sun/security/provider/SecureRandom.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2012, 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 +@@ -56,12 +56,6 @@ + + private static final long serialVersionUID = 3581829991155417889L; + +- /** +- * This static object will be seeded by SeedGenerator, and used +- * to seed future instances of SecureRandom +- */ +- private static SecureRandom seeder; +- + private static final int DIGEST_SIZE = 20; + private transient MessageDigest digest; + private byte[] state; +@@ -173,6 +167,28 @@ + } + + /** ++ * This static object will be seeded by SeedGenerator, and used ++ * to seed future instances of SHA1PRNG SecureRandoms. ++ * ++ * Bloch, Effective Java Second Edition: Item 71 ++ */ ++ private static class SeederHolder { ++ ++ private static final SecureRandom seeder; ++ ++ static { ++ /* ++ * Call to SeedGenerator.generateSeed() to add additional ++ * seed material (likely from the Native implementation). ++ */ ++ seeder = new SecureRandom(SeedGenerator.getSystemEntropy()); ++ byte [] b = new byte[DIGEST_SIZE]; ++ SeedGenerator.generateSeed(b); ++ seeder.engineSetSeed(b); ++ } ++ } ++ ++ /** + * Generates a user-specified number of random bytes. + * + * @param bytes the array to be filled in with random bytes. +@@ -183,13 +199,8 @@ + byte[] output = remainder; + + if (state == null) { +- if (seeder == null) { +- seeder = new SecureRandom(SeedGenerator.getSystemEntropy()); +- seeder.engineSetSeed(engineGenerateSeed(DIGEST_SIZE)); +- } +- + byte[] seed = new byte[DIGEST_SIZE]; +- seeder.engineNextBytes(seed); ++ SeederHolder.seeder.engineNextBytes(seed); + state = digest.digest(seed); + } + +--- jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java 2012-08-10 10:29:26.000000000 -0700 ++++ jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java 2013-01-16 08:58:10.000000000 -0800 +@@ -257,18 +257,21 @@ + } + } + +- // Check that the key identifiers match ++ // Check that the key identifiers match, if both are present ++ byte[] anchorKeyId = null; + if (certIssuerKeyId != null && +- !Arrays.equals(certIssuerKeyId, getKeyId(anchorCert))) { +- +- continue; // try next cert +- } ++ (anchorKeyId = ++ OCSPChecker.getKeyId(anchorCert)) != null) { ++ if (!Arrays.equals(certIssuerKeyId, anchorKeyId)) { ++ continue; // try next cert ++ } + +- if (DEBUG != null && certIssuerKeyId != null) { +- DEBUG.println("Issuer certificate key ID: " + +- String.format("0x%0" + +- (certIssuerKeyId.length * 2) + "x", +- new BigInteger(1, certIssuerKeyId))); ++ if (DEBUG != null) { ++ DEBUG.println("Issuer certificate key ID: " + ++ String.format("0x%0" + ++ (certIssuerKeyId.length * 2) + "x", ++ new BigInteger(1, certIssuerKeyId))); ++ } + } + + issuerCert = anchorCert; +--- jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2012-08-10 10:29:26.000000000 -0700 ++++ jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2013-01-16 08:58:10.000000000 -0800 +@@ -264,6 +264,7 @@ + DEBUG.println("OCSP Responder name: " + responderName); + } + } else if (tag == KEY_TAG) { ++ seq = seq.data.getDerValue(); // consume tag and length + if (DEBUG != null) { + byte[] responderKeyId = seq.getOctetString(); + DEBUG.println("OCSP Responder key ID: " + +@@ -392,21 +393,29 @@ + // Retrieve the issuer's key identifier + if (certIssuerKeyId == null) { + certIssuerKeyId = signerCert.getIssuerKeyIdentifier(); ++ if (certIssuerKeyId == null) { ++ if (DEBUG != null) { ++ DEBUG.println("No issuer key identifier (AKID) " ++ + "in the signer certificate"); ++ } ++ } + } + +- // Check that the key identifiers match +- if (certIssuerKeyId == null || +- !Arrays.equals(certIssuerKeyId, +- OCSPChecker.getKeyId(responderCert))) { +- +- continue; // try next cert +- } ++ // Check that the key identifiers match, if both are present ++ byte[] responderKeyId = null; ++ if (certIssuerKeyId != null && ++ (responderKeyId = ++ OCSPChecker.getKeyId(responderCert)) != null) { ++ if (!Arrays.equals(certIssuerKeyId, responderKeyId)) { ++ continue; // try next cert ++ } + +- if (DEBUG != null) { +- DEBUG.println("Issuer certificate key ID: " + +- String.format("0x%0" + +- (certIssuerKeyId.length * 2) + "x", +- new BigInteger(1, certIssuerKeyId))); ++ if (DEBUG != null) { ++ DEBUG.println("Issuer certificate key ID: " + ++ String.format("0x%0" + ++ (certIssuerKeyId.length * 2) + "x", ++ new BigInteger(1, certIssuerKeyId))); ++ } + } + + // Check for the OCSPSigning key purpose +@@ -433,15 +442,11 @@ + + // Check the date validity + try { +- if (dateCheckedAgainst == null) { +- signerCert.checkValidity(); +- } else { +- signerCert.checkValidity(dateCheckedAgainst); +- } ++ signerCert.checkValidity(); + } catch (GeneralSecurityException e) { + if (DEBUG != null) { + DEBUG.println("Responder's certificate not within" + +- " the validity period" + e); ++ " the validity period " + e); + } + continue; // try next cert + } +--- jdk/src/share/classes/sun/security/ssl/HandshakeInStream.java 2012-08-10 10:29:27.000000000 -0700 ++++ jdk/src/share/classes/sun/security/ssl/HandshakeInStream.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2012, 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 +@@ -190,6 +190,7 @@ + + byte[] getBytes8() throws IOException { + int len = getInt8(); ++ verifyLength(len); + byte b[] = new byte[len]; + + read(b, 0, len); +@@ -198,6 +199,7 @@ + + public byte[] getBytes16() throws IOException { + int len = getInt16(); ++ verifyLength(len); + byte b[] = new byte[len]; + + read(b, 0, len); +@@ -206,10 +208,19 @@ + + byte[] getBytes24() throws IOException { + int len = getInt24(); ++ verifyLength(len); + byte b[] = new byte[len]; + + read(b, 0, len); + return b; + } + ++ // Is a length greater than available bytes in the record? ++ private void verifyLength(int len) throws SSLException { ++ if (len > available()) { ++ throw new SSLException( ++ "Not enough data to fill declared vector size"); ++ } ++ } ++ + } +--- jdk/src/share/classes/sun/security/ssl/Handshaker.java 2012-08-10 10:29:27.000000000 -0700 ++++ jdk/src/share/classes/sun/security/ssl/Handshaker.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2012, 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 +@@ -1063,7 +1063,6 @@ + if (debug != null && Debug.isOn("handshake")) { + System.out.println("RSA master secret generation error:"); + e.printStackTrace(System.out); +- System.out.println("Generating new random premaster secret"); + } + + if (requestedVersion != null) { +@@ -1130,7 +1129,6 @@ + System.out.println("RSA PreMasterSecret version error: expected" + + protocolVersion + " or " + requestedVersion + ", decrypted: " + + premasterVersion); +- System.out.println("Generating new random premaster secret"); + } + preMasterSecret = + RSAClientKeyExchange.generateDummySecret(requestedVersion); +--- jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2012-08-10 10:29:28.000000000 -0700 ++++ jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2013-01-16 08:58:10.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -36,6 +36,7 @@ + import javax.net.ssl.*; + + import sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec; ++import sun.security.util.KeyLength; + + /** + * This is the client key exchange message (CLIENT --> SERVER) used with +@@ -192,26 +193,38 @@ + "unable to get the plaintext of the premaster secret"); + } + +- // We are not always able to get the encoded key of the +- // premaster secret. Pass the cheking to master secret ++ int keySize = KeyLength.getKeySize(secretKey); ++ if (keySize > 0 && keySize != 384) { // 384 = 48 * 8 ++ if (debug != null && Debug.isOn("handshake")) { ++ System.out.println( ++ "incorrect length of premaster secret: " + ++ (keySize/8)); ++ } ++ ++ return generateDummySecret(clientHelloVersion); ++ } ++ ++ // The key size is exactly 48 bytes or not accessible. ++ // ++ // Conservatively, pass the checking to master secret + // calculation. + return secretKey; + } else if (encoded.length == 48) { + // check the version + if (clientHelloVersion.major == encoded[0] && + clientHelloVersion.minor == encoded[1]) { ++ + return secretKey; +- } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v) { ++ } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v && ++ currentVersion.major == encoded[0] && ++ currentVersion.minor == encoded[1]) { + /* +- * we never checked the client_version in server side +- * for TLS v1.0 and SSL v3.0. For compatibility, we +- * maintain this behavior. ++ * For compatibility, we maintain the behavior that the ++ * version in pre_master_secret can be the negotiated ++ * version for TLS v1.0 and SSL v3.0. + */ +- if (currentVersion.major == encoded[0] && +- currentVersion.minor == encoded[1]) { +- this.protocolVersion = currentVersion; +- return secretKey; +- } ++ this.protocolVersion = currentVersion; ++ return secretKey; + } + + if (debug != null && Debug.isOn("handshake")) { +@@ -220,22 +233,23 @@ + ", while PreMasterSecret.client_version is " + + ProtocolVersion.valueOf(encoded[0], encoded[1])); + } ++ ++ return generateDummySecret(clientHelloVersion); + } else { + if (debug != null && Debug.isOn("handshake")) { + System.out.println( + "incorrect length of premaster secret: " + + encoded.length); + } +- } +- } + +- if (debug != null && Debug.isOn("handshake")) { +- if (failoverException != null) { +- System.out.println("Error decrypting premaster secret:"); +- failoverException.printStackTrace(System.out); ++ return generateDummySecret(clientHelloVersion); + } ++ } + +- System.out.println("Generating random secret"); ++ if (debug != null && Debug.isOn("handshake") && ++ failoverException != null) { ++ System.out.println("Error decrypting premaster secret:"); ++ failoverException.printStackTrace(System.out); + } + + return generateDummySecret(clientHelloVersion); +@@ -243,6 +257,10 @@ + + // generate a premaster secret with the specified version number + static SecretKey generateDummySecret(ProtocolVersion version) { ++ if (debug != null && Debug.isOn("handshake")) { ++ System.out.println("Generating a random fake premaster secret"); ++ } ++ + try { + String s = ((version.v >= ProtocolVersion.TLS12.v) ? + "SunTls12RsaPremasterSecret" : "SunTlsRsaPremasterSecret"); --- jdk/src/share/classes/sun/swing/FilePane.java 2012-08-10 10:29:34.000000000 -0700 -+++ jdk/src/share/classes/sun/swing/FilePane.java 2012-08-19 12:39:57.000000000 -0700 ++++ jdk/src/share/classes/sun/swing/FilePane.java 2013-01-16 00:07:14.000000000 -0800 @@ -35,7 +35,6 @@ import java.util.List; import java.util.concurrent.Callable; @@ -7654,7 +18832,7 @@ } // createDetailsView --- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2012-08-10 10:29:42.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2012-08-19 12:39:58.000000000 -0700 ++++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2013-01-16 08:58:15.000000000 -0800 @@ -30,4 +30,5 @@ #[solaris]sun.tools.attach.SolarisAttachProvider #[windows]sun.tools.attach.WindowsAttachProvider @@ -7662,7 +18840,7 @@ +#[bsd]sun.tools.attach.BsdAttachProvider #[macosx]sun.tools.attach.BsdAttachProvider --- jdk/src/share/classes/sun/tools/jar/Main.java 2012-08-10 10:29:42.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/Main.java 2012-08-19 12:39:58.000000000 -0700 ++++ jdk/src/share/classes/sun/tools/jar/Main.java 2013-01-16 08:58:15.000000000 -0800 @@ -51,6 +51,7 @@ String zname = ""; String[] files; @@ -7734,7 +18912,7 @@ throw new IOException(formatMsg( "error.create.dir", d.getPath())); --- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2012-08-10 10:29:42.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2012-08-19 12:39:58.000000000 -0700 ++++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2013-01-16 08:58:15.000000000 -0800 @@ -44,6 +44,8 @@ {0} : could not create directory error.incorrect.length=\ @@ -7745,7 +18923,7 @@ added manifest out.update.manifest=\ --- jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2012-08-10 10:30:07.000000000 -0700 -+++ jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2013-01-16 08:58:15.000000000 -0800 @@ -38,6 +38,7 @@ # gnumake JDK=<java_home> OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] # gnumake JDK=<java_home> OSNAME=linux [OPT=true] @@ -7784,8 +18962,88 @@ # Common -I options CFLAGS += -I. CFLAGS += -I../agent_util +--- jdk/src/share/lib/security/java.security 2012-08-10 10:30:16.000000000 -0700 ++++ jdk/src/share/lib/security/java.security 2013-01-16 08:58:10.000000000 -0800 +@@ -123,7 +123,7 @@ + # passed to checkPackageAccess unless the + # corresponding RuntimePermission ("accessClassInPackage."+package) has + # been granted. +-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. ++package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. + + # + # List of comma-separated packages that start with or equal this string +@@ -135,7 +135,7 @@ + # by default, none of the class loaders supplied with the JDK call + # checkPackageDefinition. + # +-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. ++package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. + + # + # Determines whether this properties file can be appended to +--- jdk/src/share/lib/security/java.security-macosx 2012-08-10 10:30:16.000000000 -0700 ++++ jdk/src/share/lib/security/java.security-macosx 2013-01-16 08:58:10.000000000 -0800 +@@ -124,7 +124,7 @@ + # passed to checkPackageAccess unless the + # corresponding RuntimePermission ("accessClassInPackage."+package) has + # been granted. +-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,apple. ++package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,apple. + + # + # List of comma-separated packages that start with or equal this string +@@ -136,7 +136,7 @@ + # by default, none of the class loaders supplied with the JDK call + # checkPackageDefinition. + # +-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,apple. ++package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,apple. + + # + # Determines whether this properties file can be appended to +--- jdk/src/share/lib/security/java.security-solaris 2012-08-10 10:30:16.000000000 -0700 ++++ jdk/src/share/lib/security/java.security-solaris 2013-01-16 08:58:10.000000000 -0800 +@@ -125,7 +125,7 @@ + # passed to checkPackageAccess unless the + # corresponding RuntimePermission ("accessClassInPackage."+package) has + # been granted. +-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. ++package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. + + # + # List of comma-separated packages that start with or equal this string +@@ -137,7 +137,7 @@ + # by default, none of the class loaders supplied with the JDK call + # checkPackageDefinition. + # +-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. ++package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. + + # + # Determines whether this properties file can be appended to +--- jdk/src/share/lib/security/java.security-windows 2012-08-10 10:30:16.000000000 -0700 ++++ jdk/src/share/lib/security/java.security-windows 2013-01-16 08:58:10.000000000 -0800 +@@ -124,7 +124,7 @@ + # passed to checkPackageAccess unless the + # corresponding RuntimePermission ("accessClassInPackage."+package) has + # been granted. +-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. ++package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. + + # + # List of comma-separated packages that start with or equal this string +@@ -136,7 +136,7 @@ + # by default, none of the class loaders supplied with the JDK call + # checkPackageDefinition. + # +-package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils. ++package.definition=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal. + + # + # Determines whether this properties file can be appended to --- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2012-08-10 10:30:16.000000000 -0700 -+++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2013-01-16 08:58:15.000000000 -0800 @@ -93,7 +93,7 @@ // bytes and byte arrays @@ -7796,7 +19054,7 @@ typedef unsigned int uLong; // Historical zlib, should be 32-bit. #else --- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2012-08-10 10:30:18.000000000 -0700 -+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2013-01-16 08:58:15.000000000 -0800 @@ -64,7 +64,7 @@ @@ -7807,7 +19065,7 @@ #endif --- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2012-08-10 10:30:19.000000000 -0700 -+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2013-01-16 08:58:15.000000000 -0800 @@ -24,6 +24,9 @@ * questions. */ @@ -7832,7 +19090,7 @@ #if defined(i386) || defined(i486) || \ defined(intel) || defined(x86) || defined(arm) || \ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2012-08-10 10:30:27.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2013-01-16 08:58:15.000000000 -0800 @@ -86,7 +86,7 @@ #endif /* MLIB_USE_FTOI_CLAMPING */ @@ -7873,7 +19131,7 @@ #endif /* _NO_LONGLONG */ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2012-08-10 10:30:27.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2013-01-16 08:58:15.000000000 -0800 @@ -126,7 +126,7 @@ #define D2I(x) CLAMP_S32((x) SAT_OFF) @@ -7914,7 +19172,7 @@ /***************************************************************/ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2012-08-10 10:30:27.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2013-01-16 08:58:15.000000000 -0800 @@ -94,7 +94,7 @@ #define D2I(x) CLAMP_S32((x) SAT_OFF) @@ -7955,7 +19213,7 @@ /***************************************************************/ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2013-01-16 08:58:15.000000000 -0800 @@ -126,7 +126,7 @@ #define D2I(x) CLAMP_S32((x) SAT_OFF) @@ -7996,7 +19254,7 @@ /***************************************************************/ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2013-01-16 08:58:15.000000000 -0800 @@ -95,7 +95,7 @@ #define D2I(x) CLAMP_S32((x) SAT_OFF) @@ -8037,7 +19295,7 @@ /***************************************************************/ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2013-01-16 08:58:15.000000000 -0800 @@ -126,7 +126,7 @@ #define D2I(x) CLAMP_S32((x) SAT_OFF) @@ -8078,7 +19336,7 @@ /***************************************************************/ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2013-01-16 08:58:15.000000000 -0800 @@ -94,7 +94,7 @@ #define D2I(x) CLAMP_S32((x) SAT_OFF) @@ -8119,7 +19377,7 @@ /***************************************************************/ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2013-01-16 08:58:15.000000000 -0800 @@ -95,7 +95,7 @@ dst = dp[0]; if (ld_offset + size < 32) { @@ -8340,7 +19598,7 @@ #else /* _LONGLONG */ --- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2013-01-16 08:58:15.000000000 -0800 @@ -168,7 +168,7 @@ } @@ -8622,7 +19880,7 @@ dp[13] = t1; dp[14] = t2; --- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2013-01-16 08:58:15.000000000 -0800 @@ -88,7 +88,7 @@ } d64_2_f32; @@ -8775,7 +20033,7 @@ ((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l; ((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h; --- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2012-08-10 10:30:28.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2013-01-16 08:58:15.000000000 -0800 @@ -30,7 +30,7 @@ typedef union { mlib_d64 db; @@ -8786,7 +20044,7 @@ #else mlib_s32 int0, int1; --- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2012-08-10 10:30:29.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2013-01-16 08:58:15.000000000 -0800 @@ -275,11 +275,11 @@ for (i = 0; j <= (b_size - 4); j += 4, i++) { src0 = src1; @@ -8886,7 +20144,7 @@ dp += SIZE; sp += SIZE; --- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2012-08-10 10:30:29.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2013-01-16 08:58:15.000000000 -0800 @@ -120,7 +120,7 @@ } \ } @@ -10120,7 +21378,7 @@ dp[13] = t1; dp[14] = t2; --- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2012-08-10 10:30:29.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2013-01-16 08:58:15.000000000 -0800 @@ -27,9 +27,21 @@ #ifndef MLIB_IMAGE_H #define MLIB_IMAGE_H @@ -10145,7 +21403,7 @@ #include <mlib_status.h> #include <mlib_sys.h> --- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2012-08-10 10:30:30.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2013-01-16 08:58:15.000000000 -0800 @@ -26,7 +26,7 @@ #include <stdlib.h> @@ -10168,7 +21426,7 @@ #else return (void *) memalign(8, size); --- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2012-08-10 10:30:30.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2012-08-19 12:39:59.000000000 -0700 ++++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2013-01-16 08:58:15.000000000 -0800 @@ -59,8 +59,16 @@ #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__) @@ -10187,7 +21445,7 @@ #if defined(MLIB_OS64BIT) || (defined(MACOSX) && defined(_LP64)) --- jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2012-08-10 10:31:05.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2013-01-16 00:07:18.000000000 -0800 @@ -393,16 +393,7 @@ OGLSDOps *dstOps, jint dx1, jint dy1, jint dx2, jint dy2) @@ -10218,7 +21476,7 @@ /** --- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2012-08-10 10:31:05.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2013-01-16 08:58:15.000000000 -0800 @@ -26,7 +26,7 @@ #ifndef OGLFuncs_h_Included #define OGLFuncs_h_Included @@ -10229,7 +21487,7 @@ #endif #include "jni.h" --- jdk/src/solaris/back/util_md.h 2012-08-10 10:31:14.000000000 -0700 -+++ jdk/src/solaris/back/util_md.h 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/back/util_md.h 2013-01-16 08:58:15.000000000 -0800 @@ -51,7 +51,7 @@ /* On little endian machines, convert java big endian numbers. */ @@ -10240,7 +21498,7 @@ #define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff))) #define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff))) --- jdk/src/solaris/bin/ergo.c 2012-08-10 10:31:14.000000000 -0700 -+++ jdk/src/solaris/bin/ergo.c 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/bin/ergo.c 2013-01-16 08:58:15.000000000 -0800 @@ -100,6 +100,27 @@ /* Compute physical memory by asking the OS */ uint64_t @@ -10276,7 +21534,7 @@ +#endif } --- jdk/src/solaris/bin/ergo.h 2012-08-10 10:31:14.000000000 -0700 -+++ jdk/src/solaris/bin/ergo.h 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/bin/ergo.h 2013-01-16 08:58:15.000000000 -0800 @@ -33,6 +33,10 @@ #include <sys/stat.h> #include <unistd.h> @@ -10289,7 +21547,7 @@ #include "java.h" --- jdk/src/solaris/bin/ergo_i586.c 2012-08-10 10:31:14.000000000 -0700 -+++ jdk/src/solaris/bin/ergo_i586.c 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/bin/ergo_i586.c 2013-01-16 08:58:15.000000000 -0800 @@ -106,7 +106,7 @@ #endif /* __solaris__ */ @@ -10348,8 +21606,30 @@ return result; +#endif } +--- jdk/src/solaris/bin/java_md_common.c 2012-08-10 10:31:14.000000000 -0700 ++++ jdk/src/solaris/bin/java_md_common.c 2013-01-16 08:58:11.000000000 -0800 +@@ -502,3 +502,19 @@ + return findBootClass(env, classname); + } + ++StdArg ++*JLI_GetStdArgs() ++{ ++ return NULL; ++} ++ ++int ++JLI_GetStdArgc() { ++ return 0; ++} ++ ++jobjectArray ++CreateApplicationArgs(JNIEnv *env, char **strv, int argc) ++{ ++ return NewPlatformStringArray(env, strv, argc); ++} --- jdk/src/solaris/bin/java_md_solinux.c 2012-08-10 10:31:14.000000000 -0700 -+++ jdk/src/solaris/bin/java_md_solinux.c 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/bin/java_md_solinux.c 2013-01-16 08:58:15.000000000 -0800 @@ -951,6 +951,19 @@ return exec_path; } @@ -10411,7 +21691,7 @@ } --- jdk/src/solaris/bin/java_md_solinux.h 2012-08-10 10:31:14.000000000 -0700 -+++ jdk/src/solaris/bin/java_md_solinux.h 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/bin/java_md_solinux.h 2013-01-16 08:58:15.000000000 -0800 @@ -33,6 +33,10 @@ #include <sys/time.h> #define CounterGet() (gethrtime()/1000) @@ -10446,8 +21726,652 @@ #endif #define JVM_DLL "libjvm.so" +--- jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java 2012-08-10 10:31:17.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -29,27 +29,12 @@ + import java.awt.peer.*; + import java.awt.event.*; + +-import java.lang.reflect.Field; +-import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + + class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPeer { + + /************************************************ + * +- * Data members +- * +- ************************************************/ +- +- /* +- * CheckboxMenuItem's fields +- */ +- private final static Field f_state; +- static { +- f_state = SunToolkit.getField(CheckboxMenuItem.class, "state"); +- } +- +- /************************************************ +- * + * Construction + * + ************************************************/ +@@ -74,16 +59,8 @@ + * + ************************************************/ + boolean getTargetState() { +- MenuItem target = getTarget(); +- if (target == null) { +- return false; +- } +- try { +- return f_state.getBoolean(target); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- return false; ++ return AWTAccessor.getCheckboxMenuItemAccessor() ++ .getState((CheckboxMenuItem)getTarget()); + } + + /************************************************ +--- jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2012-08-10 10:31:18.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -29,14 +29,8 @@ + import java.awt.dnd.DropTarget; + import java.awt.dnd.DropTargetListener; + import java.awt.event.*; +-import java.awt.image.ColorModel; +-import java.awt.image.ImageObserver; +-import java.awt.image.ImageProducer; +-import java.awt.image.VolatileImage; +-import java.awt.peer.*; + import sun.awt.*; +-import sun.awt.motif.X11FontMetrics; +-import java.lang.reflect.*; ++import sun.awt.AWTAccessor; + import sun.util.logging.PlatformLogger; + import java.util.*; + import static sun.awt.X11.XEmbedHelper.*; +@@ -455,16 +449,8 @@ + } + } + +- static Field bdataField; + static byte[] getBData(KeyEvent e) { +- try { +- if (bdataField == null) { +- bdataField = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); +- } +- return (byte[])bdataField.get(e); +- } catch (IllegalAccessException ex) { +- return null; +- } ++ return AWTAccessor.getAWTEventAccessor().getBData(e); + } + + void forwardKeyEvent(KeyEvent e) { +--- jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java 2012-08-10 10:31:18.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XEmbeddingContainer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -29,7 +29,7 @@ + import java.util.HashMap; + import java.awt.event.KeyEvent; + import java.lang.reflect.*; +-import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + + public class XEmbeddingContainer extends XEmbedHelper implements XEventDispatcher { + HashMap children = new HashMap(); +@@ -127,20 +127,8 @@ + } + } + +- static Field bdata; +- byte[] getBData(KeyEvent e) { +- try { +- if (bdata == null) { +- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); +- } +- return (byte[])bdata.get(e); +- } catch (IllegalAccessException ex) { +- return null; +- } +- } +- + void forwardKeyEvent(long child, KeyEvent e) { +- byte[] bdata = getBData(e); ++ byte[] bdata = AWTAccessor.getAWTEventAccessor().getBData(e); + long data = Native.toData(bdata); + if (data == 0) { + return; +--- jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java 2012-08-10 10:31:18.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java 2013-01-16 08:58:11.000000000 -0800 +@@ -27,10 +27,7 @@ + + import java.awt.*; + import java.awt.peer.ComponentPeer; +-import java.awt.peer.LightweightPeer; + import java.lang.ref.WeakReference; +-import java.lang.reflect.Field; +-import java.lang.reflect.Method; + import sun.awt.AWTAccessor; + + import sun.awt.GlobalCursorManager; +@@ -38,23 +35,6 @@ + + public final class XGlobalCursorManager extends GlobalCursorManager { + +- private static Field field_pData; +- private static Field field_type; +- private static Class cursorClass; +- private static Method method_setPData; +- static { +- cursorClass = java.awt.Cursor.class; +- field_pData = SunToolkit.getField(cursorClass, "pData"); +- field_type = SunToolkit.getField(cursorClass, "type"); +- method_setPData = SunToolkit.getMethod(cursorClass, "setPData", new Class[] {long.class}); +- if (field_pData == null || field_type == null || method_setPData == null) { +- System.out.println("Unable to initialize XGlobalCursorManager: "); +- Thread.dumpStack(); +- +- } +- } +- +- + // cached nativeContainer + private WeakReference<Component> nativeContainer; + +@@ -213,8 +193,8 @@ + long pData = 0; + int type = 0; + try { +- pData = field_pData.getLong(c); +- type = field_type.getInt(c); ++ pData = AWTAccessor.getCursorAccessor().getPData(c); ++ type = AWTAccessor.getCursorAccessor().getType(c); + } + catch (Exception e) + { +@@ -284,7 +264,7 @@ + + static void setPData(Cursor c, long pData) { + try { +- method_setPData.invoke(c, pData); ++ AWTAccessor.getCursorAccessor().setPData(c, pData); + } + catch (Exception e) + { +--- jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java 2012-08-10 10:31:18.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -28,10 +28,9 @@ + import java.awt.peer.*; + import java.awt.event.*; + +-import java.lang.reflect.Field; + import java.util.Vector; + import sun.util.logging.PlatformLogger; +-import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + + public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer { + +@@ -67,15 +66,6 @@ + private final static int BAR_ITEM_MARGIN_TOP = 2; + private final static int BAR_ITEM_MARGIN_BOTTOM = 2; + +- //fields +- private static Field f_helpMenu; +- private static Field f_menus; +- +- static { +- f_helpMenu = SunToolkit.getField(MenuBar.class, "helpMenu"); +- f_menus = SunToolkit.getField(MenuBar.class, "menus"); +- } +- + /************************************************ + * + * Mapping data +@@ -204,16 +194,12 @@ + */ + void postInit(XCreateWindowParams params) { + super.postInit(params); +- Vector targetMenuVector = null; +- Menu targetHelpMenu = null; +- try { +- // Get menus from the target. +- targetMenuVector = (Vector)f_menus.get(menuBarTarget); +- targetHelpMenu = (Menu)f_helpMenu.get(menuBarTarget); +- reloadItems(targetMenuVector); +- } catch (IllegalAccessException iae) { +- iae.printStackTrace(); +- } ++ // Get menus from the target. ++ Vector targetMenuVector = AWTAccessor.getMenuBarAccessor() ++ .getMenus(menuBarTarget); ++ Menu targetHelpMenu = AWTAccessor.getMenuBarAccessor() ++ .getHelpMenu(menuBarTarget); ++ reloadItems(targetMenuVector); + if (targetHelpMenu != null) { + addHelpMenu(targetHelpMenu); + } +--- jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java 2012-08-10 10:31:18.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -28,10 +28,7 @@ + import java.awt.peer.*; + import java.awt.event.*; + +-import java.lang.reflect.Field; +-import java.lang.reflect.Method; +-import java.lang.reflect.InvocationTargetException; +-import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + + public class XMenuItemPeer implements MenuItemPeer { + +@@ -81,24 +78,6 @@ + private final static int SEPARATOR_WIDTH = 20; + private final static int SEPARATOR_HEIGHT = 5; + +- /* +- * MenuItem's fields & methods +- */ +- private final static Field f_enabled; +- private final static Field f_label; +- private final static Field f_shortcut; +- private final static Method m_getFont; +- private final static Method m_isItemEnabled; +- private final static Method m_getActionCommand; +- static { +- f_enabled = SunToolkit.getField(MenuItem.class, "enabled"); +- f_label = SunToolkit.getField(MenuItem.class, "label"); +- f_shortcut = SunToolkit.getField(MenuItem.class, "shortcut"); +- +- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null); +- m_getActionCommand = SunToolkit.getMethod(MenuItem.class, "getActionCommandImpl", null); +- m_isItemEnabled = SunToolkit.getMethod(MenuItem.class, "isItemEnabled", null); +- } + /************************************************ + * + * Text Metrics +@@ -216,39 +195,22 @@ + if (target == null) { + return XWindow.getDefaultFont(); + } +- try { +- return (Font)m_getFont.invoke(target, new Object[0]); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } catch (InvocationTargetException e) { +- e.printStackTrace(); +- } +- return XWindow.getDefaultFont(); ++ return AWTAccessor.getMenuComponentAccessor().getFont_NoClientCode(target); + } + + String getTargetLabel() { + if (target == null) { + return ""; + } +- try { +- String label = (String)f_label.get(target); +- return (label == null) ? "" : label; +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- return ""; ++ String label = AWTAccessor.getMenuItemAccessor().getLabel(target); ++ return (label == null) ? "" : label; + } + + boolean isTargetEnabled() { + if (target == null) { + return false; + } +- try { +- return f_enabled.getBoolean(target); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- return false; ++ return AWTAccessor.getMenuItemAccessor().isEnabled(target); + } + + /** +@@ -260,40 +222,21 @@ + if (target == null) { + return false; + } +- try { +- return ((Boolean)m_isItemEnabled.invoke(target, new Object[0])).booleanValue(); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } catch (InvocationTargetException e) { +- e.printStackTrace(); +- } +- return false; ++ return AWTAccessor.getMenuItemAccessor().isItemEnabled(target); + } + + String getTargetActionCommand() { + if (target == null) { + return ""; + } +- try { +- return (String) m_getActionCommand.invoke(target,(Object[]) null); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } catch (InvocationTargetException e) { +- e.printStackTrace(); +- } +- return ""; ++ return AWTAccessor.getMenuItemAccessor().getActionCommandImpl(target); + } + + MenuShortcut getTargetShortcut() { + if (target == null) { + return null; + } +- try { +- return (MenuShortcut)f_shortcut.get(target); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- return null; ++ return AWTAccessor.getMenuItemAccessor().getShortcut(target); + } + + String getShortcutText() { +--- jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -27,10 +27,9 @@ + import java.awt.*; + import java.awt.peer.*; + +-import java.lang.reflect.Field; + import java.util.Vector; + import sun.util.logging.PlatformLogger; +-import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + + public class XMenuPeer extends XMenuItemPeer implements MenuPeer { + +@@ -46,16 +45,6 @@ + */ + XMenuWindow menuWindow; + +- +- /* +- * Menu's fields & methods +- */ +- private final static Field f_items; +- +- static { +- f_items = SunToolkit.getField(Menu.class, "items"); +- } +- + /************************************************ + * + * Construction +@@ -153,12 +142,7 @@ + * + ************************************************/ + Vector getTargetItems() { +- try { +- return (Vector)f_items.get(getTarget()); +- } catch (IllegalAccessException iae) { +- iae.printStackTrace(); +- return null; +- } ++ return AWTAccessor.getMenuAccessor().getItems((Menu)getTarget()); + } + + /************************************************ +--- jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -28,15 +28,10 @@ + import java.awt.peer.*; + import java.awt.event.*; + +-import java.lang.reflect.Field; +-import java.lang.reflect.Method; +-import java.lang.reflect.InvocationTargetException; +- + import java.util.Vector; ++import sun.awt.AWTAccessor; + import sun.util.logging.PlatformLogger; + +-import sun.awt.SunToolkit; +- + public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer { + + /************************************************ +@@ -66,24 +61,6 @@ + private final static int CAPTION_MARGIN_TOP = 4; + private final static int CAPTION_SEPARATOR_HEIGHT = 6; + +- /* +- * Menu's fields & methods +- */ +- //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false) +- private final static Field f_enabled; +- //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit +- private final static Field f_label; +- private final static Method m_getFont; +- private final static Field f_items; +- +- static { +- f_enabled = SunToolkit.getField(MenuItem.class, "enabled"); +- f_label = SunToolkit.getField(MenuItem.class, "label"); +- f_items = SunToolkit.getField(Menu.class, "items"); +- m_getFont = SunToolkit.getMethod(MenuComponent.class, "getFont_NoClientCode", null); +- } +- +- + /************************************************ + * + * Construction +@@ -96,7 +73,7 @@ + + /************************************************ + * +- * Implementaion of interface methods ++ * Implementation of interface methods + * + ************************************************/ + /* +@@ -189,27 +166,16 @@ + if (popupMenuTarget == null) { + return XWindow.getDefaultFont(); + } +- try { +- return (Font)m_getFont.invoke(popupMenuTarget, new Object[0]); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } catch (InvocationTargetException e) { +- e.printStackTrace(); +- } +- return XWindow.getDefaultFont(); ++ return AWTAccessor.getMenuComponentAccessor() ++ .getFont_NoClientCode(popupMenuTarget); + } + ++ //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit + String getTargetLabel() { + if (target == null) { + return ""; + } +- try { +- String label = (String)f_label.get(popupMenuTarget); +- return (label == null) ? "" : label; +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- return ""; ++ return AWTAccessor.getMenuItemAccessor().getLabel(popupMenuTarget); + } + + //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false) +@@ -217,21 +183,14 @@ + if (popupMenuTarget == null) { + return false; + } +- try { +- return f_enabled.getBoolean(popupMenuTarget); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- return false; ++ return AWTAccessor.getMenuItemAccessor().isEnabled(popupMenuTarget); + } + + Vector getMenuTargetItems() { +- try { +- return (Vector)f_items.get(popupMenuTarget); +- } catch (IllegalAccessException iae) { +- iae.printStackTrace(); ++ if (popupMenuTarget == null) { + return null; + } ++ return AWTAccessor.getMenuAccessor().getItems(popupMenuTarget); + } + + /************************************************ +--- jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XScrollPanePeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -29,7 +29,7 @@ + import java.awt.event.*; + import java.awt.peer.*; + import java.lang.reflect.*; +-import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + + class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollbarClient { + +@@ -41,9 +41,7 @@ + public final static int VERTICAL = 1 << 0; + public final static int HORIZONTAL = 1 << 1; + +- private static Method m_setValue; + static { +- m_setValue = SunToolkit.getMethod(ScrollPaneAdjustable.class, "setTypedValue", new Class[] {Integer.TYPE, Integer.TYPE}); + SCROLLBAR = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth"); + } + +@@ -316,19 +314,9 @@ + } + + void setAdjustableValue(ScrollPaneAdjustable adj, int value, int type) { +- try { +- m_setValue.invoke(adj, new Object[] {Integer.valueOf(value), Integer.valueOf(type)}); +- } catch (IllegalAccessException iae) { +- adj.setValue(value); +- } catch (IllegalArgumentException iae2) { +- adj.setValue(value); +- } catch (InvocationTargetException ite) { +- adj.setValue(value); +- ite.getCause().printStackTrace(); +- } ++ AWTAccessor.getScrollPaneAdjustableAccessor().setTypedValue(adj, value, type); + } + +- + public void paint(Graphics g) { + paintComponent(g); + } +--- jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java 2013-01-16 08:58:11.000000000 -0800 +@@ -27,10 +27,9 @@ + + import java.awt.*; + import java.awt.peer.SystemTrayPeer; +-import java.lang.reflect.Method; +-import java.lang.reflect.InvocationTargetException; + import sun.awt.SunToolkit; + import sun.awt.AppContext; ++import sun.awt.AWTAccessor; + import sun.util.logging.PlatformLogger; + + public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener { +@@ -42,11 +41,6 @@ + private volatile boolean available; + private final XMSelection selection = new XMSelection("_NET_SYSTEM_TRAY"); + +- private static final Method firePropertyChangeMethod = +- XToolkit.getMethod(SystemTray.class, "firePropertyChange", new Class[] {String.class, Object.class, Object.class}); +- private static final Method addNotifyMethod = XToolkit.getMethod(TrayIcon.class, "addNotify", null); +- private static final Method removeNotifyMethod = XToolkit.getMethod(TrayIcon.class, "removeNotify", null); +- + private static final int SCREEN = 0; + private static final String SYSTEM_TRAY_PROPERTY_NAME = "systemTray"; + private static final XAtom _NET_SYSTEM_TRAY = XAtom.get("_NET_SYSTEM_TRAY_S" + SCREEN); +@@ -157,46 +151,45 @@ + return peerInstance; + } + +- private void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) { ++ private void firePropertyChange(final String propertyName, ++ final Object oldValue, ++ final Object newValue) { + Runnable runnable = new Runnable() { + public void run() { +- Object[] args = new Object[] {propertyName, oldValue, newValue}; +- invokeMethod(firePropertyChangeMethod, target, args); ++ AWTAccessor.getSystemTrayAccessor() ++ .firePropertyChange(target, propertyName, oldValue, newValue); + } + }; + invokeOnEachAppContext(runnable); + } + + private void createTrayPeers() { +- invokeOnEachTrayIcon(addNotifyMethod); ++ Runnable runnable = new Runnable() { ++ public void run() { ++ TrayIcon[] icons = target.getTrayIcons(); ++ try { ++ for (TrayIcon ti : icons) { ++ AWTAccessor.getTrayIconAccessor().addNotify(ti); ++ } ++ } catch (AWTException e) { ++ } ++ } ++ }; ++ invokeOnEachAppContext(runnable); + } + + private void removeTrayPeers() { +- invokeOnEachTrayIcon(removeNotifyMethod); +- } +- +- private void invokeOnEachTrayIcon(final Method method) { + Runnable runnable = new Runnable() { + public void run() { + TrayIcon[] icons = target.getTrayIcons(); + for (TrayIcon ti : icons) { +- invokeMethod(method, ti, (Object[]) null); ++ AWTAccessor.getTrayIconAccessor().removeNotify(ti); + } + } + }; + invokeOnEachAppContext(runnable); + } + +- private void invokeMethod(Method method, Object obj, Object[] args) { +- try{ +- method.invoke(obj, args); +- } catch (InvocationTargetException e){ +- e.printStackTrace(); +- } catch (IllegalAccessException e) { +- e.printStackTrace(); +- } +- } +- + private void invokeOnEachAppContext(Runnable runnable) { + for (AppContext appContext : AppContext.getAppContexts()) { + SunToolkit.invokeLaterOnAppContext(appContext, runnable); --- jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-08-10 10:31:19.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2013-01-16 08:58:11.000000000 -0800 @@ -105,6 +105,7 @@ this.target = target; @@ -10478,8 +22402,21 @@ // JTextArea.setText() posts two different events (remove & insert). // Since we make no differences between text events, // the document listener has to be disabled while +@@ -1006,8 +1015,10 @@ + // loading SystemFlavorMap and associated classes. + public void setTransferHandler(TransferHandler newHandler) { + TransferHandler oldHandler = (TransferHandler) +- getClientProperty(XTextTransferHelper.getTransferHandlerKey()); +- putClientProperty(XTextTransferHelper.getTransferHandlerKey(), ++ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor() ++ .getJComponent_TRANSFER_HANDLER()); ++ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor() ++ .getJComponent_TRANSFER_HANDLER(), + newHandler); + + firePropertyChange("transferHandler", oldHandler, newHandler); --- jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-08-10 10:31:19.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2013-01-16 08:58:11.000000000 -0800 @@ -73,6 +73,8 @@ xtext = new XAWTTextField(text,this, target.getParent()); xtext.getDocument().addDocumentListener(xtext); @@ -10489,8 +22426,279 @@ XToolkit.specialPeerMap.put(xtext,this); TextField txt = (TextField) target; +@@ -714,8 +716,10 @@ + // loading SystemFlavorMap and associated classes. + public void setTransferHandler(TransferHandler newHandler) { + TransferHandler oldHandler = (TransferHandler) +- getClientProperty(XTextTransferHelper.getTransferHandlerKey()); +- putClientProperty(XTextTransferHelper.getTransferHandlerKey(), ++ getClientProperty(AWTAccessor.getClientPropertyKeyAccessor() ++ .getJComponent_TRANSFER_HANDLER()); ++ putClientProperty(AWTAccessor.getClientPropertyKeyAccessor() ++ .getJComponent_TRANSFER_HANDLER(), + newHandler); + + firePropertyChange("transferHandler", oldHandler, newHandler); +--- jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XTextTransferHelper.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,47 +0,0 @@ +-/* +- * Copyright (c) 2003, 2007, 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 sun.awt.X11; +- +-import java.lang.reflect.Field; +-import sun.awt.SunToolkit; +- +-class XTextTransferHelper { +- private static Object transferHandlerKey = null; +- static Object getTransferHandlerKey() { +- if (transferHandlerKey == null) { +- try { +- Class clazz = Class.forName("javax.swing.ClientPropertyKey"); +- Field field = SunToolkit.getField(clazz, "JComponent_TRANSFER_HANDLER"); +- transferHandlerKey = field.get(null); +- } catch (IllegalAccessException ex) { +- return null; +- } catch (ClassNotFoundException cnfe) { +- cnfe.printStackTrace(); +- } +- } +- return transferHandlerKey; +- } +-} +--- jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2013-01-16 08:58:11.000000000 -0800 +@@ -41,8 +41,6 @@ + import java.awt.image.ColorModel; + import java.awt.peer.*; + import java.beans.PropertyChangeListener; +-import java.lang.reflect.InvocationTargetException; +-import java.lang.reflect.Method; + import java.security.AccessController; + import java.security.PrivilegedAction; + import java.util.*; +@@ -50,9 +48,9 @@ + import javax.swing.UIDefaults; + import sun.awt.*; + import sun.font.FontConfigManager; +-import sun.font.FontManager; + import sun.misc.PerformanceLogger; + import sun.print.PrintJob2D; ++import sun.security.action.GetPropertyAction; + import sun.security.action.GetBooleanAction; + import sun.util.logging.PlatformLogger; + +@@ -112,7 +110,6 @@ + private static int screenWidth = -1, screenHeight = -1; // Dimensions of default screen + static long awt_defaultFg; // Pixel + private static XMouseInfoPeer xPeer; +- private static Method m_removeSourceEvents; + + static { + initSecurityWarning(); +@@ -130,8 +127,6 @@ + initIDs(); + setBackingStoreType(); + } +- m_removeSourceEvents = SunToolkit.getMethod(EventQueue.class, "removeSourceEvents", new Class[] {Object.class, Boolean.TYPE}) ; +- + noisyAwtHandler = AccessController.doPrivileged(new GetBooleanAction("sun.awt.noisyerrorhandler")); + } + +@@ -222,7 +217,8 @@ + + static void initSecurityWarning() { + // Enable warning only for internal builds +- String runtime = getSystemProperty("java.runtime.version"); ++ String runtime = AccessController.doPrivileged( ++ new GetPropertyAction("java.runtime.version")); + securityWarningEnabled = (runtime != null && runtime.contains("internal")); + } + +@@ -1067,8 +1063,8 @@ + */ + public synchronized static boolean getSunAwtDisableGtkFileDialogs() { + if (sunAwtDisableGtkFileDialogs == null) { +- sunAwtDisableGtkFileDialogs = +- getBooleanSystemProperty("sun.awt.disableGtkFileDialogs"); ++ sunAwtDisableGtkFileDialogs = AccessController.doPrivileged( ++ new GetBooleanAction("sun.awt.disableGtkFileDialogs")); + } + return sunAwtDisableGtkFileDialogs.booleanValue(); + } +@@ -2056,17 +2052,11 @@ + return null; + } + +- static void removeSourceEvents(EventQueue queue, Object source, boolean removeAllEvents) { +- try { +- m_removeSourceEvents.invoke(queue, source, removeAllEvents); +- } +- catch (IllegalAccessException e) +- { +- e.printStackTrace(); +- } +- catch (InvocationTargetException e) { +- e.printStackTrace(); +- } ++ static void removeSourceEvents(EventQueue queue, ++ Object source, ++ boolean removeAllEvents) { ++ AWTAccessor.getEventQueueAccessor() ++ .removeSourceEvents(queue, source, removeAllEvents); + } + + public boolean isAlwaysOnTopSupported() { +--- jdk/src/solaris/classes/sun/awt/X11/XWindow.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XWindow.java 2013-01-16 08:58:11.000000000 -0800 +@@ -126,10 +126,6 @@ + native void getWindowBounds(long window, long x, long y, long width, long height); + private native static void initIDs(); + +- private static Field isPostedField; +- private static Field rawCodeField; +- private static Field primaryLevelUnicodeField; +- private static Field extendedKeyCodeField; + static { + initIDs(); + } +@@ -398,20 +394,11 @@ + + static Method m_sendMessage; + static void sendEvent(final AWTEvent e) { +- if (isPostedField == null) { +- isPostedField = SunToolkit.getField(AWTEvent.class, "isPosted"); +- } + // The uses of this method imply that the incoming event is system-generated + SunToolkit.setSystemGenerated(e); + PeerEvent pe = new PeerEvent(Toolkit.getDefaultToolkit(), new Runnable() { + public void run() { +- try { +- isPostedField.setBoolean(e, true); +- } catch (IllegalArgumentException e) { +- assert(false); +- } catch (IllegalAccessException e) { +- assert(false); +- } ++ AWTAccessor.getAWTEventAccessor().setPosted(e); + ((Component)e.getSource()).dispatchEvent(e); + } + }, PeerEvent.ULTIMATE_PRIORITY_EVENT); +@@ -1427,16 +1414,8 @@ + } + + +- static Field bdata; + static void setBData(KeyEvent e, byte[] data) { +- try { +- if (bdata == null) { +- bdata = SunToolkit.getField(java.awt.AWTEvent.class, "bdata"); +- } +- bdata.set(e, data); +- } catch (IllegalAccessException ex) { +- assert false; +- } ++ AWTAccessor.getAWTEventAccessor().setBData(e, data); + } + + public void postKeyEvent(int id, long when, int keyCode, int keyChar, +@@ -1446,15 +1425,6 @@ + { + long jWhen = XToolkit.nowMillisUTC_offset(when); + int modifiers = getModifiers(state, 0, keyCode); +- if (rawCodeField == null) { +- rawCodeField = XToolkit.getField(KeyEvent.class, "rawCode"); +- } +- if (primaryLevelUnicodeField == null) { +- primaryLevelUnicodeField = XToolkit.getField(KeyEvent.class, "primaryLevelUnicode"); +- } +- if (extendedKeyCodeField == null) { +- extendedKeyCodeField = XToolkit.getField(KeyEvent.class, "extendedKeyCode"); +- } + + KeyEvent ke = new KeyEvent((Component)getEventSource(), id, jWhen, + modifiers, keyCode, (char)keyChar, keyLocation); +@@ -1462,15 +1432,11 @@ + byte[] data = Native.toBytes(event, eventSize); + setBData(ke, data); + } +- try { +- rawCodeField.set(ke, rawCode); +- primaryLevelUnicodeField.set(ke, (long)unicodeFromPrimaryKeysym); +- extendedKeyCodeField.set(ke, (long)extendedKeyCode); +- } catch (IllegalArgumentException e) { +- assert(false); +- } catch (IllegalAccessException e) { +- assert(false); +- } ++ ++ AWTAccessor.KeyEventAccessor kea = AWTAccessor.getKeyEventAccessor(); ++ kea.setRawCode(ke, rawCode); ++ kea.setPrimaryLevelUnicode(ke, (long)unicodeFromPrimaryKeysym); ++ kea.setExtendedKeyCode(ke, (long)extendedKeyCode); + postEventToEventQueue(ke); + } + +--- jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java 2012-08-10 10:31:19.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java 2013-01-16 08:58:11.000000000 -0800 +@@ -27,6 +27,7 @@ + + import java.security.AccessController; + import java.security.PrivilegedAction; ++import sun.security.action.GetPropertyAction; + import sun.misc.*; + + final public class XlibWrapper +@@ -590,12 +591,8 @@ + static final boolean isBuildInternal; + + static { +- String dataModelProp = (String)AccessController.doPrivileged( +- new PrivilegedAction() { +- public Object run() { +- return System.getProperty("sun.arch.data.model"); +- } +- }); ++ String dataModelProp = AccessController.doPrivileged( ++ new GetPropertyAction("sun.arch.data.model")); + try { + dataModel = Integer.parseInt(dataModelProp); + } catch (Exception e) { +@@ -647,7 +644,8 @@ + } + + private static boolean getBuildInternal() { +- String javaVersion = XToolkit.getSystemProperty("java.version"); ++ String javaVersion = AccessController.doPrivileged( ++ new GetPropertyAction("java.version")); + return javaVersion != null && javaVersion.contains("internal"); + } + --- jdk/src/solaris/classes/sun/awt/X11FontManager.java 2012-08-10 10:31:20.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11FontManager.java 2012-08-19 12:40:00.000000000 -0700 ++++ jdk/src/solaris/classes/sun/awt/X11FontManager.java 2013-01-16 08:58:15.000000000 -0800 @@ -213,7 +213,7 @@ if (fontID != null) { fileName = (String)fontNameMap.get(fontID); @@ -10518,8 +22726,93 @@ (!mFontConfig.foundOsSpecificFile() || !mFontConfig.fontFilesArePresent()) || (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) { +--- jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2012-08-10 10:31:23.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2013-01-16 08:58:11.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2012, 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 +@@ -68,7 +68,7 @@ + static final short REVENT_OFFSET = 6; + + // Special value to indicate that an update should be ignored +- static final byte CANCELLED = (byte)-1; ++ static final byte IGNORE = (byte)-1; + + // Maximum number of open file descriptors + static final int OPEN_MAX = fdLimit(); +@@ -192,15 +192,15 @@ + + // events are stored as bytes for efficiency reasons + byte b = (byte)mask; +- assert (b == mask) && (b != CANCELLED); ++ assert (b == mask) && (b != IGNORE); + setUpdateEvents(fd, b); + } + } + + void release(int fd) { + synchronized (updateLock) { +- // cancel any pending update for this file descriptor +- setUpdateEvents(fd, CANCELLED); ++ // ignore any pending update for this file descriptor ++ setUpdateEvents(fd, IGNORE); + + // remove from /dev/poll + if (registered.get(fd)) { +@@ -236,32 +236,40 @@ + while (j < updateCount) { + int fd = updateDescriptors[j]; + short events = getUpdateEvents(fd); +- boolean isRegistered = registered.get(fd); ++ boolean wasRegistered = registered.get(fd); + + // events = 0 => POLLREMOVE or do-nothing +- if (events != CANCELLED) { ++ if (events != IGNORE) { + if (events == 0) { +- if (isRegistered) { ++ if (wasRegistered) { + events = POLLREMOVE; + registered.clear(fd); + } else { +- events = CANCELLED; ++ events = IGNORE; + } + } else { +- if (!isRegistered) { ++ if (!wasRegistered) { + registered.set(fd); + } + } + } + + // populate pollfd array with updated event +- if (events != CANCELLED) { ++ if (events != IGNORE) { ++ // insert POLLREMOVE if changing events ++ if (wasRegistered && events != POLLREMOVE) { ++ putPollFD(pollArray, index, fd, POLLREMOVE); ++ index++; ++ } + putPollFD(pollArray, index, fd, events); + index++; +- if (index >= NUM_POLLFDS) { ++ if (index >= (NUM_POLLFDS-1)) { + registerMultiple(wfd, pollArray.address(), index); + index = 0; + } ++ ++ // events for this fd now up to date ++ setUpdateEvents(fd, IGNORE); + } + j++; + } --- jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2013-01-16 08:58:15.000000000 -0800 @@ -68,7 +68,7 @@ return createProvider("sun.nio.fs.SolarisFileSystemProvider"); if (osname.equals("Linux")) @@ -10530,7 +22823,7 @@ throw new AssertionError("Platform not recognized"); } --- jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10593,7 +22886,7 @@ } finally { close(fd); --- jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10611,7 +22904,7 @@ // register with inotify (replaces existing mask if already registered) --- jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10638,7 +22931,7 @@ } if (x.errno() == EINVAL && (n < 3)) --- jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10701,7 +22994,7 @@ "': " + x.getMessage()); } finally { --- jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10719,7 +23012,7 @@ // return existing watch key after updating events if already --- jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2013-01-16 00:07:19.000000000 -0800 @@ -36,6 +36,8 @@ import sun.misc.SharedSecrets; import sun.misc.JavaIOFileDescriptorAccess; @@ -10762,7 +23055,7 @@ oflags |= O_NOFOLLOW; } --- jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10827,7 +23120,7 @@ x.rethrowAsIOException(target); } --- jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10855,7 +23148,7 @@ } } --- jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2012-08-10 10:31:24.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10907,7 +23200,7 @@ return null; // keep compiler happy } --- jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2012-08-10 10:31:25.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2013-01-16 00:07:19.000000000 -0800 @@ -548,10 +548,6 @@ return hasAtSysCalls; } @@ -10920,7 +23213,7 @@ private static native int init(); --- jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2012-08-10 10:31:25.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2013-01-16 00:07:19.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. @@ -10960,7 +23253,7 @@ x.rethrowAsIOException(this); --- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-08-10 10:31:25.000000000 -0700 -+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2013-01-16 08:58:15.000000000 -0800 @@ -125,6 +125,7 @@ static boolean isBSD() { @@ -10970,7 +23263,7 @@ } --- jdk/src/solaris/javavm/export/jvm_md.h 2012-08-10 10:31:28.000000000 -0700 -+++ jdk/src/solaris/javavm/export/jvm_md.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/javavm/export/jvm_md.h 2013-01-16 08:58:15.000000000 -0800 @@ -75,7 +75,11 @@ #define JVM_O_O_APPEND O_APPEND #define JVM_O_EXCL O_EXCL @@ -10984,7 +23277,7 @@ /* Signals */ --- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2012-08-10 10:31:28.000000000 -0700 -+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -168,6 +168,9 @@ /* * XXXBSD: there's no way available to get swap info in @@ -11035,7 +23328,7 @@ // throw_internal_error(env, "Unimplemented in FreeBSD"); return (100); --- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-08-10 10:31:30.000000000 -0700 -+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -146,7 +146,6 @@ return rv; } @@ -11045,7 +23338,7 @@ Java_java_io_UnixFileSystem_setPermission(JNIEnv *env, jobject this, jobject file, --- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2012-08-10 10:31:30.000000000 -0700 -+++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -53,7 +53,7 @@ for (i = 0; environ[i]; i++) { @@ -11065,7 +23358,7 @@ const char * valBeg = varEnd + 1; jsize varLength = varEnd - environ[i]; --- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2012-08-10 10:31:30.000000000 -0700 -+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -394,7 +394,17 @@ return c >= '0' && c <= '9'; } @@ -11093,8 +23386,39 @@ static int moveDescriptor(int fd_from, int fd_to) +--- jdk/src/solaris/native/java/lang/java_props_md.c 2012-08-10 10:31:30.000000000 -0700 ++++ jdk/src/solaris/native/java/lang/java_props_md.c 2013-01-16 08:58:15.000000000 -0800 +@@ -151,7 +151,7 @@ + lc = setlocale(cat, NULL); + #endif + +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(__OpenBSD__) + if (lc == NULL) { + return 0; + } +@@ -484,12 +484,19 @@ + &(sprops.format_country), + &(sprops.format_variant), + &(sprops.encoding))) { ++#ifdef __OpenBSD__ ++ sprops.language = sprops.format_language; ++ sprops.script = sprops.format_script; ++ sprops.country = sprops.format_country; ++ sprops.variant = sprops.format_variant; ++#else + ParseLocale(LC_MESSAGES, + &(sprops.language), + &(sprops.script), + &(sprops.country), + &(sprops.variant), + NULL); ++#endif + } else { + sprops.language = "en"; + sprops.encoding = "ISO8859-1"; --- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2012-08-10 10:31:30.000000000 -0700 -+++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2013-01-16 08:58:15.000000000 -0800 @@ -669,11 +669,11 @@ sizeof(struct sockaddr)); if (n < 0 && errno != EINPROGRESS ) { @@ -11125,7 +23449,7 @@ #endif /* __linux__ */ close(fd); --- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2012-08-10 10:31:30.000000000 -0700 -+++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2013-01-16 08:58:15.000000000 -0800 @@ -512,11 +512,11 @@ n = sendto(fd, sendbuf, plen, 0, (struct sockaddr*) him, sizeof(struct sockaddr_in6)); if (n < 0 && errno != EINPROGRESS) { @@ -11156,7 +23480,7 @@ #endif /* __linux__ */ close(fd); --- jdk/src/solaris/native/java/net/NetworkInterface.c 2012-08-10 10:31:31.000000000 -0700 -+++ jdk/src/solaris/native/java/net/NetworkInterface.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/net/NetworkInterface.c 2013-01-16 08:58:15.000000000 -0800 @@ -60,14 +60,18 @@ #include <sys/param.h> #include <sys/ioctl.h> @@ -11204,7 +23528,7 @@ #endif --- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2012-08-10 10:31:31.000000000 -0700 -+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2013-01-16 08:58:15.000000000 -0800 @@ -23,12 +23,12 @@ * questions. */ @@ -11243,7 +23567,7 @@ } JVM_Connect(fd, (struct sockaddr *)&addr, len); --- jdk/src/solaris/native/java/net/net_util_md.c 2012-08-10 10:31:31.000000000 -0700 -+++ jdk/src/solaris/native/java/net/net_util_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/net/net_util_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -45,6 +45,10 @@ #endif #endif @@ -11280,7 +23604,7 @@ return setsockopt(fd, level, opt, arg, len); } --- jdk/src/solaris/native/java/net/net_util_md.h 2012-08-10 10:31:31.000000000 -0700 -+++ jdk/src/solaris/native/java/net/net_util_md.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/net/net_util_md.h 2013-01-16 08:58:15.000000000 -0800 @@ -37,7 +37,7 @@ #endif @@ -11291,7 +23615,7 @@ extern int NET_Read(int s, void* buf, size_t len); extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, --- jdk/src/solaris/native/java/util/TimeZone_md.c 2012-08-10 10:31:31.000000000 -0700 -+++ jdk/src/solaris/native/java/util/TimeZone_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/java/util/TimeZone_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -123,7 +123,7 @@ return NULL; } @@ -11326,7 +23650,7 @@ -#endif /* MACOSX */ +#endif /* _ALLBSD_SOURCE */ --- jdk/src/solaris/native/sun/awt/awt_Font.c 2012-08-10 10:31:32.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_Font.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_Font.c 2013-01-16 08:58:15.000000000 -0800 @@ -334,7 +334,7 @@ if (strcmp(style, "regular") == 0) { altstyle = "roman"; @@ -11337,7 +23661,7 @@ family = "lucida"; } --- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2012-08-10 10:31:32.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2013-01-16 08:58:15.000000000 -0800 @@ -123,7 +123,7 @@ */ @@ -11398,7 +23722,7 @@ return point; } --- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2012-08-10 10:31:32.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-01-16 08:58:15.000000000 -0800 @@ -67,7 +67,7 @@ XIMPreeditDrawCallbackStruct *); static void PreeditCaretCallback(XIC, XPointer, @@ -11639,7 +23963,7 @@ adjustStatusWindow(window); AWT_UNLOCK(); --- jdk/src/solaris/native/sun/awt/awt_Robot.c 2012-08-10 10:31:32.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2013-01-16 08:58:15.000000000 -0800 @@ -45,7 +45,7 @@ #include "wsutils.h" #include "list.h" @@ -11650,7 +23974,7 @@ #endif --- jdk/src/solaris/native/sun/awt/awt_util.h 2012-08-10 10:31:33.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_util.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_util.h 2013-01-16 08:58:15.000000000 -0800 @@ -187,7 +187,7 @@ #ifdef __solaris__ extern Widget awt_util_getXICStatusAreaWindow(Widget w); @@ -11670,7 +23994,7 @@ Cardinal num_refs; /* Number of referencing widgets. */ Cardinal max_refs; /* Maximum length of refs array. */ --- jdk/src/solaris/native/sun/awt/awt_wm.c 2012-08-10 10:31:33.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_wm.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_wm.c 2013-01-16 08:58:15.000000000 -0800 @@ -121,12 +121,19 @@ static Atom XA_KWM_WIN_MAXIMIZED; @@ -11769,7 +24093,7 @@ } else { --- jdk/src/solaris/native/sun/awt/awt_wm.h 2012-08-10 10:31:33.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_wm.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/awt_wm.h 2013-01-16 08:58:15.000000000 -0800 @@ -45,7 +45,10 @@ KDE2_WM, SAWFISH_WM, @@ -11783,7 +24107,7 @@ extern void awt_wm_init(void); --- jdk/src/solaris/native/sun/awt/extutil.h 2012-08-10 10:31:33.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/extutil.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/extutil.h 2013-01-16 08:58:15.000000000 -0800 @@ -58,7 +58,7 @@ */ /* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ @@ -11800,7 +24124,7 @@ -#endif /* __linux__ || MACOSX */ +#endif /* __linux__ || _ALLBSD_SOURCE */ --- jdk/src/solaris/native/sun/awt/fontpath.c 2012-08-10 10:31:33.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/fontpath.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/fontpath.c 2013-01-16 08:58:15.000000000 -0800 @@ -23,7 +23,7 @@ * questions. */ @@ -11879,7 +24203,7 @@ #endif #endif /* !HEADLESS */ --- jdk/src/solaris/native/sun/awt/robot_common.c 2012-08-10 10:31:35.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/robot_common.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/robot_common.c 2013-01-16 08:58:15.000000000 -0800 @@ -27,7 +27,7 @@ #error This file should not be included in headless library #endif @@ -11890,7 +24214,7 @@ #endif --- jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2012-08-10 10:31:35.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2013-01-16 00:07:20.000000000 -0800 @@ -32,7 +32,7 @@ #include <X11/Xutil.h> #include <X11/extensions/shape.h> @@ -11901,7 +24225,7 @@ #include <signal.h> #include <inttypes.h> --- jdk/src/solaris/native/sun/java2d/j2d_md.h 2012-08-10 10:31:35.000000000 -0700 -+++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2013-01-16 08:58:15.000000000 -0800 @@ -28,9 +28,9 @@ #include <sys/types.h> @@ -11915,7 +24239,7 @@ #endif /* __linux__ || MACOSX */ --- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2012-08-10 10:31:36.000000000 -0700 -+++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2013-01-16 08:58:15.000000000 -0800 @@ -804,7 +804,7 @@ static int initialized; static int usevis = JNI_TRUE; @@ -11926,7 +24250,7 @@ #else # define ULTRA_CHIP "sun4u" --- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2013-01-16 08:58:15.000000000 -0800 @@ -77,7 +77,7 @@ JNIEXPORT void JNICALL @@ -11946,7 +24270,7 @@ #if defined(_ALLBSD_SOURCE) him6->sin6_family = AF_INET6; --- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2013-01-16 08:58:15.000000000 -0800 @@ -36,7 +36,6 @@ #include <sys/socket.h> @@ -12012,7 +24336,7 @@ result = sendmsg(fd, &m, 0); if (result < 0 && errno == ECONNREFUSED) { --- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2013-01-16 08:58:15.000000000 -0800 @@ -201,7 +201,7 @@ return IOS_THROWN; } @@ -12032,28 +24356,8 @@ if (numBytes > 0) --- jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2012-08-19 12:40:01.000000000 -0700 -@@ -94,6 +94,9 @@ - { - jint fd = fdval(env, fdo); - struct iovec *iov = (struct iovec *)jlong_to_ptr(address); -+ if (len > 16) { -+ len = 16; -+ } - return convertLongReturnVal(env, readv(fd, iov, len), JNI_TRUE); - } - -@@ -123,6 +126,9 @@ - { - jint fd = fdval(env, fdo); - struct iovec *iov = (struct iovec *)jlong_to_ptr(address); -+ if (len > 16) { -+ len = 16; -+ } - return convertLongReturnVal(env, writev(fd, iov, len), JNI_FALSE); - } - -@@ -200,7 +206,7 @@ ++++ jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2013-01-16 08:58:15.000000000 -0800 +@@ -200,7 +200,7 @@ } lockResult = fcntl(fd, cmd, &fl); if (lockResult < 0) { @@ -12062,7 +24366,7 @@ return sun_nio_ch_FileDispatcherImpl_NO_LOCK; if (errno == EINTR) return sun_nio_ch_FileDispatcherImpl_INTERRUPTED; -@@ -227,6 +233,21 @@ +@@ -227,6 +227,21 @@ fl.l_start = (off64_t)pos; fl.l_type = F_UNLCK; lockResult = fcntl(fd, cmd, &fl); @@ -12084,27 +24388,8 @@ if (lockResult < 0) { JNU_ThrowIOExceptionWithLastError(env, "Release failed"); } ---- jdk/src/solaris/native/sun/nio/ch/IOUtil.c 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/IOUtil.c 2012-08-19 12:40:01.000000000 -0700 -@@ -144,16 +144,6 @@ - } - } - --JNIEXPORT jint JNICALL --Java_sun_nio_ch_IOUtil_iovMax(JNIEnv *env, jclass this) --{ -- jlong iov_max = sysconf(_SC_IOV_MAX); -- if (iov_max == -1) -- iov_max = 16; -- return (jint)iov_max; --} -- -- - /* Declared in nio_util.h for use elsewhere in NIO */ - - jlong --- jdk/src/solaris/native/sun/nio/ch/Sctp.h 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/Sctp.h 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/ch/Sctp.h 2013-01-16 08:58:15.000000000 -0800 @@ -320,8 +320,20 @@ typedef int sctp_peeloff_func(int sock, sctp_assoc_t id); @@ -12145,7 +24430,7 @@ #endif /* !SUN_NIO_CH_SCTP_H */ --- jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2012-08-10 10:31:37.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2013-01-16 08:58:15.000000000 -0800 @@ -58,6 +58,7 @@ */ jboolean loadSocketExtensionFuncs @@ -12163,7 +24448,7 @@ funcsLoaded = JNI_TRUE; return JNI_TRUE; --- jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2012-08-10 10:31:38.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2013-01-16 00:07:20.000000000 -0800 @@ -27,7 +27,7 @@ #include <errno.h> #include <unistd.h> @@ -12174,7 +24459,7 @@ /** --- jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2012-08-10 10:31:38.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2013-01-16 08:58:15.000000000 -0800 @@ -26,7 +26,7 @@ #include <stdio.h> #include <errno.h> @@ -12198,7 +24483,7 @@ // mode masks emitX("S_IAMB", --- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2012-08-10 10:31:38.000000000 -0700 -+++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -36,6 +36,11 @@ #include "j2secmod.h" @@ -12234,7 +24519,7 @@ dprintf2("-handle: %u (0X%X)\n", hModule, hModule); --- jdk/src/solaris/native/sun/xawt/XWindow.c 2012-08-10 10:31:38.000000000 -0700 -+++ jdk/src/solaris/native/sun/xawt/XWindow.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/native/sun/xawt/XWindow.c 2013-01-16 08:58:15.000000000 -0800 @@ -867,7 +867,7 @@ { KeySym originalKeysym = *keysym; @@ -12245,7 +24530,7 @@ * not to echo on JTextField when the NumLock is on. The * keysyms will be 0, because the last parameter 2 is not defined. --- jdk/src/solaris/transport/socket/socket_md.c 2012-08-10 10:31:39.000000000 -0700 -+++ jdk/src/solaris/transport/socket/socket_md.c 2012-08-19 12:40:01.000000000 -0700 ++++ jdk/src/solaris/transport/socket/socket_md.c 2013-01-16 08:58:15.000000000 -0800 @@ -35,7 +35,8 @@ #include <sys/time.h> #ifdef __solaris__ @@ -12267,8 +24552,834 @@ int dbgsysTlsAlloc() { pthread_key_t key; +--- jdk/src/windows/bin/cmdtoargs.c 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/src/windows/bin/cmdtoargs.c 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,598 @@ ++/* ++ * Copyright (c) 2012, 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. ++ */ ++ ++ ++/* ++ * Converts a single string command line to the traditional argc, argv. ++ * There are rules which govern the breaking of the the arguments, and ++ * these rules are embodied in the regression tests below, and duplicated ++ * in the jdk regression tests. ++ */ ++ ++#ifndef IDE_STANDALONE ++#include "java.h" ++#include "jli_util.h" ++#else /* IDE_STANDALONE */ ++// The defines we need for stand alone testing ++#include <stdio.h> ++#include <stdlib.h> ++#include <Windows.h> ++#define JNI_TRUE TRUE ++#define JNI_FALSE FALSE ++#define JLI_MemRealloc realloc ++#define JLI_StringDup _strdup ++#define JLI_MemFree free ++#define jboolean boolean ++typedef struct { ++ char* arg; ++ boolean has_wildcard; ++} StdArg ; ++#endif ++static StdArg *stdargs; ++static int stdargc; ++ ++static char* next_arg(char* cmdline, char* arg, jboolean* wildcard) { ++ ++ char* src = cmdline; ++ char* dest = arg; ++ jboolean separator = JNI_FALSE; ++ int quotes = 0; ++ int slashes = 0; ++ ++ char prev = 0; ++ char ch = 0; ++ int i; ++ jboolean done = JNI_FALSE; ++ ++ *wildcard = JNI_FALSE; ++ while ((ch = *src) != 0 && !done) { ++ switch (ch) { ++ case '"': ++ if (separator) { ++ done = JNI_TRUE; ++ break; ++ } ++ if (prev == '\\') { ++ for (i = 1; i < slashes; i += 2) { ++ *dest++ = prev; ++ } ++ if (slashes % 2 == 1) { ++ *dest++ = ch; ++ } else { ++ quotes++; ++ } ++ } else if (prev == '"' && quotes % 2 == 0) { ++ quotes++; ++ *dest++ = ch; // emit every other consecutive quote ++ } else if (quotes == 0) { ++ quotes++; // starting quote ++ } else { ++ quotes--; // matching quote ++ } ++ slashes = 0; ++ break; ++ ++ case '\\': ++ slashes++; ++ if (separator) { ++ done = JNI_TRUE; ++ separator = JNI_FALSE; ++ } ++ break; ++ ++ case ' ': ++ case '\t': ++ if (quotes % 2 == 1) { ++ *dest++ = ch; ++ } else { ++ separator = JNI_TRUE; ++ } ++ slashes = 0; ++ break; ++ ++ case '*': ++ case '?': ++ if (separator) { ++ done = JNI_TRUE; ++ separator = JNI_FALSE; ++ break; ++ } ++ if (quotes % 2 == 0) { ++ *wildcard = JNI_TRUE; ++ } ++ if (prev == '\\') { ++ *dest++ = prev; ++ } ++ *dest++ = ch; ++ break; ++ ++ default: ++ if (prev == '\\') { ++ for (i = 0 ; i < slashes ; i++) { ++ *dest++ = prev; ++ } ++ *dest++ = ch; ++ } else if (separator) { ++ done = JNI_TRUE; ++ } else { ++ *dest++ = ch; ++ } ++ slashes = 0; ++ } ++ ++ if (!done) { ++ prev = ch; ++ src++; ++ } ++ } ++ if (prev == '\\') { ++ for (i = 0; i < slashes; i++) { ++ *dest++ = prev; ++ } ++ } ++ *dest = 0; ++ return done ? src : NULL; ++} ++ ++int JLI_GetStdArgc() { ++ return stdargc; ++} ++ ++StdArg* JLI_GetStdArgs() { ++ return stdargs; ++} ++ ++void JLI_CmdToArgs(char* cmdline) { ++ int nargs = 0; ++ StdArg* argv = NULL; ++ jboolean wildcard = JNI_FALSE; ++ char* src = cmdline; ++ ++ // allocate arg buffer with sufficient space to receive the largest arg ++ char* arg = JLI_StringDup(cmdline); ++ ++ do { ++ src = next_arg(src, arg, &wildcard); ++ // resize to accommodate another Arg ++ argv = (StdArg*) JLI_MemRealloc(argv, (nargs+1) * sizeof(StdArg)); ++ argv[nargs].arg = JLI_StringDup(arg); ++ argv[nargs].has_wildcard = wildcard; ++ ++ nargs++; ++ } while (src != NULL); ++ ++ stdargc = nargs; ++ stdargs = argv; ++} ++ ++#ifdef IDE_STANDALONE ++void doexit(int rv) { ++ printf("Hit any key to quit\n"); ++ int c = getchar(); ++ exit(rv); ++} ++ ++void doabort() { ++ doexit(1); ++} ++ ++class Vector { ++public: ++ char* cmdline; ++ int argc; ++ char* argv[10]; ++ boolean wildcard[10]; ++ boolean enabled; ++ ++ Vector(){} ++ // Initialize our test vector with the program name, argv[0] ++ // and the single string command line. ++ Vector(char* pname, char* cline) { ++ argv[0] = pname; ++ wildcard[0] = FALSE; ++ cmdline = cline; ++ argc = 1; ++ enabled = TRUE; ++ } ++ ++ // add our expected strings, the program name has already been ++ // added so ignore that ++ void add(char* arg, boolean w) { ++ argv[argc] = arg; ++ wildcard[argc] = w; ++ argc++; ++ } ++ ++ void disable() { ++ enabled = FALSE; ++ } ++ ++ // validate the returned arguments with the expected arguments, using the ++ // new CmdToArgs method. ++ bool check() { ++ // "pgmname" rest of cmdline ie. pgmname + 2 double quotes + space + cmdline from windows ++ char* cptr = (char*) malloc(strlen(argv[0]) + sizeof(char) * 3 + strlen(cmdline) + 1); ++ _snprintf(cptr, MAX_PATH, "\"%s\" %s", argv[0], cmdline); ++ JLI_CmdToArgs(cptr); ++ free(cptr); ++ StdArg *kargv = JLI_GetStdArgs(); ++ int kargc = JLI_GetStdArgc(); ++ bool retval = true; ++ printf("\n===========================\n"); ++ printf("cmdline=%s\n", cmdline); ++ if (argc != kargc) { ++ printf("*** argument count does not match\n"); ++ printme(); ++ printtest(kargc, kargv); ++ doabort(); ++ } ++ for (int i = 0 ; i < argc && retval == true ; i++) { ++ if (strcmp(argv[i], kargv[i].arg) != 0) { ++ printf("*** argument at [%d] don't match\n got: %s\n exp: %s\n", ++ i, kargv[i].arg, argv[i]); ++ doabort(); ++ } ++ } ++ for (int i = 0 ; i < argc && retval == true ; i++) { ++ if (wildcard[i] != kargv[i].has_wildcard) { ++ printf("*** expansion flag at [%d] doesn't match\n got: %d\n exp: %d\n", ++ i, kargv[i].has_wildcard, wildcard[i]); ++ doabort(); ++ } ++ } ++ for (int i = 0 ; i < kargc ; i++) { ++ printf("k[%d]=%s\n", i, kargv[i].arg); ++ printf(" [%d]=%s\n", i, argv[i]); ++ } ++ return retval; ++ } ++ void printtest(int kargc, StdArg* kargv) { ++ for (int i = 0 ; i < kargc ; i++) { ++ printf("k[%d]=%s\n", i, kargv[i].arg); ++ } ++ } ++ void printme() { ++ for (int i = 0 ; i < argc ; i++) { ++ printf(" [%d]=%s\n", i, argv[i]); ++ } ++ } ++}; ++ ++void dotest(Vector** vectors) { ++ Vector* v = vectors[0]; ++ for (int i = 0 ; v != NULL;) { ++ if (v->enabled) { ++ v->check(); ++ } ++ v = vectors[++i]; ++ } ++} ++ ++#define MAXV 128 ++int main(int argc, char* argv[]) { ++ ++ int n; ++ for (n=1; n < argc; n++) { ++ printf("%d %s\n", n, argv[n]); ++ } ++ if (n > 1) { ++ JLI_CmdToArgs(GetCommandLine()); ++ for (n = 0; n < stdargc; n++) { ++ printf(" [%d]=%s\n", n, stdargs[n].arg); ++ printf(" [%d]=%s\n", n, stdargs[n].has_wildcard ? "TRUE" : "FALSE"); ++ } ++ doexit(0); ++ } ++ ++ Vector *vectors[MAXV]; ++ ++ memset(vectors, 0, sizeof(vectors)); ++ int i = 0; ++ Vector* v = new Vector(argv[0], "abcd"); ++ v->add("abcd", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"a b c d\""); ++ v->add("a b c d", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a\"b c d\"e"); ++ v->add("ab c de", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "ab\\\"cd"); ++ v->add("ab\"cd", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"a b c d\\\\\""); ++ v->add("a b c d\\", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "ab\\\\\\\"cd"); ++ v->add("ab\\\"cd", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ // Windows tests ++ v = new Vector(argv[0], "a\\\\\\c"); ++ v->add("a\\\\\\c", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"a\\\\\\d\""); ++ v->add("a\\\\\\d", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"a b c\" d e"); ++ v->add("a b c", FALSE); ++ v->add("d", FALSE); ++ v->add("e", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"ab\\\"c\" \"\\\\\" d"); ++ v->add("ab\"c", FALSE); ++ v->add("\\", FALSE); ++ v->add("d", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a\\\\\\c d\"e f\"g h"); ++ v->add("a\\\\\\c", FALSE); ++ v->add("de fg", FALSE); ++ v->add("h", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a\\\\\\\"b c d"); ++ v->add("a\\\"b", FALSE); // XXX "a\\\\\\\"b" ++ v->add("c", FALSE); ++ v->add("d", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a\\\\\\\\\"g c\" d e"); // XXX "a\\\\\\\\\"b c\" d e" ++ v->add("a\\\\\g c", FALSE); // XXX "a\\\\\\\\\"b c" ++ v->add("d", FALSE); ++ v->add("e", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ // Additional tests ++ v = new Vector(argv[0], "\"a b c\"\""); ++ v->add("a b c\"", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"\"a b c\"\""); ++ v->add("a", FALSE); ++ v->add("b", FALSE); ++ v->add("c", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"\"\"a b c\"\"\""); ++ v->add("\"a b c\"", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"\"\"\"a b c\"\"\"\""); ++ v->add("\"a", FALSE); ++ v->add("b", FALSE); ++ v->add("c\"", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"\"\"\"\"a b c\"\"\"\"\""); ++ v->add("\"\"a b c\"\"", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"C:\\TEST A\\\\\""); ++ v->add("C:\\TEST A\\", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"\"C:\\TEST A\\\\\"\""); ++ v->add("C:\\TEST", FALSE); ++ v->add("A\\", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ // test if a wildcard is present ++ v = new Vector(argv[0], "abc*def"); ++ v->add("abc*def", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"abc*def\""); ++ v->add("abc*def", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "*.abc"); ++ v->add("*.abc", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"*.abc\""); ++ v->add("*.abc", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "x.???"); ++ v->add("x.???", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\"x.???\""); ++ v->add("x.???", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "Debug\\*"); ++ v->add("Debug\\*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "Debug\\f?a"); ++ v->add("Debug\\f?a", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "Debug\\?a.java"); ++ v->add("Debug\\?a.java", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "foo *.noexts"); ++ v->add("foo", FALSE); ++ v->add("*.noexts", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "X\\Y\\Z"); ++ v->add("X\\Y\\Z", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "\\X\\Y\\Z"); ++ v->add("\\X\\Y\\Z", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a b"); ++ v->add("a", FALSE); ++ v->add("b", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a\tb"); ++ v->add("a", FALSE); ++ v->add("b", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ ++ v = new Vector(argv[0], "a \t b"); ++ v->add("a", FALSE); ++ v->add("b", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "*\\"); ++ v->add("*\\", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "*/"); ++ v->add("*/", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], ".\\*"); ++ v->add(".\\*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "./*"); ++ v->add("./*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], ".\\*"); ++ v->add(".\\*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], ".//*"); ++ v->add(".//*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "..\\..\\*"); ++ v->add("..\\..\\*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "../../*"); ++ v->add("../../*", TRUE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "..\\..\\"); ++ v->add("..\\..\\", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ v = new Vector(argv[0], "../../"); ++ v->add("../../", FALSE); ++ // v->disable(); ++ vectors[i++] = v; ++ ++ dotest(vectors); ++ printf("All tests pass [%d]\n", i); ++ doexit(0); ++} ++#endif /* IDE_STANDALONE */ +--- jdk/src/windows/bin/java_md.c 2012-08-10 10:31:39.000000000 -0700 ++++ jdk/src/windows/bin/java_md.c 2013-01-16 08:58:12.000000000 -0800 +@@ -1357,3 +1357,89 @@ + { + return JNI_FALSE; + } ++ ++/* ++ * At this point we have the arguments to the application, and we need to ++ * check with original stdargs in order to compare which of these truly ++ * needs expansion. cmdtoargs will specify this if it finds a bare ++ * (unquoted) argument containing a glob character(s) ie. * or ? ++ */ ++jobjectArray ++CreateApplicationArgs(JNIEnv *env, char **strv, int argc) ++{ ++ int i, j, idx, tlen; ++ jobjectArray outArray, inArray; ++ char *ostart, *astart, **nargv; ++ jboolean needs_expansion = JNI_FALSE; ++ jmethodID mid; ++ int stdargc; ++ StdArg *stdargs; ++ jclass cls = GetLauncherHelperClass(env); ++ NULL_CHECK0(cls); ++ ++ if (argc == 0) { ++ return NewPlatformStringArray(env, strv, argc); ++ } ++ // the holy grail we need to compare with. ++ stdargs = JLI_GetStdArgs(); ++ stdargc = JLI_GetStdArgc(); ++ ++ // sanity check, this should never happen ++ if (argc > stdargc) { ++ JLI_TraceLauncher("Warning: app args is larger than the original, %d %d\n", argc, stdargc); ++ JLI_TraceLauncher("passing arguments as-is.\n"); ++ return NewPlatformStringArray(env, strv, argc); ++ } ++ ++ // sanity check, match the args we have, to the holy grail ++ idx = stdargc - argc; ++ ostart = stdargs[idx].arg; ++ astart = strv[0]; ++ // sanity check, ensure that the first argument of the arrays are the same ++ if (JLI_StrCmp(ostart, astart) != 0) { ++ // some thing is amiss the args don't match ++ JLI_TraceLauncher("Warning: app args parsing error\n"); ++ JLI_TraceLauncher("passing arguments as-is\n"); ++ return NewPlatformStringArray(env, strv, argc); ++ } ++ ++ // make a copy of the args which will be expanded in java if required. ++ nargv = (char **)JLI_MemAlloc(argc * sizeof(char*)); ++ for (i = 0, j = idx; i < argc; i++, j++) { ++ jboolean arg_expand = (JLI_StrCmp(stdargs[j].arg, strv[i]) == 0) ++ ? stdargs[j].has_wildcard ++ : JNI_FALSE; ++ if (needs_expansion == JNI_FALSE) ++ needs_expansion = arg_expand; ++ ++ // indicator char + String + NULL terminator, the java method will strip ++ // out the first character, the indicator character, so no matter what ++ // we add the indicator ++ tlen = 1 + JLI_StrLen(strv[i]) + 1; ++ nargv[i] = (char *) JLI_MemAlloc(tlen); ++ JLI_Snprintf(nargv[i], tlen, "%c%s", arg_expand ? 'T' : 'F', strv[i]); ++ JLI_TraceLauncher("%s\n", nargv[i]); ++ } ++ ++ if (!needs_expansion) { ++ // clean up any allocated memory and return back the old arguments ++ for (i = 0 ; i < argc ; i++) { ++ JLI_MemFree(nargv[i]); ++ } ++ JLI_MemFree(nargv); ++ return NewPlatformStringArray(env, strv, argc); ++ } ++ NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls, ++ "expandArgs", ++ "([Ljava/lang/String;)[Ljava/lang/String;")); ++ ++ // expand the arguments that require expansion, the java method will strip ++ // out the indicator character. ++ inArray = NewPlatformStringArray(env, nargv, argc); ++ outArray = (*env)->CallStaticObjectMethod(env, cls, mid, inArray); ++ for (i = 0; i < argc; i++) { ++ JLI_MemFree(nargv[i]); ++ } ++ JLI_MemFree(nargv); ++ return outArray; ++} +--- jdk/src/windows/classes/sun/awt/windows/WCanvasPeer.java 2012-08-10 10:31:41.000000000 -0700 ++++ jdk/src/windows/classes/sun/awt/windows/WCanvasPeer.java 2013-01-16 08:58:12.000000000 -0800 +@@ -27,7 +27,6 @@ + import java.awt.*; + import java.awt.peer.*; + import java.lang.ref.WeakReference; +-import java.lang.reflect.Method; + import sun.awt.SunToolkit; + import sun.awt.Win32GraphicsDevice; + import sun.awt.PaintEventDispatcher; +--- jdk/src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java 2012-08-10 10:31:42.000000000 -0700 ++++ jdk/src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java 2013-01-16 08:58:12.000000000 -0800 +@@ -39,8 +39,6 @@ + import java.awt.event.MouseListener; + import java.awt.event.MouseMotionListener; + +-import java.lang.reflect.*; +- + import sun.awt.dnd.SunDragSourceContextPeer; + + /** +--- jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java 2012-08-10 10:31:42.000000000 -0700 ++++ jdk/src/windows/classes/sun/awt/windows/WPopupMenuPeer.java 2013-01-16 08:58:12.000000000 -0800 +@@ -26,9 +26,7 @@ + + import java.awt.*; + import java.awt.peer.*; +-import java.lang.reflect.Field; + +-import sun.awt.SunToolkit; + import sun.awt.AWTAccessor; + + public class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer { +--- jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java 2012-08-10 10:31:42.000000000 -0700 ++++ jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java 2013-01-16 08:58:12.000000000 -0800 +@@ -31,8 +31,6 @@ + + import java.beans.*; + +-import java.lang.reflect.*; +- + import java.util.*; + import java.util.List; + import sun.util.logging.PlatformLogger; +--- jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 2012-08-10 10:31:45.000000000 -0700 ++++ jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 2013-01-16 08:58:12.000000000 -0800 +@@ -45,15 +45,25 @@ + private long ctxHandle; + + static { +- initFirst(); ++ initFirst(Status.class); + } + ++ // Used by native code to indicate when a particular protocol sequence is completed ++ // and must not be re-used. ++ ++ class Status { ++ boolean sequenceComplete; ++ } ++ ++ Status status; ++ + NTLMAuthSequence (String username, String password, String ntdomain) + throws IOException + { + this.username = username; + this.password = password; + this.ntdomain = ntdomain; ++ this.status = new Status(); + state = 0; + crdHandle = getCredentialsHandle (username, ntdomain, password); + if (crdHandle == 0) { +@@ -63,19 +73,26 @@ + + public String getAuthHeader (String token) throws IOException { + byte[] input = null; ++ ++ assert !status.sequenceComplete; ++ + if (token != null) + input = (new BASE64Decoder()).decodeBuffer(token); +- byte[] b = getNextToken (crdHandle, input); ++ byte[] b = getNextToken (crdHandle, input, status); + if (b == null) + throw new IOException ("Internal authentication error"); + return (new B64Encoder()).encode (b); + } + +- private native static void initFirst (); ++ public boolean isComplete() { ++ return status.sequenceComplete; ++ } ++ ++ private native static void initFirst (Class<NTLMAuthSequence.Status> clazz); + + private native long getCredentialsHandle (String user, String domain, String password); + +- private native byte[] getNextToken (long crdHandle, byte[] lastToken); ++ private native byte[] getNextToken (long crdHandle, byte[] lastToken, Status returned); + } + + class B64Encoder extends BASE64Encoder { +--- jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java 2012-08-10 10:31:45.000000000 -0700 ++++ jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java 2013-01-16 08:58:12.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 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 +@@ -186,6 +186,7 @@ + public synchronized boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw) { + + try { ++ + NTLMAuthSequence seq = (NTLMAuthSequence)conn.authObj(); + if (seq == null) { + seq = new NTLMAuthSequence (username, password, ntdomain); +@@ -193,8 +194,12 @@ + } + String response = "NTLM " + seq.getAuthHeader (raw.length()>6?raw.substring(5):null); + conn.setAuthenticationProperty(getHeaderName(), response); ++ if (seq.isComplete()) { // 7200720 ++ conn.authObj(null); ++ } + return true; + } catch (IOException e) { ++ conn.authObj(null); // MMM 7200720 ?? + return false; + } + } --- jdk/src/windows/native/java/net/NetworkInterface.c 2012-08-10 10:31:48.000000000 -0700 -+++ jdk/src/windows/native/java/net/NetworkInterface.c 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/src/windows/native/java/net/NetworkInterface.c 2013-01-16 00:07:21.000000000 -0800 @@ -504,7 +504,8 @@ */ if (netaddrCount < 0) { @@ -12280,7 +25391,7 @@ } } --- jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2012-08-10 10:31:48.000000000 -0700 -+++ jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2013-01-16 00:07:21.000000000 -0800 @@ -194,7 +194,8 @@ while (curr != NULL) { netaddr *netaddrP; @@ -12301,103 +25412,110 @@ return NULL; } } ---- jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:52.000000000 -0700 -+++ jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-19 12:40:02.000000000 -0700 -@@ -108,7 +108,7 @@ +--- jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c 2012-08-10 10:31:52.000000000 -0700 ++++ jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c 2013-01-16 08:58:12.000000000 -0800 +@@ -41,18 +41,20 @@ + #define SECURITY_WIN32 + #include "sspi.h" - JNIEXPORT void JNICALL - Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this, -- jobject fdo, jboolean isIPv6) -+ jobject fdo) - { - jint fd = fdval(env, fdo); - int rv = 0; ---- jdk/src/windows/native/sun/nio/ch/IOUtil.c 2012-08-10 10:31:52.000000000 -0700 -+++ jdk/src/windows/native/sun/nio/ch/IOUtil.c 2012-08-19 12:40:02.000000000 -0700 -@@ -41,6 +41,9 @@ - /* field id for jint 'fd' in java.io.FileDescriptor used for socket fds */ - static jfieldID fd_fdID; +-static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle); ++static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, JNIEnv *env, jobject status); -+/* false for 95/98/ME, true for NT/W2K */ -+static jboolean onNT = JNI_FALSE; -+ - JNIEXPORT jboolean JNICALL - Java_sun_security_provider_NativeSeedGenerator_nativeGenerateSeed - (JNIEnv *env, jclass clazz, jbyteArray randArray); -@@ -52,6 +55,13 @@ - JNIEXPORT void JNICALL - Java_sun_nio_ch_IOUtil_initIDs(JNIEnv *env, jclass clazz) + static jfieldID ntlm_ctxHandleID; + static jfieldID ntlm_crdHandleID; ++static jfieldID status_seqCompleteID; + + static HINSTANCE lib = NULL; + + JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_initFirst +-(JNIEnv *env, jclass clazz) ++(JNIEnv *env, jclass authseq_clazz, jclass status_clazz) { -+ OSVERSIONINFO ver; -+ ver.dwOSVersionInfoSize = sizeof(ver); -+ GetVersionEx(&ver); -+ if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { -+ onNT = JNI_TRUE; -+ } -+ - clazz = (*env)->FindClass(env, "java/io/FileDescriptor"); - fd_fdID = (*env)->GetFieldID(env, clazz, "fd", "I"); - handle_fdID = (*env)->GetFieldID(env, clazz, "handle", "J"); -@@ -70,13 +80,6 @@ - randArray); +- ntlm_ctxHandleID = (*env)->GetFieldID(env, clazz, "ctxHandle", "J"); +- ntlm_crdHandleID = (*env)->GetFieldID(env, clazz, "crdHandle", "J"); ++ ntlm_ctxHandleID = (*env)->GetFieldID(env, authseq_clazz, "ctxHandle", "J"); ++ ntlm_crdHandleID = (*env)->GetFieldID(env, authseq_clazz, "crdHandle", "J"); ++ status_seqCompleteID = (*env)->GetFieldID(env, status_clazz, "sequenceComplete", "Z"); } --JNIEXPORT jint JNICALL --Java_sun_nio_ch_IOUtil_iovMax(JNIEnv *env, jclass this) --{ -- return 16; --} -- -- - jint - convertReturnVal(JNIEnv *env, jint n, jboolean reading) - { -@@ -202,3 +205,9 @@ - { - return (*env)->GetLongField(env, fdo, handle_fdID); + /* +@@ -145,8 +147,14 @@ + } } + + -+jboolean -+isNT() -+{ -+ return onNT; -+} ---- jdk/src/windows/native/sun/nio/ch/SocketDispatcher.c 2012-08-10 10:31:52.000000000 -0700 -+++ jdk/src/windows/native/sun/nio/ch/SocketDispatcher.c 2012-08-19 12:40:02.000000000 -0700 -@@ -97,6 +97,10 @@ - return IOS_THROWN; ++/* ++ * Class: sun_net_www_protocol_http_ntlm_NTLMAuthSequence ++ * Method: getNextToken ++ * Signature: (J[BLsun/net/www/protocol/http/ntlm/NTLMAuthSequence/Status;)[B ++ */ + JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_getNextToken +-(JNIEnv *env, jobject this, jlong crdHandle, jbyteArray lastToken) ++(JNIEnv *env, jobject this, jlong crdHandle, jbyteArray lastToken, jobject status) + { + + VOID *pInput = 0; +@@ -217,7 +225,7 @@ } -+ if ((isNT() == JNI_FALSE) && (len > 16)) { -+ len = 16; -+ } -+ - /* copy iovec into WSABUF */ - for(i=0; i<len; i++) { - jint iov_len = iovp[i].iov_len; -@@ -204,6 +208,10 @@ - return IOS_THROWN; + if (ss < 0) { +- endSequence (pCred, pCtx); ++ endSequence (pCred, pCtx, env, status); + return 0; } -+ if ((isNT() == JNI_FALSE) && (len > 16)) { -+ len = 16; -+ } +@@ -225,7 +233,7 @@ + ss = CompleteAuthToken( pCtx, &OutBuffDesc ); + + if (ss < 0) { +- endSequence (pCred, pCtx); ++ endSequence (pCred, pCtx, env, status); + return 0; + } + } +@@ -235,18 +243,18 @@ + (*env)->SetByteArrayRegion(env, ret, 0, OutSecBuff.cbBuffer, + OutSecBuff.pvBuffer); + if (lastToken != 0) // 2nd stage +- endSequence (pCred, pCtx); ++ endSequence (pCred, pCtx, env, status); + result = ret; + } + + if ((ss != SEC_I_CONTINUE_NEEDED) && (ss == SEC_I_COMPLETE_AND_CONTINUE)) { +- endSequence (pCred, pCtx); ++ endSequence (pCred, pCtx, env, status); + } + + return result; + } + +-static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle) { ++static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, JNIEnv *env, jobject status) { + if (credHand != 0) { + FreeCredentialsHandle(credHand); + free(credHand); +@@ -256,4 +264,7 @@ + DeleteSecurityContext(ctxHandle); + free(ctxHandle); + } + - /* copy iovec into WSABUF */ - for(i=0; i<len; i++) { - jint iov_len = iovp[i].iov_len; ---- jdk/src/windows/native/sun/nio/ch/nio_util.h 2012-08-10 10:31:52.000000000 -0700 -+++ jdk/src/windows/native/sun/nio/ch/nio_util.h 2012-08-19 12:40:02.000000000 -0700 -@@ -35,6 +35,7 @@ ++ /* Sequence is complete so set flag */ ++ (*env)->SetBooleanField(env, status, status_seqCompleteID, JNI_TRUE); + } +--- jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:52.000000000 -0700 ++++ jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2013-01-16 00:07:21.000000000 -0800 +@@ -108,7 +108,7 @@ - jint fdval(JNIEnv *env, jobject fdo); - jlong handleval(JNIEnv *env, jobject fdo); -+jboolean isNT(); - jint convertReturnVal(JNIEnv *env, jint n, jboolean r); - jlong convertLongReturnVal(JNIEnv *env, jlong n, jboolean r); - jboolean purgeOutstandingICMP(JNIEnv *env, jclass clazz, jint fd); + JNIEXPORT void JNICALL + Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this, +- jobject fdo, jboolean isIPv6) ++ jobject fdo) + { + jint fd = fdval(env, fdo); + int rv = 0; --- jdk/src/windows/native/sun/windows/awt_Component.cpp 2012-08-10 10:31:55.000000000 -0700 -+++ jdk/src/windows/native/sun/windows/awt_Component.cpp 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/src/windows/native/sun/windows/awt_Component.cpp 2013-01-16 00:07:21.000000000 -0800 @@ -558,8 +558,6 @@ m_hwnd = hwnd; @@ -12407,8 +25525,61 @@ SetDrawState((jint)JAWT_LOCK_SURFACE_CHANGED | (jint)JAWT_LOCK_BOUNDS_CHANGED | (jint)JAWT_LOCK_CLIP_CHANGED); +--- jdk/src/windows/native/sun/windows/awt_Window.cpp 2012-08-10 10:31:58.000000000 -0700 ++++ jdk/src/windows/native/sun/windows/awt_Window.cpp 2013-01-16 08:58:12.000000000 -0800 +@@ -1477,7 +1477,7 @@ + if (wClassEvent == NULL) { + if (env->PushLocalFrame(1) < 0) + return; +- wClassEvent = env->FindClass("java/awt/event/WindowEvent"); ++ wClassEvent = env->FindClass("sun/awt/TimedWindowEvent"); + if (wClassEvent != NULL) { + wClassEvent = (jclass)env->NewGlobalRef(wClassEvent); + } +@@ -1491,7 +1491,7 @@ + if (wEventInitMID == NULL) { + wEventInitMID = + env->GetMethodID(wClassEvent, "<init>", +- "(Ljava/awt/Window;ILjava/awt/Window;II)V"); ++ "(Ljava/awt/Window;ILjava/awt/Window;IIJ)V"); + DASSERT(wEventInitMID); + if (wEventInitMID == NULL) { + return; +@@ -1532,7 +1532,7 @@ + } + } + jobject event = env->NewObject(wClassEvent, wEventInitMID, target, id, +- jOpposite, oldState, newState); ++ jOpposite, oldState, newState, TimeHelper::getMessageTimeUTC()); + DASSERT(!safe_ExceptionOccurred(env)); + DASSERT(event != NULL); + if (jOpposite != NULL) { +@@ -1559,21 +1559,8 @@ + + BOOL AwtWindow::AwtSetActiveWindow(BOOL isMouseEventCause, UINT hittest) + { +- // Fix for 6458497. +- // Retreat if current foreground window is out of both our and embedder process. +- // The exception is when activation is requested due to a mouse event. +- if (!isMouseEventCause) { +- HWND fgWindow = ::GetForegroundWindow(); +- if (NULL != fgWindow) { +- DWORD fgProcessID; +- ::GetWindowThreadProcessId(fgWindow, &fgProcessID); +- if (fgProcessID != ::GetCurrentProcessId() +- && !AwtToolkit::GetInstance().IsEmbedderProcessId(fgProcessID)) +- { +- return FALSE; +- } +- } +- } ++ // We used to reject non mouse window activation if our app wasn't active. ++ // This code since has been removed as the fix for 7185280 + + HWND proxyContainerHWnd = GetProxyToplevelContainer(); + HWND proxyHWnd = GetProxyFocusOwner(); --- jdk/test/Makefile 2012-08-10 10:31:59.000000000 -0700 -+++ jdk/test/Makefile 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -79,6 +79,11 @@ endif OS_VERSION := $(shell $(UNAME) -r) @@ -12421,8 +25592,265 @@ ifeq ($(UNAME_S), Darwin) OS_NAME = macosx OS_ARCH := $(shell $(UNAME) -m) +--- jdk/test/ProblemList.txt 2012-08-10 10:31:59.000000000 -0700 ++++ jdk/test/ProblemList.txt 2013-01-16 08:58:12.000000000 -0800 +@@ -114,83 +114,10 @@ + + # jdk_awt + +-# None of the awt tests are using samevm, might not be worth the effort due +-# to the vm overhead not being enough to make a difference. +-# In general, the awt tests are problematic with or without samevm, and there +-# are issues with using a Xvfb display. +- +-# Fails on solaris sparc, timedout? in othervm mode +-java/awt/event/MouseEvent/AcceptExtraButton/AcceptExtraButton.java generic-all +- +-# Causes hang in samevm mode??? Solaris 11 i586 +-java/awt/FullScreen/SetFSWindow/FSFrame.java generic-all +- +-# Fails on solaris 11 i586, -client, in othervm mode not sure why +-java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java generic-all +-java/awt/Focus/CloseDialogActivateOwnerTest/CloseDialogActivateOwnerTest.java generic-all +-java/awt/FontClass/FontAccess.java generic-all +-java/awt/Mixing/HWDisappear.java generic-all +-java/awt/Mixing/MixingInHwPanel.java generic-all +-java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.html generic-all +-java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java generic-all +-java/awt/Toolkit/SecurityTest/SecurityTest2.java generic-all +-java/awt/image/mlib/MlibOpsTest.java generic-all +- +-# Fails on windows, othervm mode, various errors +-java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java generic-all +-java/awt/Focus/OwnedWindowFocusIMECrashTest/OwnedWindowFocusIMECrashTest.java generic-all +-java/awt/FullScreen/NoResizeEventOnDMChangeTest/NoResizeEventOnDMChangeTest.java generic-all +-java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java generic-all +-java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html generic-all +-java/awt/font/Threads/FontThread.java generic-all +-java/awt/print/PrinterJob/PrtException.java generic-all +- +-# Fails with windows X64, othervm, -server +-com/sun/awt/Translucency/WindowOpacity.java generic-all +-java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java generic-all +-java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html generic-all +-java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.html generic-all +-java/awt/Focus/FocusEmbeddedFrameTest/FocusEmbeddedFrameTest.java generic-all +-java/awt/Frame/LayoutOnMaximizeTest/LayoutOnMaximizeTest.java generic-all +-java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java generic-all +-java/awt/Mixing/MixingOnShrinkingHWButton.java generic-all +-java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java generic-all +- + ############################################################################ + + # jdk_beans + +-# A large set of the beans tests set the security manager, which would seem +-# to indicate that a large number of them should be "othervm", yet are all +-# very small tests and could greatly benefit from a samevm test run. +-# So a large batch of beans tests are currently run with othervm mode. +- +-# Filed 6986807 +-java/beans/Introspector/TestTypeResolver.java generic-all +- +-# Filed 6986813 +-java/beans/Introspector/memory/Test4508780.java generic-all +- +-# Linux, some kind of problems with X11 display +-java/beans/PropertyChangeSupport/Test4682386.java generic-all +-java/beans/PropertyChangeSupport/TestSynchronization.java generic-all +-java/beans/Statement/Test4653179.java generic-all +- +-# Runs REALLY slow on Solaris sparc for some reason, both -client and -server +-java/beans/XMLEncoder/Test4625418.java solaris-sparc +- +-# Problems with samevm and setting security manager (speculation partially) +-java/beans/Introspector/4168475/Test4168475.java generic-all +-java/beans/Introspector/4520754/Test4520754.java generic-all +-java/beans/Introspector/6380849/TestBeanInfo.java generic-all +-java/beans/Introspector/Test4144543.java generic-all +- +-# Failed to call method solaris-sparc??? +-java/beans/EventHandler/Test6788531.java generic-all +- +-# Jar or class not found??? +-java/beans/XMLEncoder/6329581/Test6329581.java generic-all +- + ############################################################################ + + # jdk_lang +@@ -304,95 +231,29 @@ + # 6988950 + demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java generic-all + +-# 7162111 +-demo/jvmti/mtrace/TraceJFrame.java macosx-all +- +-# Need to be marked othervm, or changed to be samevm safe ++# 7056489 + com/sun/jndi/ldap/ReadTimeoutTest.java generic-all +-com/sun/jndi/rmi/registry/RegistryContext/UnbindIdempotent.java generic-all +- +-# Need to be marked othervm, or changed to be samevm safe +-com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all +- +-# Solaris sparc and others, exception in initializer +-javax/imageio/CachePremissionsTest/CachePermissionsTest.java generic-all +- +-# Leaves file rgba_* open, fails with windows samevm +-javax/imageio/plugins/png/PngOutputTypeTest.java generic-all +- +-# Suspect test.png file is left open, windows samevm problems +-javax/imageio/plugins/png/ITXtTest.java generic-all +- +-# Solaris sparc and others, failed to compile testcase +-javax/imageio/metadata/DOML3Node.java generic-all +- +-# One of these tests is leaving file IMGP1001.JPG open, windows samevm +-javax/imageio/plugins/jpeg/ConcurrentReadingTest.java generic-all +-javax/imageio/plugins/jpeg/ReadingInterruptionTest.java generic-all +- +-# One of these files is missing a close on writer_* files, windows samevm +-javax/imageio/plugins/jpeg/ConcurrentWritingTest.java generic-all +-javax/imageio/plugins/jpeg/WritingInterruptionTest.java generic-all +- +-# Leaving file test.jpg open, windows samevm +-javax/imageio/plugins/jpeg/ReadAsGrayTest.java generic-all +- +-# Missing close on file wbmp*, windows samevm +-javax/imageio/plugins/wbmp/CanDecodeTest.java generic-all +- +-# Failures on OpenSolaris, cannot read input files? samevm issues? +-javax/imageio/metadata/BooleanAttributes.java generic-all +-javax/imageio/plugins/bmp/BMPSubsamplingTest.java generic-all +-javax/imageio/plugins/bmp/TopDownTest.java generic-all +-javax/imageio/plugins/gif/EncodeSubImageTest.java generic-all +-javax/imageio/plugins/gif/GifTransparencyTest.java generic-all +-javax/imageio/plugins/png/GrayPngTest.java generic-all +-javax/imageio/plugins/png/ItxtUtf8Test.java generic-all +-javax/imageio/plugins/png/MergeStdCommentTest.java generic-all +-javax/imageio/plugins/png/ShortHistogramTest.java generic-all +-javax/imageio/plugins/shared/BitDepth.java generic-all +- +-# Exclude all javax/print tests, even if they passed, they may need samevm work +- +-# Times out on solaris-sparc, sparcv9, x64 -server, some on i586 -client +-javax/print/attribute/autosense/PrintAutoSenseData.java generic-all +-javax/print/attribute/Chroma.java generic-all +-javax/print/attribute/CollateAttr.java generic-all +-javax/print/attribute/PSCopiesFlavorTest.java generic-all +-javax/print/LookupServices.java generic-all +-javax/print/TestRaceCond.java generic-all +- +-# These tests really require a printer (might all be windows only tests?) +-javax/print/CheckDupFlavor.java generic-all +-javax/print/PrintSE/PrintSE.sh generic-all +-javax/print/attribute/ChromaticityValues.java generic-all +-javax/print/attribute/GetCopiesSupported.java generic-all +-javax/print/attribute/SidesPageRangesTest.java generic-all +-javax/print/attribute/SupportedPrintableAreas.java generic-all +-javax/print/attribute/AttributeTest.java generic-all +- +-# Only print test left, excluding just because all print tests have been +-javax/print/attribute/MediaMappingsTest.java generic-all + + # 7162111 +-javax/script/CauseExceptionTest.java macosx-all +-javax/script/GetInterfaceTest.java macosx-all +-javax/script/JavaScriptScopeTest.java macosx-all +-javax/script/NullUndefinedVarTest.java macosx-all +-javax/script/PluggableContextTest.java macosx-all +-javax/script/ProviderTest.sh macosx-all +-javax/script/RhinoExceptionTest.java macosx-all +-javax/script/StringWriterPrintTest.java macosx-all +-javax/script/Test1.java macosx-all +-javax/script/Test2.java macosx-all +-javax/script/Test3.java macosx-all +-javax/script/Test4.java macosx-all +-javax/script/Test5.java macosx-all +-javax/script/Test6.java macosx-all +-javax/script/Test7.java macosx-all +-javax/script/Test8.java macosx-all +-javax/script/UnescapedBracketRegExTest.java macosx-all +-javax/script/VersionTest.java macosx-all ++demo/jvmti/mtrace/TraceJFrame.java macosx-all ++javax/script/CauseExceptionTest.java macosx-all ++javax/script/GetInterfaceTest.java macosx-all ++javax/script/JavaScriptScopeTest.java macosx-all ++javax/script/NullUndefinedVarTest.java macosx-all ++javax/script/PluggableContextTest.java macosx-all ++javax/script/ProviderTest.sh macosx-all ++javax/script/RhinoExceptionTest.java macosx-all ++javax/script/StringWriterPrintTest.java macosx-all ++javax/script/Test1.java macosx-all ++javax/script/Test2.java macosx-all ++javax/script/Test3.java macosx-all ++javax/script/Test4.java macosx-all ++javax/script/Test5.java macosx-all ++javax/script/Test6.java macosx-all ++javax/script/Test7.java macosx-all ++javax/script/Test8.java macosx-all ++javax/script/UnescapedBracketRegExTest.java macosx-all ++javax/script/VersionTest.java macosx-all + + ############################################################################ + +@@ -708,15 +569,12 @@ + sun/security/tools/keytool/importreadall.sh solaris-all + sun/security/tools/keytool/selfissued.sh solaris-all + +-############################################################################ ++# 7147060 ++com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all + +-# jdk_swing (not using samevm) ++############################################################################ + +-# Fails on solaris 11 i586, with othervm +-javax/swing/JFileChooser/6570445/bug6570445.java generic-all +-javax/swing/JFileChooser/6738668/bug6738668.java generic-all +-javax/swing/JPopupMenu/6675802/bug6675802.java generic-all +-javax/swing/system/6799345/TestShutdown.java generic-all ++# jdk_swing + + ############################################################################ + +@@ -729,6 +587,9 @@ + + # jdk_tools + ++# 6461635 ++com/sun/tools/attach/BasicTests.sh generic-all ++ + # Filed 6952105 + com/sun/jdi/SuspendThreadTest.java generic-all + +@@ -752,6 +613,13 @@ + sun/tools/jrunscript/jrunscript-fTest.sh macosx-all + sun/tools/jrunscript/jrunscriptTest.sh macosx-all + ++# 8001118 ++sun/tools/jcmd/jcmd-f.sh generic-all ++sun/tools/jcmd/jcmd-help-help.sh generic-all ++ ++# 7175775 ++sun/tools/jinfo/Basic.sh macosx-all ++ + ############################################################################ + + # jdk_util +@@ -785,6 +653,10 @@ + + # 7162111 + java/util/ResourceBundle/Control/Bug6530694.java macosx-all ++java/util/logging/LoggingDeadlock4.java macosx-all ++ ++# 7041639, Solaris DSA keypair generation bug ++java/util/TimeZone/TimeZoneDatePermissionCheck.sh solaris-all + + ############################################################################ + --- jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2012-08-10 10:32:04.000000000 -0700 -+++ jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -56,7 +56,7 @@ OS=`uname -s` @@ -12433,7 +25861,7 @@ ;; --- jdk/test/com/sun/jdi/JITDebug.sh 2012-08-10 10:32:04.000000000 -0700 -+++ jdk/test/com/sun/jdi/JITDebug.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/jdi/JITDebug.sh 2013-01-16 08:58:15.000000000 -0800 @@ -63,7 +63,7 @@ OS=`uname -s` export TRANSPORT_METHOD @@ -12444,7 +25872,7 @@ TRANSPORT_METHOD=dt_socket ;; --- jdk/test/com/sun/jdi/PrivateTransportTest.sh 2012-08-10 10:32:05.000000000 -0700 -+++ jdk/test/com/sun/jdi/PrivateTransportTest.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/jdi/PrivateTransportTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -123,7 +123,7 @@ esac libloc=${jreloc}/lib/${libarch} @@ -12455,7 +25883,7 @@ libloc=`dirname ${xx}` ;; --- jdk/test/com/sun/jdi/ShellScaffold.sh 2012-08-10 10:32:06.000000000 -0700 -+++ jdk/test/com/sun/jdi/ShellScaffold.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/jdi/ShellScaffold.sh 2013-01-16 08:58:15.000000000 -0800 @@ -292,7 +292,7 @@ psCmd=ps jstack=jstack.exe @@ -12466,7 +25894,7 @@ address= devnull=/dev/null --- jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2012-08-10 10:32:06.000000000 -0700 -+++ jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2013-01-16 08:58:15.000000000 -0800 @@ -112,7 +112,7 @@ fi ;; @@ -12477,7 +25905,7 @@ ;; --- jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2012-08-10 10:32:07.000000000 -0700 -+++ jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2013-01-16 08:58:15.000000000 -0800 @@ -45,7 +45,7 @@ OS=`uname -s` @@ -12488,7 +25916,7 @@ ;; Windows* | CYGWIN*) --- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-08-10 10:32:09.000000000 -0700 -+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2013-01-16 08:58:15.000000000 -0800 @@ -72,6 +72,16 @@ done } @@ -12517,7 +25945,7 @@ # $ sysctl -n vm.swapusage # total = 8192.00M used = 7471.11M free = 720.89M (encrypted) --- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2012-08-10 10:32:11.000000000 -0700 -+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2013-01-16 08:58:15.000000000 -0800 @@ -48,7 +48,7 @@ # Test GetMaxFileDescriptorCount if we are running on Unix @@ -12528,7 +25956,7 @@ ;; * ) --- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2012-08-10 10:32:11.000000000 -0700 -+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2012-08-19 12:40:02.000000000 -0700 ++++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2013-01-16 08:58:15.000000000 -0800 @@ -48,7 +48,7 @@ # Test GetOpenFileDescriptorCount if we are running on Unix @@ -12539,7 +25967,7 @@ ;; * ) --- jdk/test/com/sun/tools/attach/CommonSetup.sh 2012-08-10 10:32:15.000000000 -0700 -+++ jdk/test/com/sun/tools/attach/CommonSetup.sh 2012-08-19 12:40:03.000000000 -0700 ++++ jdk/test/com/sun/tools/attach/CommonSetup.sh 2013-01-16 08:58:15.000000000 -0800 @@ -36,7 +36,7 @@ OS=`uname -s` @@ -12709,8 +26137,74 @@ - return new Point(p.x + (int) (d.getWidth() / 2), p.y + (frame.getInsets().top / 2)); - } -} +--- jdk/test/java/awt/Frame/7024749/bug7024749.java 2012-08-10 10:32:20.000000000 -0700 ++++ jdk/test/java/awt/Frame/7024749/bug7024749.java 2013-01-16 08:58:12.000000000 -0800 +@@ -23,9 +23,9 @@ + + /* + * @test +- * @bug 7024749 ++ * @bug 7024749 7184326 + * @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75 +- * @library ../../../regtesthelpers ++ * @library ../../regtesthelpers + * @build Util + * @author Oleg Pekhovskiy: area=awt.toplevel + @run main bug7024749 +--- jdk/test/java/awt/Frame/HugeFrame/HugeFrame.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/java/awt/Frame/HugeFrame/HugeFrame.java 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,49 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ @test ++ @bug 7160609 ++ @summary A window with huge dimensions shouldn't crash JVM ++ @author anthony.petrov@oracle.com: area=awt.toplevel ++ @run main HugeFrame ++*/ ++ ++import java.awt.*; ++ ++public class HugeFrame { ++ public static void main(String[] args) throws Exception { ++ Frame f = new Frame("Huge"); ++ ++ // 8193+ should already produce a crash, but let's go extreme... ++ f.setBounds(10, 10, 30000, 500000); ++ f.setVisible(true); ++ ++ // We would crash by now if the bug wasn't fixed ++ Thread.sleep(1000); ++ System.err.println(f.getBounds()); ++ ++ // Cleanup ++ f.dispose(); ++ } ++} --- jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2012-08-10 10:32:25.000000000 -0700 -+++ jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2012-08-19 12:40:03.000000000 -0700 ++++ jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2013-01-16 08:58:15.000000000 -0800 @@ -25,10 +25,11 @@ fi @@ -12728,7 +26222,7 @@ if [ -z "${TESTJAVA}" ] ; then --- jdk/test/java/awt/Window/Grab/GrabTest.java 2012-08-10 10:32:26.000000000 -0700 -+++ jdk/test/java/awt/Window/Grab/GrabTest.java 2012-08-19 12:40:03.000000000 -0700 ++++ jdk/test/java/awt/Window/Grab/GrabTest.java 2013-01-16 00:07:23.000000000 -0800 @@ -65,7 +65,7 @@ }, sun.awt.SunToolkit.GRAB_EVENT_MASK); @@ -12907,6 +26401,282 @@ - } -} - +--- jdk/test/java/beans/Introspector/4520754/Test4520754.java 2012-08-10 10:32:30.000000000 -0700 ++++ jdk/test/java/beans/Introspector/4520754/Test4520754.java 2013-01-16 08:58:12.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -58,7 +58,7 @@ + public static void main(String[] args) { + // ensure that 4168475 does not regress + test4168475(Component.class); +- // AWT classes (sun.beans.infos.ComponentBeanInfo) ++ // AWT classes (com.sun.beans.infos.ComponentBeanInfo) + test(null, Button.class, Component.class, List.class, Menu.class, Panel.class); + // Swing classes (dt.jar) + test(null, JApplet.class, JButton.class, JCheckBox.class); +--- jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java 2012-08-10 10:32:31.000000000 -0700 ++++ jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java 2013-01-16 08:58:12.000000000 -0800 +@@ -38,8 +38,7 @@ + + import java.beans.BeanInfo; + import java.beans.Introspector; +-import java.lang.ref.Reference; +-import java.lang.reflect.Field; ++import java.lang.reflect.Method; + + public class TestBeanInfo implements Runnable { + +@@ -60,10 +59,9 @@ + try { + actual = Introspector.getBeanInfo(type); + type = actual.getClass(); +- Field field = type.getDeclaredField("targetBeanInfoRef"); // NON-NLS: field name +- field.setAccessible(true); +- Reference ref = (Reference) field.get(actual); +- actual = (BeanInfo) ref.get(); ++ Method method = type.getDeclaredMethod("getTargetBeanInfo"); // NON-NLS: method name ++ method.setAccessible(true); ++ actual = (BeanInfo) method.invoke(actual); + } + catch (Exception exception) { + throw new Error("unexpected error", exception); +--- jdk/test/java/beans/Introspector/Test7193977.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/java/beans/Introspector/Test7193977.java 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,159 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7193977 ++ * @summary Tests that generified property descriptors do not loose additional info ++ * @author Sergey Malenkov ++ */ ++ ++import java.awt.Image; ++import java.beans.BeanDescriptor; ++import java.beans.BeanInfo; ++import java.beans.EventSetDescriptor; ++import java.beans.IntrospectionException; ++import java.beans.Introspector; ++import java.beans.MethodDescriptor; ++import java.beans.PropertyDescriptor; ++import java.util.Arrays; ++import java.util.List; ++ ++public class Test7193977 { ++ ++ private static final List<String> names = Arrays.asList("listType", "list", "value"); ++ ++ public static void main(String args[]) { ++ for (String name : names) { ++ test(Abstract.class, name); ++ test(Concrete.class, name); ++ } ++ } ++ ++ private static void test(Class<?> type, String name) { ++ if (!Boolean.TRUE.equals(BeanUtils.getPropertyDescriptor(type, name).getValue("transient"))) { ++ throw new Error("property '" + name + "' is not transient"); ++ } ++ } ++ ++ public static final class Concrete extends Abstract<String> { ++ } ++ ++ public static abstract class Abstract<T> { ++ private List<T> list; ++ ++ public List<T> getList() { ++ return this.list; ++ } ++ ++ public void setList(List<T> list) { ++ this.list = list; ++ } ++ ++ public T getValue(int index) { ++ return (0 <= index) && (this.list != null) && (index < this.list.size()) ++ ? this.list.get(index) ++ : null; ++ } ++ ++ public void setValue(int index, T value) { ++ if ((0 <= index) && (this.list != null)) { ++ if (index == this.list.size()) { ++ this.list.add(value); ++ } ++ else if (index < this.list.size()) { ++ this.list.set(index, value); ++ } ++ } ++ } ++ ++ public String getListType() { ++ return (this.list != null) ++ ? this.list.getClass().getName() ++ : null; ++ } ++ ++ public void setListType(String type) throws Exception { ++ this.list = (type != null) ++ ? (List<T>) Class.forName(type).newInstance() ++ : null; ++ } ++ } ++ ++ public static final class ConcreteBeanInfo extends Wrapper { ++ public ConcreteBeanInfo() throws IntrospectionException { ++ super(Concrete.class); ++ } ++ } ++ ++ public static final class AbstractBeanInfo extends Wrapper { ++ public AbstractBeanInfo() throws IntrospectionException { ++ super(Abstract.class); ++ for (PropertyDescriptor pd : getPropertyDescriptors()) { ++ if (names.contains(pd.getName())) { ++ pd.setValue("transient", Boolean.TRUE); ++ } ++ } ++ } ++ } ++ ++ private static class Wrapper implements BeanInfo { ++ private final BeanInfo info; ++ ++ Wrapper(Class<?> type) throws IntrospectionException { ++ this.info = Introspector.getBeanInfo(type, Introspector.IGNORE_IMMEDIATE_BEANINFO); ++ } ++ ++ public BeanDescriptor getBeanDescriptor() { ++ return this.info.getBeanDescriptor(); ++ } ++ ++ public EventSetDescriptor[] getEventSetDescriptors() { ++ return this.info.getEventSetDescriptors(); ++ } ++ ++ public int getDefaultEventIndex() { ++ return this.info.getDefaultEventIndex(); ++ } ++ ++ public PropertyDescriptor[] getPropertyDescriptors() { ++ return this.info.getPropertyDescriptors(); ++ } ++ ++ public int getDefaultPropertyIndex() { ++ return this.info.getDefaultPropertyIndex(); ++ } ++ ++ public MethodDescriptor[] getMethodDescriptors() { ++ return this.info.getMethodDescriptors(); ++ } ++ ++ public BeanInfo[] getAdditionalBeanInfo() { ++ return this.info.getAdditionalBeanInfo(); ++ } ++ ++ public Image getIcon(int kind) { ++ return this.info.getIcon(kind); ++ } ++ } ++} +--- jdk/test/java/beans/Introspector/Test7195106.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/java/beans/Introspector/Test7195106.java 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,67 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7195106 ++ * @summary Tests that explicit BeanInfo is not collected ++ * @author Sergey Malenkov ++ */ ++ ++import java.awt.Image; ++import java.awt.image.BufferedImage; ++import java.beans.BeanInfo; ++import java.beans.Introspector; ++import java.beans.SimpleBeanInfo; ++ ++public class Test7195106 { ++ ++ public static void main(String[] arg) throws Exception { ++ BeanInfo info = Introspector.getBeanInfo(My.class); ++ if (null == info.getIcon(BeanInfo.ICON_COLOR_16x16)) { ++ throw new Error("Unexpected behavior"); ++ } ++ try { ++ int[] array = new int[1024]; ++ while (true) { ++ array = new int[array.length << 1]; ++ } ++ } ++ catch (OutOfMemoryError error) { ++ System.gc(); ++ } ++ if (null == info.getIcon(BeanInfo.ICON_COLOR_16x16)) { ++ throw new Error("Explicit BeanInfo is collected"); ++ } ++ } ++ ++ public static class My { ++ } ++ ++ public static class MyBeanInfo extends SimpleBeanInfo { ++ @Override ++ public Image getIcon(int type) { ++ return new BufferedImage(16, 16, BufferedImage.TYPE_INT_RGB); ++ } ++ } ++} --- jdk/test/java/beans/Performance/Test7122740.java 2012-08-10 10:32:32.000000000 -0700 +++ jdk/test/java/beans/Performance/Test7122740.java 1969-12-31 16:00:00.000000000 -0800 @@ -1,57 +0,0 @@ @@ -13041,8 +26811,182 @@ - System.out.println("Time (ms): " + (-time / 1000000)); - } -} +--- jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java 2012-08-10 10:32:33.000000000 -0700 ++++ jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java 2013-01-16 08:58:12.000000000 -0800 +@@ -1,5 +1,5 @@ + /** +- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,6 +26,8 @@ + * @bug 6380849 + * @summary Tests PropertyEditor finder + * @author Sergey Malenkov ++ * @compile -XDignore.symbol.file TestPropertyEditor.java ++ * @run main TestPropertyEditor + */ + + import editors.SecondBeanEditor; +@@ -36,17 +38,17 @@ + import java.beans.PropertyEditor; + import java.beans.PropertyEditorManager; + +-import sun.beans.editors.BooleanEditor; +-import sun.beans.editors.ByteEditor; +-import sun.beans.editors.ColorEditor; +-import sun.beans.editors.DoubleEditor; +-import sun.beans.editors.EnumEditor; +-import sun.beans.editors.FloatEditor; +-import sun.beans.editors.FontEditor; +-import sun.beans.editors.IntegerEditor; +-import sun.beans.editors.LongEditor; +-import sun.beans.editors.ShortEditor; +-import sun.beans.editors.StringEditor; ++import com.sun.beans.editors.BooleanEditor; ++import com.sun.beans.editors.ByteEditor; ++import com.sun.beans.editors.ColorEditor; ++import com.sun.beans.editors.DoubleEditor; ++import com.sun.beans.editors.EnumEditor; ++import com.sun.beans.editors.FloatEditor; ++import com.sun.beans.editors.FontEditor; ++import com.sun.beans.editors.IntegerEditor; ++import com.sun.beans.editors.LongEditor; ++import com.sun.beans.editors.ShortEditor; ++import com.sun.beans.editors.StringEditor; + + public class TestPropertyEditor implements Runnable { + +--- jdk/test/java/beans/PropertyEditor/Test6963811.java 2012-08-10 10:32:33.000000000 -0700 ++++ jdk/test/java/beans/PropertyEditor/Test6963811.java 2013-01-16 08:58:12.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,10 +26,12 @@ + * @bug 6963811 + * @summary Tests deadlock in PropertyEditorManager + * @author Sergey Malenkov ++ * @compile -XDignore.symbol.file Test6963811.java ++ * @run main Test6963811 + */ + + import java.beans.PropertyEditorManager; +-import sun.beans.editors.StringEditor; ++import com.sun.beans.editors.StringEditor; + + public class Test6963811 implements Runnable { + private final long time; +--- jdk/test/java/beans/XMLEncoder/Test7169395.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/java/beans/XMLEncoder/Test7169395.java 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,101 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7169395 ++ * @summary Tests that array list initialized correctly ++ * @author Sergey Malenkov ++ */ ++ ++import java.beans.ConstructorProperties; ++import java.util.ArrayList; ++import java.util.Collection; ++import java.util.Map; ++import java.util.TreeMap; ++ ++public class Test7169395 extends AbstractTest { ++ ++ public static void main(String[] args) { ++ new Test7169395().test(true); ++ } ++ ++ protected Object getObject() { ++ Container container = new Container(); ++ container.add("test-null", null); ++ container.add("test-value", "value"); ++ container.add("test-other", "other"); ++ return container; ++ } ++ ++ public static class Component { ++ ++ private final Container container; ++ private final String name; ++ private String value; ++ ++ @ConstructorProperties({ "container", "name" }) ++ public Component(Container container, String name) { ++ this.container = container; ++ this.name = name; ++ } ++ ++ public Container getContainer() { ++ return this.container; ++ } ++ ++ public String getName() { ++ return this.name; ++ } ++ ++ public String getValue() { ++ return this.value; ++ } ++ ++ public void setValue(String value) { ++ this.value = value; ++ } ++ } ++ ++ public static class Container { ++ ++ private final Map<String, Component> map = new TreeMap<String, Component>(); ++ ++ public Collection<Component> getComponents() { ++ return new ArrayList<Component>(this.map.values()); ++ } ++ ++ public void setComponents(Collection<Component> components) { ++ this.map.clear(); ++ for (Component component : components){ ++ this.map.put(component.getName(), component); ++ } ++ } ++ ++ public void add(String name, String value) { ++ Component list = new Component(this, name); ++ list.setValue(value); ++ this.map.put(name, list); ++ } ++ } ++} --- jdk/test/java/io/File/GetXSpace.sh 2012-08-10 10:32:44.000000000 -0700 -+++ jdk/test/java/io/File/GetXSpace.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/io/File/GetXSpace.sh 2013-01-16 08:58:15.000000000 -0800 @@ -26,7 +26,7 @@ # set platform-dependent variable OS=`uname -s` @@ -13053,7 +26997,7 @@ Windows* ) SID=`sid`; TMP="c:/temp" ;; * ) --- jdk/test/java/io/FileOutputStream/ManyFiles.java 2012-08-10 10:32:46.000000000 -0700 -+++ jdk/test/java/io/FileOutputStream/ManyFiles.java 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/io/FileOutputStream/ManyFiles.java 2013-01-16 08:58:15.000000000 -0800 @@ -43,7 +43,7 @@ // Windows capability it is much simpler to only run it // on that platform. @@ -13064,7 +27008,7 @@ for (int n = 0; n < NUM_FILES; n++) { --- jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2012-08-10 10:33:10.000000000 -0700 -+++ jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2013-01-16 08:58:15.000000000 -0800 @@ -41,7 +41,7 @@ # Need to determine the classpath separator and filepath separator based on the # operating system. @@ -13075,7 +27019,7 @@ Windows* | CYGWIN* ) PS=";" ;; --- jdk/test/java/io/Serializable/serialver/classpath/run.sh 2012-08-10 10:33:31.000000000 -0700 -+++ jdk/test/java/io/Serializable/serialver/classpath/run.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/io/Serializable/serialver/classpath/run.sh 2013-01-16 08:58:15.000000000 -0800 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13086,7 +27030,7 @@ Windows* | CYGWIN* ) PS=";" ;; --- jdk/test/java/io/Serializable/serialver/nested/run.sh 2012-08-10 10:33:31.000000000 -0700 -+++ jdk/test/java/io/Serializable/serialver/nested/run.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/io/Serializable/serialver/nested/run.sh 2013-01-16 08:58:15.000000000 -0800 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13097,7 +27041,7 @@ Windows* | CYGWIN* ) PS=";" ;; --- jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2012-08-10 10:34:02.000000000 -0700 -+++ jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2013-01-16 08:58:15.000000000 -0800 @@ -45,13 +45,7 @@ # set platform-specific variables OS=`uname -s` @@ -13114,7 +27058,7 @@ ;; Windows*) --- jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2012-08-10 10:34:02.000000000 -0700 -+++ jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2013-01-16 08:58:15.000000000 -0800 @@ -49,13 +49,7 @@ # set platform-specific variables OS=`uname -s` @@ -13131,7 +27075,7 @@ ;; Windows* | CYGWIN* ) --- jdk/test/java/lang/StringCoding/CheckEncodings.sh 2012-08-10 10:34:06.000000000 -0700 -+++ jdk/test/java/lang/StringCoding/CheckEncodings.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/lang/StringCoding/CheckEncodings.sh 2013-01-16 08:58:15.000000000 -0800 @@ -30,7 +30,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13142,7 +27086,7 @@ echo "Passed"; exit 0 ;; * ) echo "Unrecognized system!" ; exit 1 ;; --- jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2012-08-10 10:34:07.000000000 -0700 -+++ jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2013-01-16 08:58:15.000000000 -0800 @@ -44,7 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13153,7 +27097,7 @@ PS=":" FS="/" --- jdk/test/java/lang/instrument/MakeJAR2.sh 2012-08-10 10:34:08.000000000 -0700 -+++ jdk/test/java/lang/instrument/MakeJAR2.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/lang/instrument/MakeJAR2.sh 2013-01-16 08:58:15.000000000 -0800 @@ -49,7 +49,7 @@ OS=`uname -s` @@ -13164,7 +27108,7 @@ ;; --- jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2012-08-10 10:34:11.000000000 -0700 -+++ jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2012-08-19 12:40:04.000000000 -0700 ++++ jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2013-01-16 08:58:15.000000000 -0800 @@ -35,15 +35,7 @@ OS=`uname -s` @@ -13183,7 +27127,7 @@ FS="/" ;; --- jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2012-08-10 10:34:13.000000000 -0700 -+++ jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2013-01-16 08:58:15.000000000 -0800 @@ -61,7 +61,7 @@ while true; do echo "Run $i: TestSystemLoadAvg" @@ -13194,7 +27138,7 @@ ;; * ) --- jdk/test/java/net/Authenticator/B4933582.sh 2012-08-10 10:34:17.000000000 -0700 -+++ jdk/test/java/net/Authenticator/B4933582.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/Authenticator/B4933582.sh 2013-01-16 08:58:15.000000000 -0800 @@ -26,7 +26,7 @@ OS=`uname -s` @@ -13288,7 +27232,7 @@ -} - --- jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2012-08-10 10:34:18.000000000 -0700 -+++ jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2013-01-16 08:58:15.000000000 -0800 @@ -45,6 +45,8 @@ return (true); if (p.getProperty ("os.name").equals ("Linux")) @@ -13299,7 +27243,7 @@ return (true); // Check for specific Solaris version from here --- jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2012-08-10 10:34:18.000000000 -0700 -+++ jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2013-01-16 08:58:15.000000000 -0800 @@ -27,11 +27,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13314,7 +27258,7 @@ FILESEP="/" ;; --- jdk/test/java/net/Socket/OldSocketImpl.sh 2012-08-10 10:34:21.000000000 -0700 -+++ jdk/test/java/net/Socket/OldSocketImpl.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/Socket/OldSocketImpl.sh 2013-01-16 08:58:15.000000000 -0800 @@ -28,7 +28,7 @@ OS=`uname -s` @@ -13325,7 +27269,7 @@ FS="/" ;; --- jdk/test/java/net/URL/B5086147.sh 2012-08-10 10:34:22.000000000 -0700 -+++ jdk/test/java/net/URL/B5086147.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/URL/B5086147.sh 2013-01-16 08:58:15.000000000 -0800 @@ -26,7 +26,7 @@ OS=`uname -s` @@ -13335,8 +27279,98 @@ exit 0 ;; CYGWIN* ) +--- jdk/test/java/net/URL/Gopher.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/java/net/URL/Gopher.java 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,74 @@ ++/* ++ * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7189567 ++ * @summary java net obselete protocol ++ * @run main Gopher ++ * @run main/othervm -Djdk.net.registerGopherProtocol Gopher enabled ++ * @run main/othervm -Djdk.net.registerGopherProtocol=false Gopher ++ */ ++ ++import java.net.MalformedURLException; ++import java.net.URL; ++ ++public class Gopher { ++ static final String GOPHER_PROP = "jdk.net.registerGopherProtocol"; ++ ++ public static void main(String[] args) throws Exception { ++ boolean expectEnabled = false; ++ if (args.length >= 1 && args[0].equals("enabled")) ++ expectEnabled = true; ++ ++ String prop = System.getProperty(GOPHER_PROP); ++ boolean gopherEnabled = prop == null ? false : ++ (prop.equalsIgnoreCase("false") ? false : true); ++ ++ // Validate system property reading ++ if (expectEnabled && !gopherEnabled) { ++ System.err.println(GOPHER_PROP + ": " + gopherEnabled); ++ throw new RuntimeException( ++ "Failed: expected system property to be enabled, but it is not"); ++ } ++ if (!expectEnabled && gopherEnabled) { ++ System.err.println(GOPHER_PROP + ": " + gopherEnabled); ++ throw new RuntimeException( ++ "Failed: expected system property to be disabled, but it is not"); ++ } ++ ++ try { ++ new URL("gopher://anyhost:70/[anydata]"); ++ if (!gopherEnabled) { ++ System.err.println(GOPHER_PROP + ": " + gopherEnabled); ++ throw new RuntimeException("Failed: gopher should NOT be enabled"); ++ } ++ } catch (MalformedURLException x) { ++ if (gopherEnabled) { ++ System.err.println(GOPHER_PROP + ": " + gopherEnabled); ++ x.printStackTrace(); ++ throw new RuntimeException("Failed: gopher should be enabled"); ++ } ++ } ++ } ++} +--- jdk/test/java/net/URL/Test.java 2012-08-10 10:34:23.000000000 -0700 ++++ jdk/test/java/net/URL/Test.java 2013-01-16 08:58:12.000000000 -0800 +@@ -322,10 +322,6 @@ + test("ftp://ftp.is.co.za/rfc/rfc1808.txt") + .s("ftp").h("ftp.is.co.za").p("/rfc/rfc1808.txt").z(); + +- test("gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles") +- .s("gopher").h("spinaltap.micro.umn.edu") +- .p("/00/Weather/California/Los%20Angeles").z(); +- + test("http://www.math.uio.no/faq/compression-faq/part1.html") + .s("http").h("www.math.uio.no").p("/faq/compression-faq/part1.html").z(); + --- jdk/test/java/net/URL/runconstructor.sh 2012-08-10 10:34:23.000000000 -0700 -+++ jdk/test/java/net/URL/runconstructor.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/URL/runconstructor.sh 2013-01-16 08:58:15.000000000 -0800 @@ -27,7 +27,7 @@ # OS=`uname -s` @@ -13347,7 +27381,7 @@ FS="/" ;; --- jdk/test/java/net/URLClassLoader/B5077773.sh 2012-08-10 10:34:23.000000000 -0700 -+++ jdk/test/java/net/URLClassLoader/B5077773.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/URLClassLoader/B5077773.sh 2013-01-16 08:58:15.000000000 -0800 @@ -34,11 +34,7 @@ OS=`uname -s` @@ -13362,7 +27396,7 @@ FS="/" ;; --- jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2012-08-10 10:34:25.000000000 -0700 -+++ jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2013-01-16 08:58:15.000000000 -0800 @@ -27,11 +27,7 @@ OS=`uname -s` @@ -13377,7 +27411,7 @@ FS="/" ;; --- jdk/test/java/net/URLConnection/6212146/test.sh 2012-08-10 10:34:25.000000000 -0700 -+++ jdk/test/java/net/URLConnection/6212146/test.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/net/URLConnection/6212146/test.sh 2013-01-16 08:58:15.000000000 -0800 @@ -33,11 +33,7 @@ OS=`uname -s` @@ -13471,8 +27505,201 @@ - } - } -} +--- jdk/test/java/nio/channels/Selector/ChangingInterests.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/java/nio/channels/Selector/ChangingInterests.java 2013-01-16 08:58:12.000000000 -0800 +@@ -0,0 +1,190 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* @test ++ * @bug 7200742 ++ * @summary Test that Selector doesn't spin when changing interest ops ++ */ ++ ++import java.net.*; ++import java.nio.ByteBuffer; ++import java.nio.channels.*; ++import static java.nio.channels.SelectionKey.*; ++import java.io.IOException; ++ ++public class ChangingInterests { ++ ++ static int OPS[] = { 0, OP_WRITE, OP_READ, (OP_WRITE|OP_READ) }; ++ ++ static String toOpsString(int ops) { ++ String s = ""; ++ if ((ops & OP_READ) > 0) ++ s += "POLLIN"; ++ if ((ops & OP_WRITE) > 0) { ++ if (s.length() > 0) ++ s += "|"; ++ s += "POLLOUT"; ++ } ++ if (s.length() == 0) ++ s = "0"; ++ return "(" + s + ")"; ++ } ++ ++ static void write1(SocketChannel peer) throws IOException { ++ peer.write(ByteBuffer.wrap(new byte[1])); ++ // give time for other end to be readable ++ try { ++ Thread.sleep(50); ++ } catch (InterruptedException ignore) { } ++ } ++ ++ static void drain(SocketChannel sc) throws IOException { ++ ByteBuffer buf = ByteBuffer.allocate(100); ++ int n; ++ while ((n = sc.read(buf)) > 0) { ++ buf.rewind(); ++ } ++ } ++ ++ /** ++ * Changes the given key's interest set from one set to another and then ++ * checks the selected key set and the key's channel. ++ */ ++ static void testChange(SelectionKey key, int from, int to) throws IOException { ++ Selector sel = key.selector(); ++ assertTrue(sel.keys().size() == 1, "Only one channel should be registered"); ++ ++ // ensure that channel is registered with the "from" interest set ++ key.interestOps(from); ++ sel.selectNow(); ++ sel.selectedKeys().clear(); ++ ++ // change to the "to" interest set ++ key.interestOps(to); ++ System.out.println("select..."); ++ int selected = sel.selectNow(); ++ System.out.println("" + selected + " channel(s) selected"); ++ ++ int expected = (to == 0) ? 0 : 1; ++ assertTrue(selected == expected, "Expected " + expected); ++ ++ // check selected keys ++ for (SelectionKey k: sel.selectedKeys()) { ++ assertTrue(k == key, "Unexpected key selected"); ++ ++ boolean readable = k.isReadable(); ++ boolean writable = k.isWritable(); ++ ++ System.out.println("key readable: " + readable); ++ System.out.println("key writable: " + writable); ++ ++ if ((to & OP_READ) == 0) { ++ assertTrue(!readable, "Not expected to be readable"); ++ } else { ++ assertTrue(readable, "Expected to be readable"); ++ } ++ ++ if ((to & OP_WRITE) == 0) { ++ assertTrue(!writable, "Not expected to be writable"); ++ } else { ++ assertTrue(writable, "Expected to be writable"); ++ } ++ ++ sel.selectedKeys().clear(); ++ } ++ } ++ ++ /** ++ * Tests that given Selector's select method blocks. ++ */ ++ static void testForSpin(Selector sel) throws IOException { ++ System.out.println("Test for spin..."); ++ long start = System.currentTimeMillis(); ++ int count = 3; ++ while (count-- > 0) { ++ int selected = sel.select(1000); ++ System.out.println("" + selected + " channel(s) selected"); ++ assertTrue(selected == 0, "Channel should not be selected"); ++ } ++ long dur = System.currentTimeMillis() - start; ++ assertTrue(dur > 1000, "select was too short"); ++ } ++ ++ public static void main(String[] args) throws IOException { ++ InetAddress lh = InetAddress.getLocalHost(); ++ ++ // create loopback connection ++ ServerSocketChannel ssc = ++ ServerSocketChannel.open().bind(new InetSocketAddress(0)); ++ ++ final SocketChannel sc = SocketChannel.open(); ++ sc.connect(new InetSocketAddress(lh, ssc.socket().getLocalPort())); ++ SocketChannel peer = ssc.accept(); ++ ++ sc.configureBlocking(false); ++ ++ // ensure that channel "sc" is readable ++ write1(peer); ++ ++ try (Selector sel = Selector.open()) { ++ SelectionKey key = sc.register(sel, 0); ++ sel.selectNow(); ++ ++ // test all transitions ++ for (int from: OPS) { ++ for (int to: OPS) { ++ ++ System.out.println(toOpsString(from) + " -> " + toOpsString(to)); ++ ++ testChange(key, from, to); ++ ++ // if the interst ops is now 0 then Selector should not spin ++ if (to == 0) ++ testForSpin(sel); ++ ++ // if interest ops is now OP_READ then make non-readable ++ // and test that Selector does not spin. ++ if (to == OP_READ) { ++ System.out.println("Drain channel..."); ++ drain(sc); ++ testForSpin(sel); ++ System.out.println("Make channel readable again"); ++ write1(peer); ++ } ++ ++ System.out.println(); ++ } ++ } ++ ++ } finally { ++ sc.close(); ++ peer.close(); ++ ssc.close(); ++ } ++ } ++ ++ static void assertTrue(boolean v, String msg) { ++ if (!v) throw new RuntimeException(msg); ++ } ++ ++} --- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2012-08-10 10:34:31.000000000 -0700 -+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2013-01-16 08:58:15.000000000 -0800 @@ -71,6 +71,48 @@ EXTRA_LIBS = -lc endif @@ -13523,7 +27750,7 @@ LAUNCHERLIB=$(LIBDIR)/libLauncher.so --- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2012-08-10 10:34:32.000000000 -0700 -+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2013-01-16 08:58:15.000000000 -0800 @@ -33,11 +33,14 @@ # @run shell run_tests.sh @@ -13593,7 +27820,7 @@ LIBDIR=lib/${PLATFORM}-${ARCH} LAUNCHERLIB=${LIBDIR}/libLauncher.so --- jdk/test/java/nio/charset/Charset/default.sh 2012-08-10 10:34:32.000000000 -0700 -+++ jdk/test/java/nio/charset/Charset/default.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/charset/Charset/default.sh 2013-01-16 08:58:15.000000000 -0800 @@ -41,10 +41,14 @@ fi @@ -13614,7 +27841,7 @@ JAVA=$TESTJAVA/bin/java --- jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2012-08-10 10:34:32.000000000 -0700 -+++ jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2013-01-16 08:58:15.000000000 -0800 @@ -34,7 +34,7 @@ OS=`uname -s` @@ -13625,7 +27852,7 @@ Windows* ) echo "Passed"; exit 0 ;; --- jdk/test/java/nio/charset/spi/basic.sh 2012-08-10 10:34:32.000000000 -0700 -+++ jdk/test/java/nio/charset/spi/basic.sh 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/charset/spi/basic.sh 2013-01-16 08:58:15.000000000 -0800 @@ -70,10 +70,14 @@ L="$1" shift @@ -13655,7 +27882,7 @@ *) echo "Unknown platform: `uname`"; exit 1 ;; esac --- jdk/test/java/nio/file/FileSystem/Basic.java 2012-08-10 10:34:32.000000000 -0700 -+++ jdk/test/java/nio/file/FileSystem/Basic.java 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/file/FileSystem/Basic.java 2013-01-16 08:58:15.000000000 -0800 @@ -76,6 +76,8 @@ checkSupported(fs, "posix", "unix", "owner", "acl", "user"); if (os.equals("Linux")) @@ -13666,7 +27893,7 @@ checkSupported(fs, "posix", "unix", "owner"); if (os.equals("Windows")) --- jdk/test/java/nio/file/Files/CopyAndMove.java 2012-08-10 10:34:32.000000000 -0700 -+++ jdk/test/java/nio/file/Files/CopyAndMove.java 2012-08-19 12:40:05.000000000 -0700 ++++ jdk/test/java/nio/file/Files/CopyAndMove.java 2013-01-16 08:58:15.000000000 -0800 @@ -634,7 +634,7 @@ // check POSIX attributes are copied @@ -13686,7 +27913,7 @@ if (isUnix) { --- jdk/test/java/rmi/registry/readTest/readTest.sh 2012-08-10 10:34:39.000000000 -0700 -+++ jdk/test/java/rmi/registry/readTest/readTest.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/rmi/registry/readTest/readTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -28,7 +28,7 @@ OS=`uname -s` @@ -13697,7 +27924,7 @@ FS="/" FILEURL="file:" --- jdk/test/java/rmi/reliability/launch_reliability.ksh 2012-08-10 10:34:42.000000000 -0700 -+++ jdk/test/java/rmi/reliability/launch_reliability.ksh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/rmi/reliability/launch_reliability.ksh 2013-01-16 08:58:15.000000000 -0800 @@ -84,14 +84,12 @@ @@ -13718,7 +27945,7 @@ export PATH_SEP mainpid=$$ --- jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2012-08-10 10:34:51.000000000 -0700 -+++ jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2013-01-16 08:58:15.000000000 -0800 @@ -46,15 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13737,7 +27964,7 @@ FILESEP="/" ;; --- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2012-08-10 10:34:51.000000000 -0700 -+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2013-01-16 08:58:15.000000000 -0800 @@ -34,15 +34,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13756,7 +27983,7 @@ FILESEP="/" ;; --- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2012-08-10 10:34:51.000000000 -0700 -+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2013-01-16 08:58:15.000000000 -0800 @@ -50,15 +50,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13775,7 +28002,7 @@ FILESEP="/" ;; --- jdk/test/java/security/Security/signedfirst/Dyn.sh 2012-08-10 10:34:51.000000000 -0700 -+++ jdk/test/java/security/Security/signedfirst/Dyn.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/security/Security/signedfirst/Dyn.sh 2013-01-16 08:58:15.000000000 -0800 @@ -46,15 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13794,7 +28021,7 @@ FILESEP="/" ;; --- jdk/test/java/security/Security/signedfirst/Static.sh 2012-08-10 10:34:51.000000000 -0700 -+++ jdk/test/java/security/Security/signedfirst/Static.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/security/Security/signedfirst/Static.sh 2013-01-16 08:58:15.000000000 -0800 @@ -46,15 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13813,7 +28040,7 @@ FILESEP="/" ;; --- jdk/test/java/util/Currency/PropertiesTest.sh 2012-08-10 10:34:57.000000000 -0700 -+++ jdk/test/java/util/Currency/PropertiesTest.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/util/Currency/PropertiesTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -30,7 +30,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13824,7 +28051,7 @@ FS="/" ;; --- jdk/test/java/util/PluggableLocale/ExecTest.sh 2012-08-10 10:35:02.000000000 -0700 -+++ jdk/test/java/util/PluggableLocale/ExecTest.sh 2012-08-19 12:40:06.000000000 -0700 ++++ jdk/test/java/util/PluggableLocale/ExecTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -58,7 +58,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13835,7 +28062,7 @@ FS="/" ;; --- jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2012-08-10 10:35:04.000000000 -0700 -+++ jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2013-01-16 08:58:15.000000000 -0800 @@ -31,7 +31,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13846,7 +28073,7 @@ FILESEP="/" ;; --- jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2012-08-10 10:35:05.000000000 -0700 -+++ jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -72,10 +72,10 @@ Windows* | CYGWIN* ) DEL=";" @@ -13861,7 +28088,7 @@ HAS_S=YES ;; --- jdk/test/java/util/ServiceLoader/basic.sh 2012-08-10 10:35:06.000000000 -0700 -+++ jdk/test/java/util/ServiceLoader/basic.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/java/util/ServiceLoader/basic.sh 2013-01-16 08:58:15.000000000 -0800 @@ -42,9 +42,7 @@ OS=`uname -s` @@ -13874,7 +28101,7 @@ * ) SEP='\;' ;; --- jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2012-08-10 10:35:08.000000000 -0700 -+++ jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2013-01-16 00:07:30.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. @@ -13937,8 +28164,22 @@ //--------------------- Infrastructure --------------------------- volatile int passed = 0, failed = 0; void pass() {passed++;} +--- jdk/test/java/util/concurrent/Executors/AutoShutdown.java 2012-08-10 10:35:09.000000000 -0700 ++++ jdk/test/java/util/concurrent/Executors/AutoShutdown.java 2013-01-16 08:58:13.000000000 -0800 +@@ -67,6 +67,11 @@ + e1 = e2 = null; + for (int i = 0; i < 10 && Thread.activeCount() > count0; i++) + tryWaitForFinalizersToRun(); ++ for (int i = 0; i < 10; ++i) { // give JVM a chance to settle. ++ if (Thread.activeCount() == count0) ++ return; ++ Thread.sleep(1000); ++ } + equal(Thread.activeCount(), count0); + } + --- jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2012-08-10 10:35:14.000000000 -0700 -+++ jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -51,7 +51,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13948,8 +28189,222 @@ NULL=/dev/null PS=":" FS="/" +--- jdk/test/javax/crypto/sanity/CheckManifestForRelease.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/javax/crypto/sanity/CheckManifestForRelease.java 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,187 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7195931 7197071 7198146 ++ * @summary UnsatisfiedLinkError on PKCS11.C_GetOperationState while ++ * using NSS from jre7u6+ ++ */ ++import java.net.*; ++import java.io.*; ++import java.security.*; ++import java.lang.reflect.*; ++ ++/** ++ * When the Java specification version is incremented, all of the providers ++ * must be recompiled with the proper implementation version to match. ++ */ ++public class CheckManifestForRelease { ++ ++ /** ++ * @param args the command line arguments ++ */ ++ public static void main(String[] args) throws Exception { ++ checkP11MessageDigestClone(); ++ checkFileManifests(); ++ } ++ ++ /* ++ * Iterate over the files of interest: JCE framework and providers ++ */ ++ static private void checkFileManifests() throws Exception { ++ System.out.println("============="); ++ String libDirName = System.getProperty("java.home", ".") + "/lib"; ++ String extDirName = libDirName + "/ext"; ++ ++ System.out.println("Checking Manifest in directory: \n " + ++ extDirName); ++ ++ /* ++ * Current list of JCE providers, all of which currently live in ++ * the extensions directory. Add if more are created. ++ */ ++ String[] providers = new String[]{ ++ "sunjce_provider.jar", ++ "sunec.jar", ++ "sunmscapi.jar", ++ "sunpkcs11.jar", ++ "ucrypto.jar" ++ }; ++ ++ checkManifest(libDirName, "jce.jar"); ++ for (String provider : providers) { ++ checkManifest(extDirName, provider); ++ } ++ System.out.println("Passed."); ++ } ++ ++ // Helper method to format the URL properly. ++ static private String formatURL(String dir, String file) { ++ return "jar:file:///" + dir + "/" + file + "!/"; ++ } ++ ++ static private String specVersion = ++ System.getProperty("java.specification.version"); ++ ++ /* ++ * Test the root cause, which is that there were no manifest values ++ * for many of the providers, and for those that had them, there was ++ * no test to make sure that the impl version was appropriate for ++ * the spec version. ++ */ ++ static private void checkManifest(String dir, String file) ++ throws Exception { ++ ++ System.out.println("Checking: " + file); ++ ++ String url = formatURL(dir, file); ++ JarURLConnection urlc = ++ (JarURLConnection) (new URL(url).openConnection()); ++ ++ String implVersion; ++ try { ++ implVersion = urlc.getManifest().getMainAttributes().getValue( ++ "Implementation-Version"); ++ } catch (FileNotFoundException e) { ++ /* ++ * If the file doesn't exist (e.g. mscapi on solaris), ++ * skip it. If there are other problems, fail out. ++ */ ++ System.out.println(" " + file + " not found, skipping..."); ++ return; ++ } ++ ++ if (implVersion == null) { ++ throw new Exception( ++ "Implementation-Version not found in Manifest"); ++ } ++ ++ if (!implVersion.startsWith(specVersion)) { ++ throw new Exception( ++ "Implementation-Version does not match " + ++ "Specification-Version"); ++ } ++ } ++ ++ /* ++ * Workaround for unfortunately generified forName() API ++ */ ++ @SuppressWarnings("unchecked") ++ static private Class<Provider> getProviderClass(String name) ++ throws Exception { ++ return (Class<Provider>)Class.forName(name); ++ } ++ ++ /* ++ * Check the symptom, an UnsatisfiedLinkError in MessageDigests. ++ */ ++ static private void checkP11MessageDigestClone() throws Exception { ++ ++ System.out.println("============="); ++ System.out.println("Checking for UnsatisfiedLinkError"); ++ String os = System.getProperty("os.name"); ++ // Only run on Solaris ++ if (!os.equals("SunOS")) { ++ return; ++ } ++ ++ /* ++ * We have to do some gyrations here, since the code to exercise ++ * this is in the P11 MessageDigests, and most of those mechanisms ++ * are disabled by default. ++ */ ++ String customP11File = ++ System.getProperty("TESTSRC", ".") + "/p11-solaris.txt"; ++ ++ /* ++ * In 7u, we don't have a 64 PKCS11 windows build yet, so we ++ * have to do some dynamic checking to determine if there is ++ * a PKCS11 library available to test against. Otherwise, the ++ * windows 64 bit will throw a compilation error before the ++ * test is even run. ++ */ ++ Constructor<Provider> cons; ++ Provider provider; ++ try { ++ Class<Provider> clazz = ++ getProviderClass("sun.security.pkcs11.SunPKCS11"); ++ cons = clazz.getConstructor(new Class[]{String.class}); ++ provider = cons.newInstance(new Object[]{customP11File}); ++ } catch (Exception ex) { ++ System.out.println("Skipping test - no PKCS11 provider available"); ++ return; ++ } ++ ++ try { ++ MessageDigest md = MessageDigest.getInstance("SHA1", provider); ++ md.update((byte) 0x01); ++ System.out.println(md.getProvider()); ++ md.clone(); ++ } catch (Exception e) { ++ // These kinds of failure are ok. We're testing the ++ // UnsatisfiedLinkError here. ++ } ++ System.out.println("Passed."); ++ } ++} +--- jdk/test/javax/crypto/sanity/p11-solaris.txt 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/javax/crypto/sanity/p11-solaris.txt 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,21 @@ ++# ++# Configuration file to allow the SunPKCS11 provider to utilize ++# the Solaris Cryptographic Framework, if it is available ++# ++# This is a temporary file only for testing. It does not contain the ++# normal disabled PKCS11 mechanisms that we will use for this test. ++# ++ ++name = MyProvider ++ ++description = SunPKCS11 accessing Solaris Cryptographic Framework ++ ++library = /usr/lib/$ISA/libpkcs11.so ++ ++handleStartupErrors = ignoreAll ++ ++attributes = compatibility ++ ++disabledMechanisms = { ++ CKM_MD2 ++} --- jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2012-08-10 10:35:15.000000000 -0700 -+++ jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2013-01-16 08:58:15.000000000 -0800 @@ -84,7 +84,7 @@ TMP="/tmp" ;; @@ -13960,7 +28415,7 @@ DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386 FILESEP="/" --- jdk/test/javax/script/CommonSetup.sh 2012-08-10 10:35:25.000000000 -0700 -+++ jdk/test/javax/script/CommonSetup.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/javax/script/CommonSetup.sh 2013-01-16 08:58:15.000000000 -0800 @@ -36,7 +36,7 @@ OS=`uname -s` @@ -13971,7 +28426,7 @@ FS="/" ;; --- jdk/test/javax/security/auth/Subject/doAs/Test.sh 2012-08-10 10:35:26.000000000 -0700 -+++ jdk/test/javax/security/auth/Subject/doAs/Test.sh 2012-08-19 12:40:07.000000000 -0700 ++++ jdk/test/javax/security/auth/Subject/doAs/Test.sh 2013-01-16 08:58:15.000000000 -0800 @@ -33,17 +33,7 @@ # set platform-dependent variables OS=`uname -s` @@ -13991,6 +28446,92 @@ PS=":" FS="/" RM="/bin/rm -f" +--- jdk/test/javax/swing/AncestorNotifier/7193219/bug7193219.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/javax/swing/AncestorNotifier/7193219/bug7193219.java 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* @test ++ @bug 7193219 ++ @summary JComboBox serialization fails in JDK 1.7 ++ @author Anton Litvinov ++*/ ++ ++import java.io.*; ++ ++import javax.swing.*; ++ ++public class bug7193219 { ++ private static byte[] serializeGUI() { ++ // Create and set up the window. ++ JFrame frame = new JFrame("Serialization"); ++ JPanel mainPanel = new JPanel(); ++ ++ /** ++ * If JComboBox is replaced with other component like JLabel ++ * The issue does not happen. ++ */ ++ JComboBox status = new JComboBox(); ++ status.addItem("123"); ++ mainPanel.add(status); ++ frame.getContentPane().add(mainPanel); ++ frame.pack(); ++ ++ try { ++ ByteArrayOutputStream baos = new ByteArrayOutputStream(); ++ ObjectOutputStream oos = new ObjectOutputStream(baos); ++ oos.writeObject(mainPanel); ++ oos.flush(); ++ frame.dispose(); ++ return baos.toByteArray(); ++ } catch (IOException ioe) { ++ throw new RuntimeException(ioe); ++ } ++ } ++ ++ private static void deserializeGUI(byte[] serializedData) { ++ try { ++ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(serializedData)); ++ JPanel mainPanel = (JPanel)ois.readObject(); ++ JFrame frame = new JFrame("Deserialization"); ++ frame.getContentPane().add(mainPanel); ++ frame.pack(); ++ frame.dispose(); ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } ++ } ++ ++ public static void main(String[] args) throws Exception { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ deserializeGUI(serializeGUI()); ++ } ++ }); ++ } ++} --- jdk/test/javax/swing/JComponent/7154030/bug7154030.java 2012-08-10 10:36:00.000000000 -0700 +++ jdk/test/javax/swing/JComponent/7154030/bug7154030.java 1969-12-31 16:00:00.000000000 -0800 @@ -1,169 +0,0 @@ @@ -14163,6 +28704,200 @@ - } - } -} +--- jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7160951 ++ * @summary [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar ++ * @author vera.akulova@oracle.com ++ * @run main ActionListenerCalledTwiceTest ++ */ ++ ++import sun.awt.*; ++import java.awt.*; ++import java.awt.event.*; ++import javax.swing.*; ++ ++public class ActionListenerCalledTwiceTest { ++ static volatile int listenerCallCounter = 0; ++ public static void main(String[] args) throws Exception { ++ if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) { ++ System.out.println("This test is for MacOS only. Automatically passed on other platforms."); ++ return; ++ } ++ System.setProperty("apple.laf.useScreenMenuBar", "true"); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); ++ } ++ }); ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ Robot robot = new Robot(); ++ robot.setAutoDelay(100); ++ robot.keyPress(KeyEvent.VK_META); ++ robot.keyPress(KeyEvent.VK_E); ++ robot.keyRelease(KeyEvent.VK_E); ++ robot.keyRelease(KeyEvent.VK_META); ++ toolkit.realSync(); ++ if (listenerCallCounter != 1) { ++ throw new Exception("Test failed: ActionListener called " + listenerCallCounter + " times instead of 1!"); ++ } ++ } ++ ++ private static void createAndShowGUI() { ++ JMenuItem newItem = new JMenuItem("Exit"); ++ newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.META_MASK)); ++ newItem.addActionListener( ++ new ActionListener(){ ++ public void actionPerformed(ActionEvent e) { ++ listenerCallCounter++; ++ } ++ } ++ ); ++ JMenu menu = new JMenu("Menu"); ++ menu.add(newItem); ++ JMenuBar bar = new JMenuBar(); ++ bar.add(menu); ++ JFrame frame = new JFrame("Test"); ++ frame.setJMenuBar(bar); ++ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ frame.pack(); ++ frame.setVisible(true); ++ } ++} +--- jdk/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/javax/swing/JMenuItem/ShortcutNotDiplayed/ShortcutNotDisplayedTest.java 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,105 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 7186371 ++ * @summary [macosx] Main menu shortcuts not displayed ++ * @author vera.akulova@oracle.com ++ * @run main/manual ShortcutNotDisplayedTest ++ */ ++ ++import java.awt.*; ++import java.awt.event.*; ++import javax.swing.*; ++ ++public class ShortcutNotDisplayedTest { ++ static volatile boolean done = false; ++ static volatile boolean pass = false; ++ static final String PASS_COMMAND = "pass"; ++ ++ public static void main(String[] args) throws Exception { ++ if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) { ++ System.out.println("This test is for MacOS only. Automatically passed on other platforms."); ++ return; ++ } ++ System.setProperty("apple.laf.useScreenMenuBar", "true"); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); ++ } ++ }); ++ ++ do { try { Thread.sleep(300); } catch (Exception e) {} } while (!done) ; ++ if (!pass) { ++ throw new Exception("Shortcuts not displayed as expected in the screen menu bar."); ++ } ++ } ++ ++ private static void createAndShowGUI() { ++ JMenuItem newItem = new JMenuItem("Exit"); ++ newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, java.awt.event.InputEvent.META_MASK)); ++ ++ JMenu menu = new JMenu("Test Frame Window Menu"); ++ menu.setMnemonic(KeyEvent.VK_M); ++ menu.add(newItem); ++ ++ JMenuBar bar = new JMenuBar(); ++ bar.add(menu); ++ JTextArea text = new JTextArea( ++ " Please follow instructions:\n" + ++ " 1. You should see \"Test Frame Window Menu\" menu on the screen menu bar.\n" + ++ " 2. Open \"Test Frame Window Menu\" menu. \n" + ++ " Check that menu item \"Exit\" has a shortcut with image for Command Key and symbol \"E\". \n" + ++ " If you see the shortcut press \"Passed\". Otherwise press \"Failed\".\n" ++ ); ++ text.setEditable(false); ++ ++ JScrollPane sp = new JScrollPane(text); ++ sp.setSize(300,200); ++ ++ JButton passBtn = new JButton("Pass"); ++ passBtn.setActionCommand(PASS_COMMAND); ++ JButton failBtn = new JButton("Fail"); ++ ActionListener listener = new ActionListener() { ++ public void actionPerformed(ActionEvent e) { ++ if (e.getActionCommand().equals(PASS_COMMAND)) { ++ pass = true; ++ } ++ done = true; ++ } ++ }; ++ ++ JFrame testFrame = new JFrame("Test Frame Window"); ++ testFrame.setLayout(new FlowLayout()); ++ testFrame.setBounds(100, 100, 600, 180); ++ testFrame.setJMenuBar(bar); ++ testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ passBtn.addActionListener(listener); ++ failBtn.addActionListener(listener); ++ testFrame.getContentPane().add(sp); ++ testFrame.getContentPane().add(passBtn); ++ testFrame.getContentPane().add(failBtn); ++ testFrame.setVisible(true); ++ } ++} --- jdk/test/javax/swing/text/DefaultCaret/6938583/bug6938583.java 2012-08-10 10:36:15.000000000 -0700 +++ jdk/test/javax/swing/text/DefaultCaret/6938583/bug6938583.java 1969-12-31 16:00:00.000000000 -0800 @@ -1,51 +0,0 @@ @@ -14218,7 +28953,7 @@ - } -} --- jdk/test/jprt.config 2012-08-10 10:36:17.000000000 -0700 -+++ jdk/test/jprt.config 2012-08-19 12:40:08.000000000 -0700 ++++ jdk/test/jprt.config 2013-01-16 08:58:15.000000000 -0800 @@ -71,8 +71,8 @@ # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise. @@ -14287,8 +29022,24 @@ # Export PATH setting PATH="${path4sdk}" --- jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2012-08-10 10:36:17.000000000 -0700 -+++ jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2012-08-19 12:40:08.000000000 -0700 -@@ -50,7 +50,7 @@ ++++ jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4215035 ++# @bug 4215035 7083664 + # @summary standard extensions path is hard-coded in default system policy file + # + # @build Ext_AllPolicy +@@ -50,23 +50,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14297,6 +29048,22 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" +- TMP=/tmp + ;; + Windows_95 | Windows_98 | Windows_NT ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/java2d/OpenGL/bug7181438.java 2012-08-10 10:36:19.000000000 -0700 +++ jdk/test/sun/java2d/OpenGL/bug7181438.java 1969-12-31 16:00:00.000000000 -0800 @@ -1,83 +0,0 @@ @@ -14384,7 +29151,7 @@ - } -} --- jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2012-08-10 10:36:21.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2012-08-19 12:40:08.000000000 -0700 ++++ jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -45,37 +45,53 @@ # has to locate libjvm.so. Also $! is not reliable on some releases of MKS. #{ @@ -14465,7 +29232,7 @@ # --- jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2012-08-10 10:36:21.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2012-08-19 12:40:08.000000000 -0700 ++++ jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2013-01-16 08:58:15.000000000 -0800 @@ -35,7 +35,7 @@ UMASK=`umask` @@ -14476,7 +29243,7 @@ FILESEP="/" DFILESEP=$FILESEP --- jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2012-08-10 10:36:21.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2012-08-19 12:40:08.000000000 -0700 ++++ jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -86,10 +86,12 @@ # on Windows 98. @@ -14495,7 +29262,7 @@ JAVA=${TESTJAVA}/bin/java CLASSPATH=${TESTCLASSES} --- jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2012-08-10 10:36:21.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2012-08-19 12:40:08.000000000 -0700 ++++ jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -70,10 +70,12 @@ # security the password file. @@ -14514,7 +29281,7 @@ # Create configuration file and dummy password file --- jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2012-08-10 10:36:22.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2012-08-19 12:40:08.000000000 -0700 ++++ jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -69,10 +69,12 @@ # security the password file. @@ -14533,7 +29300,7 @@ # Create management and SSL configuration files --- jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2012-08-10 10:36:24.000000000 -0700 -+++ jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -36,7 +36,7 @@ OS=`uname -s` @@ -14544,7 +29311,7 @@ FS="/" ;; --- jdk/test/sun/net/www/MarkResetTest.sh 2012-08-10 10:36:27.000000000 -0700 -+++ jdk/test/sun/net/www/MarkResetTest.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/net/www/MarkResetTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -28,7 +28,7 @@ OS=`uname -s` @@ -14555,7 +29322,7 @@ FS="/" ;; --- jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2012-08-10 10:36:28.000000000 -0700 -+++ jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2013-01-16 08:58:15.000000000 -0800 @@ -28,7 +28,7 @@ OS=`uname -s` @@ -14565,8 +29332,84 @@ PS=":" FS="/" ;; +--- jdk/test/sun/net/www/messageheader/HTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/sun/net/www/messageheader/HTest.java 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,73 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 8003948 ++ * @run main HTest ++ */ ++import java.io.*; ++import sun.net.www.MessageHeader; ++ ++public class HTest { ++ public static void main (String[] args) throws Exception { ++ String prefix = System.getProperty("test.src"); ++ System.out.println ("TEST.SRC = " + prefix); ++ for (int i=0; i<7; i++) { ++ File f = new File(prefix, Integer.toString(i)); ++ FileInputStream fis = new FileInputStream(f); ++ MessageHeader h = new MessageHeader(fis); ++ String before = h.toString(); ++ before = before.substring(before.indexOf('{')); ++ System.out.println ("Before"); ++ System.out.println (before); ++ boolean result = h.filterNTLMResponses("WWW-Authenticate"); ++ String after = h.toString(); ++ after = after.substring(after.indexOf('{')); ++ System.out.println ("After"); ++ System.out.println (after); ++ System.out.println ("Expected"); ++ System.out.println (expected[i]); ++ if (!expected[i].equals(after)) { ++ throw new RuntimeException(Integer.toString(i) + " expected != after"); ++ } ++ if (result != expectedResult[i]) { ++ throw new RuntimeException(Integer.toString(i) + " result != expectedResult"); ++ } ++ } ++ } ++ ++ static String expected[] = { ++ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}", ++ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: }", ++ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}", ++ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}", ++ "{null: HTTP/1.1 200 Ok}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM sdsds}{Bar: foo}", ++ "{null: HTTP/1.1 200 Ok}{WWW-Authenticate: Negotiate}{Foo: bar}{Bar: foo}{WWW-Authenticate: NTLM}{Bar: foo}{WWW-Authenticate: Kerberos}", ++ "{null: HTTP/1.1 200 Ok}{Foo: foo}{Bar: }{WWW-Authenticate: NTLM blob}{Bar: foo blob}" ++ }; ++ ++ static boolean[] expectedResult = { ++ false, false, true, true, true, false, false ++ }; ++} --- jdk/test/sun/net/www/protocol/jar/B5105410.sh 2012-08-10 10:36:29.000000000 -0700 -+++ jdk/test/sun/net/www/protocol/jar/B5105410.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/net/www/protocol/jar/B5105410.sh 2013-01-16 08:58:15.000000000 -0800 @@ -31,7 +31,7 @@ OS=`uname -s` @@ -14577,7 +29420,7 @@ FS="/" ;; --- jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2012-08-10 10:36:30.000000000 -0700 -+++ jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2013-01-16 08:58:15.000000000 -0800 @@ -31,7 +31,7 @@ OS=`uname -s` @@ -14588,7 +29431,7 @@ FS="/" ;; --- jdk/test/sun/nio/ch/SelProvider.java 2012-08-10 10:36:30.000000000 -0700 -+++ jdk/test/sun/nio/ch/SelProvider.java 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/nio/ch/SelProvider.java 2013-01-16 08:58:15.000000000 -0800 @@ -39,6 +39,8 @@ expected = "sun.nio.ch.DevPollSelectorProvider"; } else if ("Linux".equals(osname)) { @@ -14599,7 +29442,7 @@ expected = "sun.nio.ch.KQueueSelectorProvider"; } else --- jdk/test/sun/security/krb5/runNameEquals.sh 2012-08-10 10:36:39.000000000 -0700 -+++ jdk/test/sun/security/krb5/runNameEquals.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/security/krb5/runNameEquals.sh 2013-01-16 08:58:15.000000000 -0800 @@ -48,15 +48,11 @@ # set platform-dependent variables OS=`uname -s` @@ -14618,7 +29461,7 @@ PATHSEP=";" FILESEP="/" --- jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2012-08-10 10:36:40.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2013-01-16 08:58:15.000000000 -0800 @@ -131,6 +131,27 @@ ;; esac @@ -14648,7 +29491,7 @@ FS="\\" PS=";" --- jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2012-08-10 10:36:41.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2013-01-16 08:58:15.000000000 -0800 @@ -93,6 +93,27 @@ ;; esac @@ -14678,7 +29521,7 @@ FS="\\" PS=";" --- jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2012-08-10 10:36:42.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2013-01-16 08:58:15.000000000 -0800 @@ -50,19 +50,7 @@ OS=`uname -s` @@ -14701,7 +29544,7 @@ PS=":" CP="${FS}bin${FS}cp" --- jdk/test/sun/security/pkcs11/Provider/Login.sh 2012-08-10 10:36:42.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/Provider/Login.sh 2012-08-19 12:40:09.000000000 -0700 ++++ jdk/test/sun/security/pkcs11/Provider/Login.sh 2013-01-16 08:58:15.000000000 -0800 @@ -51,19 +51,7 @@ OS=`uname -s` @@ -14724,7 +29567,7 @@ PS=":" CP="${FS}bin${FS}cp" --- jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2012-08-10 10:36:53.000000000 -0700 -+++ jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2013-01-16 08:58:15.000000000 -0800 @@ -44,11 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -14739,7 +29582,7 @@ FILESEP="/" ;; --- jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2012-08-10 10:36:55.000000000 -0700 -+++ jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2013-01-16 08:58:15.000000000 -0800 @@ -47,15 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -14758,7 +29601,7 @@ FS="/" ;; --- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2012-08-10 10:36:58.000000000 -0700 -+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2013-01-16 08:58:15.000000000 -0800 @@ -33,7 +33,7 @@ OS=`uname -s` @@ -14769,7 +29612,7 @@ FS="/" ;; --- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2012-08-10 10:36:59.000000000 -0700 -+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -42,7 +42,7 @@ OS=`uname -s` @@ -14780,7 +29623,7 @@ PATHSEP=":" ;; --- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2012-08-10 10:37:02.000000000 -0700 -+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2013-01-16 08:58:15.000000000 -0800 @@ -32,7 +32,7 @@ HOSTNAME=`uname -n` OS=`uname -s` @@ -14791,7 +29634,7 @@ FS="/" ;; --- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2012-08-10 10:37:03.000000000 -0700 -+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2013-01-16 08:58:15.000000000 -0800 @@ -32,7 +32,7 @@ HOSTNAME=`uname -n` OS=`uname -s` @@ -14802,8 +29645,24 @@ FS="/" ;; --- jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2012-08-10 10:37:03.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 5094028 6219522 ++# @bug 5094028 6219522 7083664 + # @summary test new jarsigner -sigalg and -digestalg options + # @author Sean Mullan + # +@@ -46,26 +46,23 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14812,9 +29671,44 @@ NULL=/dev/null PS=":" FS="/" + CP="${FS}bin${FS}cp -f" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" + CP="cp -f" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" + CP="cp -f" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2012-08-10 10:37:03.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 6522933 ++# @bug 6522933 7083664 + # @summary jarsigner fails in a directory with a path contianing a % sign + # @author Wang Weijun + # +@@ -46,26 +46,23 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14823,9 +29717,44 @@ NULL=/dev/null PS=":" FS="/" + CP="${FS}bin${FS}cp -f" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" + CP="cp -f" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" + CP="cp -f" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/jarsigner/diffend.sh 2012-08-10 10:37:03.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/diffend.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -41,7 +41,7 @@ ++++ jdk/test/sun/security/tools/jarsigner/diffend.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 6948909 ++# @bug 6948909 7083664 + # @summary Jarsigner removes MANIFEST.MF info for badly packages jar's + # + +@@ -41,26 +41,23 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14834,9 +29763,44 @@ NULL=/dev/null PS=":" FS="/" + CP="${FS}bin${FS}cp -f" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" + CP="cp -f" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" + CP="cp -f" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/jarsigner/oldsig.sh 2012-08-10 10:37:03.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/oldsig.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -42,7 +42,7 @@ ++++ jdk/test/sun/security/tools/jarsigner/oldsig.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 6543940 6868865 ++# @bug 6543940 6868865 7083664 + # @summary Exception thrown when signing a jarfile in java 1.5 + # + # @run shell oldsig.sh +@@ -42,26 +42,23 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14845,9 +29809,44 @@ NULL=/dev/null PS=":" FS="/" + CP="${FS}bin${FS}cp -f" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" + CP="cp -f" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" + CP="cp -f" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4906940 ++# @bug 4906940 7083664 + # @summary Add -providerPath option for keytool allowing one to specify + # an additional classpath to search for providers. + # @author Andrew Fan +@@ -46,23 +46,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14856,8 +29855,24 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2013-01-16 08:58:15.000000000 -0800 @@ -47,15 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -14876,7 +29891,7 @@ FILESEP="/" ;; --- jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2013-01-16 08:58:15.000000000 -0800 @@ -42,13 +42,7 @@ # set platform-dependent variables OS=`uname -s` @@ -14893,8 +29908,24 @@ ;; CYGWIN* ) --- jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -45,7 +45,7 @@ ++++ jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4694076 ++# @bug 4694076 7083664 + # @summary KeyTool throws ArrayIndexOutOfBoundsException for listing + # SecretKey entries in non-verbose mode. + # @author Valerie Peng +@@ -45,23 +45,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14903,9 +29934,41 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test 1.1 04/11/12 +-# @bug 4909889 ++# @bug 4909889 7083664 + # @summary KeyTool accepts any input that user make as long as we can make some + # sense out of it, but when comes to present the info the user, it + # promotes a standard look. +@@ -46,23 +46,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14914,8 +29977,24 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" --- jdk/test/sun/security/tools/keytool/autotest.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/autotest.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/tools/keytool/autotest.sh 2013-01-16 08:58:15.000000000 -0800 @@ -72,6 +72,27 @@ ;; esac @@ -14945,8 +30024,24 @@ echo "Will not run test on: ${OS}" exit 0; --- jdk/test/sun/security/tools/keytool/i18n.sh 2012-08-10 10:37:04.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/i18n.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/keytool/i18n.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4348369 ++# @bug 4348369 7083664 + # @summary keytool not i18n compliant + # @author charlie lai + # +@@ -46,23 +46,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14955,8 +30050,24 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + PS=";" + FS="/" +- TMP=/tmp + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/keytool/printssl.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/printssl.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/tools/keytool/printssl.sh 2013-01-16 08:58:15.000000000 -0800 @@ -37,7 +37,7 @@ # set platform-dependent variables OS=`uname -s` @@ -14967,8 +30078,24 @@ ;; CYGWIN* ) --- jdk/test/sun/security/tools/keytool/resource.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/resource.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -43,7 +43,7 @@ ++++ jdk/test/sun/security/tools/keytool/resource.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 6239297 ++# @bug 6239297 7083664 + # @summary keytool usage is broken after changing Resources.java + # @author Max Wang + # +@@ -43,20 +43,17 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14976,9 +30103,38 @@ + SunOS | Linux | *BSD | Darwin ) NULL=/dev/null FS="/" - TMP=/tmp +- TMP=/tmp + ;; + CYGWIN* ) + NULL=/dev/null + FS="/" +- TMP=/tmp + ;; + Windows_* ) + NULL=NUL + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized operating system!" +@@ -65,13 +62,11 @@ + esac + + # the test code +-${TESTJAVA}${FS}bin${FS}keytool > ${TMP}${FS}temp_file_40875602475 2> ${NULL} +-grep MissingResourceException ${TMP}${FS}temp_file_40875602475 ++${TESTJAVA}${FS}bin${FS}keytool > temp_file_40875602475 2> ${NULL} ++grep MissingResourceException temp_file_40875602475 + + if [ $? -eq 0 ]; then +- rm ${TMP}${FS}temp_file_40875602475 + exit 1 + fi + +-rm ${TMP}${FS}temp_file_40875602475 + exit 0 --- jdk/test/sun/security/tools/keytool/standard.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/standard.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/tools/keytool/standard.sh 2013-01-16 08:58:15.000000000 -0800 @@ -44,7 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -14989,8 +30145,24 @@ ;; Windows_* ) --- jdk/test/sun/security/tools/policytool/Alias.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/Alias.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -47,7 +47,7 @@ ++++ jdk/test/sun/security/tools/policytool/Alias.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4449491 ++# @bug 4449491 7083664 + # @summary policytool should allow principal type to be empty + # (keystore alias substitution) + # +@@ -47,17 +47,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -14999,9 +30171,40 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp + ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" ++ ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/policytool/ChangeUI.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/ChangeUI.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/policytool/ChangeUI.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 6296772 6293981 6290216 ++# @bug 6296772 6293981 6290216 7083664 + # @summary FilePermission and DelegationPermission, and cancel button + # + # @run applet/manual=done ChangeUI.html +@@ -46,17 +46,20 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -15010,9 +30213,40 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4224186 ++# @bug 4224186 7083664 + # @summary missing File.separatorChar when initially opening policy file + # + # @run applet/manual=done OpenPolicy.html +@@ -46,17 +46,21 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -15021,9 +30255,41 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" ++ CP="cp -f" + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/policytool/SaveAs.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/SaveAs.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -47,7 +47,7 @@ ++++ jdk/test/sun/security/tools/policytool/SaveAs.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4252583 ++# @bug 4252583 7083664 + # @summary policytool throws FileNotFoundException when user tries to + # save new policy file + # +@@ -47,17 +47,21 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -15032,9 +30298,41 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" ++ CP="cp -f" + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4218206 ++# @bug 4218206 7083664 + # @summary missing or invalid permission target names in policy tool + # + # @run applet/manual=done UpdatePermissions.html +@@ -46,17 +46,21 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -15043,9 +30341,41 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" ++ CP="cp -f" + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/policytool/UsePolicy.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/UsePolicy.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/policytool/UsePolicy.sh 2013-01-16 08:58:15.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4273771 ++# @bug 4273771 7083664 + # @summary Need to add "usePolicy" RuntimePermission to policytool + # + # @run applet/manual=done UsePolicy.html +@@ -46,17 +46,21 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -15054,9 +30384,41 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" ++ CP="cp -f" + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/tools/policytool/i18n.sh 2012-08-10 10:37:05.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/i18n.sh 2012-08-19 12:40:10.000000000 -0700 -@@ -46,7 +46,7 @@ ++++ jdk/test/sun/security/tools/policytool/i18n.sh 2013-01-16 08:58:16.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -22,7 +22,7 @@ + # + + # @test +-# @bug 4348370 ++# @bug 4348370 7083664 + # @summary policytool not i18n compliant + # + # @run applet/manual=done i18n.html +@@ -46,17 +46,21 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -15065,8 +30427,24 @@ NULL=/dev/null PS=":" FS="/" +- TMP=/tmp ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=";" ++ FS="/" ++ CP="cp -f" + ;; + Windows* ) + NULL=NUL + PS=";" + FS="\\" +- TMP="c:/temp" + ;; + * ) + echo "Unrecognized system!" --- jdk/test/sun/security/util/Oid/S11N.sh 2012-08-10 10:37:06.000000000 -0700 -+++ jdk/test/sun/security/util/Oid/S11N.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/security/util/Oid/S11N.sh 2013-01-16 00:07:38.000000000 -0800 @@ -71,7 +71,7 @@ i[3-6]86 ) PF="linux-i586" @@ -15110,7 +30488,7 @@ SMALL=" --- jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2012-08-10 10:37:09.000000000 -0700 -+++ jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2013-01-16 08:58:16.000000000 -0800 @@ -53,7 +53,7 @@ OS=`uname -s` @@ -15121,7 +30499,7 @@ ;; --- jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2012-08-10 10:37:09.000000000 -0700 -+++ jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2012-08-19 12:40:10.000000000 -0700 ++++ jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2013-01-16 08:58:16.000000000 -0800 @@ -54,7 +54,7 @@ OS=`uname -s` @@ -15132,7 +30510,7 @@ ;; --- jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2012-08-10 10:37:12.000000000 -0700 -+++ jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2012-08-19 12:40:11.000000000 -0700 ++++ jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2013-01-16 08:58:16.000000000 -0800 @@ -33,7 +33,7 @@ case `uname -s` in @@ -15143,7 +30521,7 @@ N2A=$TESTJAVA/bin/native2ascii --- jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2012-08-10 10:37:12.000000000 -0700 -+++ jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2012-08-19 12:40:11.000000000 -0700 ++++ jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2013-01-16 08:58:16.000000000 -0800 @@ -56,7 +56,7 @@ OS=`uname -s` @@ -15153,8 +30531,1157 @@ PATHSEP=":" ;; +--- jdk/test/tools/launcher/Arrrghs.java 2012-08-10 10:37:13.000000000 -0700 ++++ jdk/test/tools/launcher/Arrrghs.java 2013-01-16 08:58:13.000000000 -0800 +@@ -36,7 +36,13 @@ + import java.io.IOException; + import java.io.InputStream; + import java.io.InputStreamReader; ++import java.util.ArrayList; ++import java.util.Arrays; ++import java.util.HashMap; ++import java.util.List; + import java.util.Map; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; + + public class Arrrghs extends TestHelper { + private Arrrghs(){} +@@ -75,7 +81,7 @@ + /* + * This method detects the cookie in the output stream of the process. + */ +- private static boolean detectCookie(InputStream istream, ++ private boolean detectCookie(InputStream istream, + String expectedArguments) throws IOException { + BufferedReader rd = new BufferedReader(new InputStreamReader(istream)); + boolean retval = false; +@@ -105,7 +111,7 @@ + return retval; + } + +- private static boolean doTest0(ProcessBuilder pb, String expectedArguments) { ++ private boolean doReExecTest0(ProcessBuilder pb, String expectedArguments) { + boolean retval = false; + try { + pb.redirectErrorStream(true); +@@ -121,26 +127,27 @@ + } + + /** +- * This method return true if the expected and detected arguments are the same. ++ * This method returns true if the expected and detected arguments are the same. + * Quoting could cause dissimilar testArguments and expected arguments. + */ +- static int doTest(String testArguments, String expectedPattern) { ++ int doReExecTest(String testArguments, String expectedPattern) { + ProcessBuilder pb = new ProcessBuilder(javaCmd, + VersionStr, testArguments); + + Map<String, String> env = pb.environment(); +- env.put("_JAVA_LAUNCHER_DEBUG", "true"); +- return doTest0(pb, testArguments) ? 0 : 1; ++ env.put(JLDEBUG_KEY, "true"); ++ return doReExecTest0(pb, testArguments) ? 0 : 1; + } + + /** + * A convenience method for identical test pattern and expected arguments + */ +- static int doTest(String testPattern) { +- return doTest(testPattern, testPattern); ++ int doReExecTest(String testPattern) { ++ return doReExecTest(testPattern, testPattern); + } + +- static void quoteParsingTests() { ++ @Test ++ void testQuoteParsingThroughReExec() { + /* + * Tests for 6214916 + * These tests require that a JVM (any JVM) be installed in the system registry. +@@ -155,96 +162,425 @@ + + + // Basic test +- testExitValue += doTest("-a -b -c -d"); ++ testExitValue += doReExecTest("-a -b -c -d"); + + // Basic test with many spaces +- testExitValue += doTest("-a -b -c -d"); ++ testExitValue += doReExecTest("-a -b -c -d"); + + // Quoted whitespace does matter ? +- testExitValue += doTest("-a \"\"-b -c\"\" -d"); ++ testExitValue += doReExecTest("-a \"\"-b -c\"\" -d"); + + + // Escaped quotes outside of quotes as literals +- testExitValue += doTest("-a \\\"-b -c\\\" -d"); ++ testExitValue += doReExecTest("-a \\\"-b -c\\\" -d"); + + // Check for escaped quotes inside of quotes as literal +- testExitValue += doTest("-a \"-b \\\"stuff\\\"\" -c -d"); ++ testExitValue += doReExecTest("-a \"-b \\\"stuff\\\"\" -c -d"); + + // A quote preceeded by an odd number of slashes is a literal quote +- testExitValue += doTest("-a -b\\\\\\\" -c -d"); ++ testExitValue += doReExecTest("-a -b\\\\\\\" -c -d"); + + // A quote preceeded by an even number of slashes is a literal quote + // see 6214916. +- testExitValue += doTest("-a -b\\\\\\\\\" -c -d"); ++ testExitValue += doReExecTest("-a -b\\\\\\\\\" -c -d"); + + // Make sure that whitespace doesn't interfere with the removal of the + // appropriate tokens. (space-tab-space preceeds -jre-restict-search). +- testExitValue += doTest("-a -b \t -jre-restrict-search -c -d","-a -b -c -d"); ++ testExitValue += doReExecTest("-a -b \t -jre-restrict-search -c -d", "-a -b -c -d"); + + // Make sure that the mJRE tokens being stripped, aren't stripped if + // they happen to appear as arguments to the main class. +- testExitValue += doTest("foo -version:1.1+"); ++ testExitValue += doReExecTest("foo -version:1.1+"); + +- System.out.println("Completed arguments quoting tests with " + +- testExitValue + " errors"); ++ System.out.println("Completed arguments quoting tests with " ++ + testExitValue + " errors"); ++ } ++ // the pattern we hope to see in the output ++ static final Pattern ArgPattern = Pattern.compile("\\s*argv\\[[0-9]*\\].*=.*"); ++ ++ void checkArgumentParsing(String inArgs, String... expArgs) throws IOException { ++ List<String> scratchpad = new ArrayList<>(); ++ scratchpad.add("set " + JLDEBUG_KEY + "=true"); ++ // GAK, -version needs to be added so that windows can flush its stderr ++ // exiting the process prematurely can terminate the stderr. ++ scratchpad.add(javaCmd + " -version " + inArgs); ++ File batFile = new File("atest.bat"); ++ java.nio.file.Files.deleteIfExists(batFile.toPath()); ++ createFile(batFile, scratchpad); ++ ++ TestResult tr = doExec(batFile.getName()); ++ ++ ArrayList<String> expList = new ArrayList<>(); ++ expList.add(javaCmd); ++ expList.add("-version"); ++ expList.addAll(Arrays.asList(expArgs)); ++ ++ List<String> gotList = new ArrayList<>(); ++ for (String x : tr.testOutput) { ++ Matcher m = ArgPattern.matcher(x); ++ if (m.matches()) { ++ String a[] = x.split("="); ++ gotList.add(a[a.length - 1].trim()); ++ } ++ } ++ if (!gotList.equals(expList)) { ++ System.out.println(tr); ++ System.out.println("Expected args:"); ++ System.out.println(expList); ++ System.out.println("Obtained args:"); ++ System.out.println(gotList); ++ throw new RuntimeException("Error: args do not match"); ++ } ++ System.out.println("\'" + inArgs + "\'" + " - Test passed"); ++ } ++ ++ /* ++ * This tests general quoting and are specific to Windows, *nixes ++ * need not worry about this, these have been tested with Windows ++ * implementation and those that are known to work are used against ++ * the java implementation. Note that the ProcessBuilder gets in the ++ * way when testing some of these arguments, therefore we need to ++ * create and execute a .bat file containing the arguments. ++ */ ++ @Test ++ void testArgumentParsing() throws IOException { ++ if (!isWindows) ++ return; ++ // no quotes ++ checkArgumentParsing("a b c d", "a", "b", "c", "d"); ++ ++ // single quotes ++ checkArgumentParsing("\"a b c d\"", "a b c d"); ++ ++ //double quotes ++ checkArgumentParsing("\"\"a b c d\"\"", "a", "b", "c", "d"); ++ ++ // triple quotes ++ checkArgumentParsing("\"\"\"a b c d\"\"\"", "\"a b c d\""); ++ ++ // a literal within single quotes ++ checkArgumentParsing("\"a\"b c d\"e\"", "ab", "c", "de"); ++ ++ // a literal within double quotes ++ checkArgumentParsing("\"\"a\"b c d\"e\"\"", "ab c de"); ++ ++ // a literal quote ++ checkArgumentParsing("a\\\"b", "a\"b"); ++ ++ // double back-slash ++ checkArgumentParsing("\"a b c d\\\\\"", "a b c d\\"); ++ ++ // triple back-slash ++ checkArgumentParsing("a\\\\\\\"b", "a\\\"b"); ++ ++ // dangling quote ++ checkArgumentParsing("\"a b c\"\"", "a b c\""); ++ ++ // expansions of white space separators ++ checkArgumentParsing("a b", "a", "b"); ++ checkArgumentParsing("a\tb", "a", "b"); ++ checkArgumentParsing("a \t b", "a", "b"); ++ ++ checkArgumentParsing("\"C:\\TEST A\\\\\"", "C:\\TEST A\\"); ++ checkArgumentParsing("\"\"C:\\TEST A\\\\\"\"", "C:\\TEST", "A\\"); ++ ++ // MS Windows tests ++ // triple back-slash ++ checkArgumentParsing("a\\\\\\d", "a\\\\\\d"); ++ ++ // triple back-slash in quotes ++ checkArgumentParsing("\"a\\\\\\d\"", "a\\\\\\d"); ++ ++ // slashes separating characters ++ checkArgumentParsing("X\\Y\\Z", "X\\Y\\Z"); ++ checkArgumentParsing("\\X\\Y\\Z", "\\X\\Y\\Z"); ++ ++ // literals within dangling quotes, etc. ++ checkArgumentParsing("\"a b c\" d e", "a b c", "d", "e"); ++ checkArgumentParsing("\"ab\\\"c\" \"\\\\\" d", "ab\"c", "\\", "d"); ++ checkArgumentParsing("a\\\\\\c d\"e f\"g h", "a\\\\\\c", "de fg", "h"); ++ checkArgumentParsing("a\\\\\\\"b c d", "a\\\"b", "c", "d"); ++ checkArgumentParsing("a\\\\\\\\\"g c\" d e", "a\\\\g c", "d", "e"); ++ ++ // treatment of back-slashes ++ checkArgumentParsing("*\\", "*\\"); ++ checkArgumentParsing("*/", "*/"); ++ checkArgumentParsing(".\\*", ".\\*"); ++ checkArgumentParsing("./*", "./*"); ++ checkArgumentParsing("..\\..\\*", "..\\..\\*"); ++ checkArgumentParsing("../../*", "../../*"); ++ checkArgumentParsing("..\\..\\", "..\\..\\"); ++ checkArgumentParsing("../../", "../../"); ++ } ++ ++ private void initEmptyDir(File emptyDir) throws IOException { ++ if (emptyDir.exists()) { ++ recursiveDelete(emptyDir); ++ } ++ emptyDir.mkdir(); ++ } ++ ++ private void initDirWithJavaFiles(File libDir) throws IOException { ++ ++ if (libDir.exists()) { ++ recursiveDelete(libDir); ++ } ++ libDir.mkdirs(); ++ ArrayList<String> scratchpad = new ArrayList<>(); ++ scratchpad.add("package lib;"); ++ scratchpad.add("public class Fbo {"); ++ scratchpad.add("public static void main(String... args){Foo.f();}"); ++ scratchpad.add("public static void f(){}"); ++ scratchpad.add("}"); ++ createFile(new File(libDir, "Fbo.java"), scratchpad); ++ ++ scratchpad.clear(); ++ scratchpad.add("package lib;"); ++ scratchpad.add("public class Foo {"); ++ scratchpad.add("public static void main(String... args){"); ++ scratchpad.add("for (String x : args) {"); ++ scratchpad.add("System.out.println(x);"); ++ scratchpad.add("}"); ++ scratchpad.add("Fbo.f();"); ++ scratchpad.add("}"); ++ scratchpad.add("public static void f(){}"); ++ scratchpad.add("}"); ++ createFile(new File(libDir, "Foo.java"), scratchpad); ++ } ++ ++ void checkArgumentWildcard(String inArgs, String... expArgs) throws IOException { ++ String[] in = {inArgs}; ++ checkArgumentWildcard(in, expArgs); ++ ++ // now add arbitrary arguments before and after ++ String[] outInArgs = { "-Q", inArgs, "-R"}; ++ ++ String[] outExpArgs = new String[expArgs.length + 2]; ++ outExpArgs[0] = "-Q"; ++ System.arraycopy(expArgs, 0, outExpArgs, 1, expArgs.length); ++ outExpArgs[expArgs.length + 1] = "-R"; ++ checkArgumentWildcard(outInArgs, outExpArgs); ++ } ++ ++ void checkArgumentWildcard(String[] inArgs, String[] expArgs) throws IOException { ++ ArrayList<String> argList = new ArrayList<>(); ++ argList.add(javaCmd); ++ argList.add("-cp"); ++ argList.add("lib" + File.separator + "*"); ++ argList.add("lib.Foo"); ++ argList.addAll(Arrays.asList(inArgs)); ++ String[] cmds = new String[argList.size()]; ++ argList.toArray(cmds); ++ TestResult tr = doExec(cmds); ++ if (!tr.isOK()) { ++ System.out.println(tr); ++ throw new RuntimeException("Error: classpath single entry wildcard entry"); ++ } ++ ++ ArrayList<String> expList = new ArrayList<>(); ++ expList.addAll(Arrays.asList(expArgs)); ++ ++ List<String> gotList = new ArrayList<>(); ++ for (String x : tr.testOutput) { ++ gotList.add(x.trim()); ++ } ++ if (!gotList.equals(expList)) { ++ System.out.println(tr); ++ System.out.println("Expected args:"); ++ System.out.println(expList); ++ System.out.println("Obtained args:"); ++ System.out.println(gotList); ++ throw new RuntimeException("Error: args do not match"); ++ } ++ System.out.print("\'"); ++ for (String x : inArgs) { ++ System.out.print(x + " "); ++ } ++ System.out.println("\'" + " - Test passed"); + } + + /* ++ * These tests are not expected to work on *nixes, and are ignored. ++ */ ++ @Test ++ void testWildCardArgumentProcessing() throws IOException { ++ if (!isWindows) ++ return; ++ File cwd = new File("."); ++ File libDir = new File(cwd, "lib"); ++ initDirWithJavaFiles(libDir); ++ initEmptyDir(new File(cwd, "empty")); ++ ++ // test if javac (the command) can compile *.java ++ TestResult tr = doExec(javacCmd, libDir.getName() + File.separator + "*.java"); ++ if (!tr.isOK()) { ++ System.out.println(tr); ++ throw new RuntimeException("Error: compiling java wildcards"); ++ } ++ ++ // use the jar cmd to create jars using the ? wildcard ++ File jarFoo = new File(libDir, "Foo.jar"); ++ tr = doExec(jarCmd, "cvf", jarFoo.getAbsolutePath(), "lib" + File.separator + "F?o.class"); ++ if (!tr.isOK()) { ++ System.out.println(tr); ++ throw new RuntimeException("Error: creating jar with wildcards"); ++ } ++ ++ // now the litmus test!, this should work ++ checkArgumentWildcard("a", "a"); ++ ++ // test for basic expansion ++ checkArgumentWildcard("lib\\F*java", "lib\\Fbo.java", "lib\\Foo.java"); ++ ++ // basic expansion in quotes ++ checkArgumentWildcard("\"lib\\F*java\"", "lib\\F*java"); ++ ++ checkArgumentWildcard("lib\\**", "lib\\Fbo.class", "lib\\Fbo.java", ++ "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java"); ++ ++ checkArgumentWildcard("lib\\*?", "lib\\Fbo.class", "lib\\Fbo.java", ++ "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java"); ++ ++ checkArgumentWildcard("lib\\?*", "lib\\Fbo.class", "lib\\Fbo.java", ++ "lib\\Foo.class", "lib\\Foo.jar", "lib\\Foo.java"); ++ ++ checkArgumentWildcard("lib\\?", "lib\\?"); ++ ++ // test for basic expansion ++ checkArgumentWildcard("lib\\*java", "lib\\Fbo.java", "lib\\Foo.java"); ++ ++ // basic expansion in quotes ++ checkArgumentWildcard("\"lib\\*.java\"", "lib\\*.java"); ++ ++ // suffix expansion ++ checkArgumentWildcard("lib\\*.class", "lib\\Fbo.class", "lib\\Foo.class"); ++ ++ // suffix expansion in quotes ++ checkArgumentWildcard("\"lib\\*.class\"", "lib\\*.class"); ++ ++ // check for ? expansion now ++ checkArgumentWildcard("lib\\F?o.java", "lib\\Fbo.java", "lib\\Foo.java"); ++ ++ // check ? in quotes ++ checkArgumentWildcard("\"lib\\F?o.java\"", "lib\\F?o.java"); ++ ++ // check ? as suffixes ++ checkArgumentWildcard("lib\\F?o.????", "lib\\Fbo.java", "lib\\Foo.java"); ++ ++ // check ? in a leading role ++ checkArgumentWildcard("lib\\???.java", "lib\\Fbo.java", "lib\\Foo.java"); ++ checkArgumentWildcard("\"lib\\???.java\"", "lib\\???.java"); ++ ++ // check ? prefixed with - ++ checkArgumentWildcard("-?", "-?"); ++ ++ // check * prefixed with - ++ checkArgumentWildcard("-*", "-*"); ++ ++ // check on empty directory ++ checkArgumentWildcard("empty\\*", "empty\\*"); ++ checkArgumentWildcard("empty\\**", "empty\\**"); ++ checkArgumentWildcard("empty\\?", "empty\\?"); ++ checkArgumentWildcard("empty\\??", "empty\\??"); ++ checkArgumentWildcard("empty\\*?", "empty\\*?"); ++ checkArgumentWildcard("empty\\?*", "empty\\?*"); ++ ++ } ++ ++ void doArgumentCheck(String inArgs, String... expArgs) { ++ Map<String, String> env = new HashMap<>(); ++ env.put(JLDEBUG_KEY, "true"); ++ TestResult tr = doExec(env, javaCmd, inArgs); ++ System.out.println(tr); ++ int sindex = tr.testOutput.indexOf("Command line args:"); ++ if (sindex < 0) { ++ System.out.println(tr); ++ throw new RuntimeException("Error: no output"); ++ } ++ sindex++; // skip over the tag ++ List<String> gotList = new ArrayList<>(); ++ for (String x : tr.testOutput.subList(sindex, sindex + expArgs.length)) { ++ String a[] = x.split("="); ++ gotList.add(a[a.length - 1].trim()); ++ } ++ List<String> expList = Arrays.asList(expArgs); ++ if (!gotList.equals(expList)) { ++ System.out.println(tr); ++ System.out.println("Expected args:"); ++ System.out.println(expList); ++ System.out.println("Obtained args:"); ++ System.out.println(gotList); ++ throw new RuntimeException("Error: args do not match"); ++ } ++ } ++ ++ ++ /* + * These tests are usually run on non-existent targets to check error results + */ +- static void runBasicErrorMessageTests() { ++ @Test ++ void testBasicErrorMessages() { + // Tests for 5030233 + TestResult tr = doExec(javaCmd, "-cp"); + tr.checkNegative(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + tr = doExec(javaCmd, "-classpath"); + tr.checkNegative(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + tr = doExec(javaCmd, "-jar"); + tr.checkNegative(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + tr = doExec(javacCmd, "-cp"); + tr.checkNegative(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // Test for 6356475 "REGRESSION:"java -X" from cmdline fails" + tr = doExec(javaCmd, "-X"); + tr.checkPositive(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + tr = doExec(javaCmd, "-help"); + tr.checkPositive(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // 6753938, test for non-negative exit value for an incorrectly formed + // command line, '% java' + tr = doExec(javaCmd); + tr.checkNegative(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // 6753938, test for non-negative exit value for an incorrectly formed + // command line, '% java -Xcomp' + tr = doExec(javaCmd, "-Xcomp"); + tr.checkNegative(); + tr.isNotZeroOutput(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + } + + /* + * Tests various dispositions of the main method, these tests are limited + * to English locales as they check for error messages that are localized. + */ +- static void runMainMethodTests() throws FileNotFoundException { ++ @Test ++ void testMainMethod() throws FileNotFoundException { + if (!isEnglishLocale()) { + return; + } +@@ -256,55 +592,65 @@ + (String[])null); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.contains("Error: Could not find or load main class MIA"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + // use classpath to check + tr = doExec(javaCmd, "-cp", "some.jar", "MIA"); + tr.contains("Error: Could not find or load main class MIA"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // incorrect method access + createJar(new File("some.jar"), new File("Foo"), + "private static void main(String[] args){}"); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.contains("Error: Main method not found in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + // use classpath to check + tr = doExec(javaCmd, "-cp", "some.jar", "Foo"); + tr.contains("Error: Main method not found in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // incorrect return type + createJar(new File("some.jar"), new File("Foo"), + "public static int main(String[] args){return 1;}"); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.contains("Error: Main method must return a value of type void in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + // use classpath to check + tr = doExec(javaCmd, "-cp", "some.jar", "Foo"); + tr.contains("Error: Main method must return a value of type void in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // incorrect parameter type + createJar(new File("some.jar"), new File("Foo"), + "public static void main(Object[] args){}"); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.contains("Error: Main method not found in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + // use classpath to check + tr = doExec(javaCmd, "-cp", "some.jar", "Foo"); + tr.contains("Error: Main method not found in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // incorrect method type - non-static + createJar(new File("some.jar"), new File("Foo"), + "public void main(String[] args){}"); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.contains("Error: Main method is not static in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + // use classpath to check + tr = doExec(javaCmd, "-cp", "some.jar", "Foo"); + tr.contains("Error: Main method is not static in class Foo"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // amongst a potpourri of kindred main methods, is the right one chosen ? + createJar(new File("some.jar"), new File("Foo"), +@@ -316,25 +662,29 @@ + "public static void main(String[] args) {System.out.println(\"THE_CHOSEN_ONE\");}"); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.contains("THE_CHOSEN_ONE"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + // use classpath to check + tr = doExec(javaCmd, "-cp", "some.jar", "Foo"); + tr.contains("THE_CHOSEN_ONE"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // test for extraneous whitespace in the Main-Class attribute + createJar(" Foo ", new File("some.jar"), new File("Foo"), + "public static void main(String... args){}"); + tr = doExec(javaCmd, "-jar", "some.jar"); + tr.checkPositive(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + } + /* + * tests 6968053, ie. we turn on the -Xdiag (for now) flag and check if + * the suppressed stack traces are exposed, ignore these tests for localized + * locales, limiting to English only. + */ +- static void runDiagOptionTests() throws FileNotFoundException { ++ @Test ++ void testDiagOptions() throws FileNotFoundException { + if (!isEnglishLocale()) { // only english version + return; + } +@@ -345,48 +695,51 @@ + tr = doExec(javaCmd, "-Xdiag", "-jar", "some.jar"); + tr.contains("Error: Could not find or load main class MIA"); + tr.contains("java.lang.ClassNotFoundException: MIA"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // use classpath to check + tr = doExec(javaCmd, "-Xdiag", "-cp", "some.jar", "MIA"); + tr.contains("Error: Could not find or load main class MIA"); + tr.contains("java.lang.ClassNotFoundException: MIA"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + // a missing class on the classpath + tr = doExec(javaCmd, "-Xdiag", "NonExistentClass"); + tr.contains("Error: Could not find or load main class NonExistentClass"); + tr.contains("java.lang.ClassNotFoundException: NonExistentClass"); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + } + +- static void test6894719() { ++ @Test ++ static void testJreRestrictSearchFlag() { + // test both arguments to ensure they exist + TestResult tr = null; + tr = doExec(javaCmd, + "-no-jre-restrict-search", "-version"); + tr.checkPositive(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + + tr = doExec(javaCmd, + "-jre-restrict-search", "-version"); + tr.checkPositive(); +- System.out.println(tr); ++ if (!tr.testStatus) ++ System.out.println(tr); + } + + /** + * @param args the command line arguments + * @throws java.io.FileNotFoundException + */ +- public static void main(String[] args) throws FileNotFoundException { ++ public static void main(String[] args) throws Exception { + if (debug) { + System.out.println("Starting Arrrghs tests"); + } +- quoteParsingTests(); +- runBasicErrorMessageTests(); +- runMainMethodTests(); +- test6894719(); +- runDiagOptionTests(); ++ Arrrghs a = new Arrrghs(); ++ a.run(args); + if (testExitValue > 0) { + System.out.println("Total of " + testExitValue + " failed"); + System.exit(1); +--- jdk/test/tools/launcher/TestHelper.java 2012-08-10 10:37:13.000000000 -0700 ++++ jdk/test/tools/launcher/TestHelper.java 2013-01-16 08:58:13.000000000 -0800 +@@ -21,6 +21,14 @@ + * questions. + */ + ++import java.lang.annotation.ElementType; ++import java.lang.annotation.Retention; ++import java.lang.annotation.RetentionPolicy; ++import java.lang.annotation.Target; ++import java.lang.reflect.Method; ++import java.util.regex.Pattern; ++import java.io.StringWriter; ++import java.io.PrintWriter; + import java.util.Set; + import java.io.BufferedReader; + import java.io.File; +@@ -55,11 +63,14 @@ + static final File TEST_SOURCES_DIR; + + static final String JAVAHOME = System.getProperty("java.home"); ++ static final String JAVA_BIN; + static final boolean isSDK = JAVAHOME.endsWith("jre"); + static final String javaCmd; + static final String javawCmd; + static final String java64Cmd; + static final String javacCmd; ++ static final String jarCmd; ++ + static final JavaCompiler compiler; + + static final boolean debug = Boolean.getBoolean("TestHelper.Debug"); +@@ -84,8 +95,10 @@ + static final String JAVA_FILE_EXT = ".java"; + static final String CLASS_FILE_EXT = ".class"; + static final String JAR_FILE_EXT = ".jar"; ++ static final String EXE_FILE_EXT = ".exe"; + static final String JLDEBUG_KEY = "_JAVA_LAUNCHER_DEBUG"; + static final String EXPECTED_MARKER = "TRACER_MARKER:About to EXEC"; ++ static final String TEST_PREFIX = "###TestError###: "; + + static int testExitValue = 0; + +@@ -111,6 +124,7 @@ + compiler = ToolProvider.getSystemJavaCompiler(); + File binDir = (isSDK) ? new File((new File(JAVAHOME)).getParentFile(), "bin") + : new File(JAVAHOME, "bin"); ++ JAVA_BIN = binDir.getAbsolutePath(); + File javaCmdFile = (isWindows) + ? new File(binDir, "java.exe") + : new File(binDir, "java"); +@@ -125,6 +139,15 @@ + : new File(binDir, "javac"); + javacCmd = javacCmdFile.getAbsolutePath(); + ++ File jarCmdFile = (isWindows) ++ ? new File(binDir, "jar.exe") ++ : new File(binDir, "jar"); ++ jarCmd = jarCmdFile.getAbsolutePath(); ++ if (!jarCmdFile.canExecute()) { ++ throw new RuntimeException("java <" + TestHelper.jarCmd + ++ "> must exist and should be executable"); ++ } ++ + if (isWindows) { + File javawCmdFile = new File(binDir, "javaw.exe"); + javawCmd = javawCmdFile.getAbsolutePath(); +@@ -152,6 +175,35 @@ + java64Cmd = null; + } + } ++ void run(String[] args) throws Exception { ++ int passed = 0, failed = 0; ++ final Pattern p = (args != null && args.length > 0) ++ ? Pattern.compile(args[0]) ++ : null; ++ for (Method m : this.getClass().getDeclaredMethods()) { ++ boolean selected = (p == null) ++ ? m.isAnnotationPresent(Test.class) ++ : p.matcher(m.getName()).matches(); ++ if (selected) { ++ try { ++ m.invoke(this, (Object[]) null); ++ System.out.println(m.getName() + ": OK"); ++ passed++; ++ } catch (Throwable ex) { ++ System.out.printf("Test %s failed: %s %n", m, ex.getCause()); ++ failed++; ++ } ++ } ++ } ++ System.out.printf("Passed: %d, Failed %d%n", passed, failed); ++ if (failed > 0) { ++ throw new RuntimeException("Tests failed: " + failed); ++ } ++ if (passed == 0 && failed == 0) { ++ throw new AssertionError("No test(s) selected: passed = " + ++ passed + ", failed = " + failed + " ??????????"); ++ } ++ } + + /* + * is a dual mode available in the test jdk +@@ -383,35 +435,46 @@ + * of use methods to check the test results. + */ + static class TestResult { +- StringBuilder status; ++ PrintWriter status; ++ StringWriter sw; + int exitValue; + List<String> testOutput; + Map<String, String> env; + Throwable t; ++ boolean testStatus; + + public TestResult(String str, int rv, List<String> oList, + Map<String, String> env, Throwable t) { +- status = new StringBuilder("Executed command: " + str + "\n"); ++ sw = new StringWriter(); ++ status = new PrintWriter(sw); ++ status.println("Executed command: " + str + "\n"); + exitValue = rv; + testOutput = oList; + this.env = env; + this.t = t; ++ testStatus = true; ++ } ++ ++ void appendError(String x) { ++ status.println(TEST_PREFIX + x); + } + +- void appendStatus(String x) { +- status = status.append(" " + x + "\n"); ++ void indentStatus(String x) { ++ status.println(" " + x); + } + + void checkNegative() { + if (exitValue == 0) { +- appendStatus("Error: test must not return 0 exit value"); ++ appendError("test must not return 0 exit value"); ++ testStatus = false; + testExitValue++; + } + } + + void checkPositive() { + if (exitValue != 0) { +- appendStatus("Error: test did not return 0 exit value"); ++ testStatus = false; ++ appendError("test did not return 0 exit value"); + testExitValue++; + } + } +@@ -422,7 +485,8 @@ + + boolean isZeroOutput() { + if (!testOutput.isEmpty()) { +- appendStatus("Error: No message from cmd please"); ++ testStatus = false; ++ appendError("No message from cmd please"); + testExitValue++; + return false; + } +@@ -431,7 +495,8 @@ + + boolean isNotZeroOutput() { + if (testOutput.isEmpty()) { +- appendStatus("Error: Missing message"); ++ testStatus = false; ++ appendError("Missing message"); + testExitValue++; + return false; + } +@@ -440,22 +505,26 @@ + + @Override + public String toString() { +- status.append("++++Begin Test Info++++\n"); +- status.append("++++Test Environment++++\n"); ++ status.println("++++Begin Test Info++++"); ++ status.println("Test Status: " + (testStatus ? "PASS" : "FAIL")); ++ status.println("++++Test Environment++++"); + for (String x : env.keySet()) { +- status.append(x).append("=").append(env.get(x)).append("\n"); ++ indentStatus(x + "=" + env.get(x)); + } +- status.append("++++Test Output++++\n"); ++ status.println("++++Test Output++++"); + for (String x : testOutput) { +- appendStatus(x); ++ indentStatus(x); + } +- status.append("++++Test Stack Trace++++\n"); +- status.append(t.toString()); ++ status.println("++++Test Stack Trace++++"); ++ status.println(t.toString()); + for (StackTraceElement e : t.getStackTrace()) { +- status.append(e.toString()); ++ indentStatus(e.toString()); + } +- status.append("++++End of Test Info++++\n"); +- return status.toString(); ++ status.println("++++End of Test Info++++"); ++ status.flush(); ++ String out = sw.toString(); ++ status.close(); ++ return out; + } + + boolean contains(String str) { +@@ -464,7 +533,7 @@ + return true; + } + } +- appendStatus("Error: string <" + str + "> not found"); ++ appendError("string <" + str + "> not found"); + testExitValue++; + return false; + } +@@ -475,9 +544,15 @@ + return true; + } + } +- appendStatus("Error: string <" + stringToMatch + "> not found"); ++ appendError("string <" + stringToMatch + "> not found"); + testExitValue++; + return false; + } + } ++ /** ++ * Indicates that the annotated method is a test method. ++ */ ++ @Retention(RetentionPolicy.RUNTIME) ++ @Target(ElementType.METHOD) ++ public @interface Test {} + } +--- jdk/test/tools/launcher/ToolsOpts.java 1969-12-31 16:00:00.000000000 -0800 ++++ jdk/test/tools/launcher/ToolsOpts.java 2013-01-16 08:58:13.000000000 -0800 +@@ -0,0 +1,217 @@ ++/* ++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @summary Test options patterns for javac,javah,javap and javadoc using ++ * javac as a test launcher. Create a dummy javac and intercept options to check ++ * reception of options as passed through the launcher without having to launch ++ * javac. Only -J and -cp ./* options should be consumed by the launcher. ++ * @run main ToolsOpts ++ * @author ssides ++ */ ++ ++import java.io.File; ++import java.io.IOException; ++import java.util.ArrayList; ++import java.util.List; ++ ++public class ToolsOpts extends TestHelper { ++ static final String JBCP_PREPEND = "-J-Xbootclasspath/p:"; ++ private static File testJar = null; ++ static String[][] optionPatterns = { ++ {"-J-Xmx128m"}, ++ {"-J-version"}, ++ {"-J-XshowSettings:vm"}, ++ {"-J-Xdiag"}, ++ {"-J-showversion"}, ++ {"-J-version", "-option"}, ++ {"-option"}, ++ {"-option:sub"}, ++ {"-option:sub-"}, ++ {"-option:sub1,sub2"}, // -option:list ++ {"-option:{sub1,sub2,sub3}"}, // -option:{list} ++ {"-option:{{sub1,sub2,sub3}}"},// -option:{{list}} ++ {"-option/c:/export/date/tmp"}, ++ {"-option=value"}, ++ {"-Dpk1.pk2.pk3"}, // dot in option ++ {"-Dpk1.pk2=value"}, // dot in option followed by =value ++ {"@<filename>"}, ++ {"-option", "http://site.com", "http://site.org"}, ++ {"-option", "name", "p1:p2.."}, ++ {"-All these non-options show launchers pass options as is to tool."}, ++ {"-option"}, ++ {"-option:sub"}, ++ {"-option:sub-"}, ++ {"-option", "<path>"}, ++ {"-option", "<file>"}, ++ {"-option", "<dir>"}, ++ {"-option", "http://a/b/c/g;x?y#s"}, ++ {"-option", "<html code>"}, ++ {"-option", "name1:name2"}, ++ {"-option", "3"}, ++ {"option1", "-J-version", "option2"}, ++ {"option1", "-J-version", "-J-XshowSettings:vm", "option2"},}; ++ ++ static void init() throws IOException { ++ if (testJar != null) { ++ return; ++ } ++ ++ // A tool which simulates com.sun.tools.javac.Main argument processing, ++ // intercepts options passed via the javac launcher. ++ final String mainJava = "Main" + JAVA_FILE_EXT; ++ testJar = new File("test" + JAR_FILE_EXT); ++ List<String> contents = new ArrayList<>(); ++ contents.add("package com.sun.tools.javac;"); ++ contents.add("public class Main {"); ++ contents.add(" public static void main(String... args) {\n"); ++ contents.add(" for (String x : args) {\n"); ++ contents.add(" if(x.compareTo(\" \")!=0)\n"); ++ contents.add(" System.out.println(x);\n"); ++ contents.add(" }\n"); ++ contents.add(" }\n"); ++ contents.add("}\n"); ++ createFile(new File(mainJava), contents); ++ ++ // compile and jar Main.java into test.jar ++ compile("-d", ".", mainJava); ++ createJar("cvf", testJar.getAbsolutePath(), "com"); ++ } ++ ++ static void pass(String msg) { ++ System.out.println("pass: " + msg); ++ } ++ ++ static void errout(String msg) { ++ System.err.println(msg); ++ } ++ ++ // Return position of -J option or -1 is does not contain a -J option. ++ static int indexOfJoption(String[] opts) { ++ for (int i = 0; i < opts.length; i++) { ++ if (opts[i].startsWith("-J")) { ++ return i; ++ } ++ } ++ return -1; ++ } ++ ++ /* ++ * Check that J options a) are not passed to tool, and b) do the right thing, ++ * that is, they should be passed to java launcher and work as expected. ++ */ ++ static void checkJoptionOutput(TestResult tr, String[] opts) throws IOException { ++ // Check -J-version options are not passed but do what they should. ++ String jopts = ""; ++ for (String pat : opts) { ++ jopts = jopts.concat(pat + " "); ++ if (tr.contains("-J")) { ++ throw new RuntimeException( ++ "failed: output should not contain option " + pat); ++ } ++ if (pat.compareTo("-J-version") == 0 || ++ pat.compareTo("-J-showversion") == 0) { ++ if (!tr.contains("java version") && ++ !tr.contains("openjdk version")) { ++ throw new RuntimeException("failed: " + pat + ++ " should display a version string."); ++ } ++ } else if (pat.compareTo("-J-XshowSettings:VM") == 0) { ++ if (!tr.contains("VM settings")) { ++ throw new RuntimeException("failed: " + pat + ++ " should have display VM settings."); ++ } ++ } ++ } ++ pass("Joption check: " + jopts); ++ } ++ ++ /* ++ * Feed each option pattern in optionPatterns array to javac launcher with ++ * checking program preempting javac. Check that option received by 'dummy' ++ * javac is the one passed on the command line. ++ */ ++ static void runTestOptions() throws IOException { ++ init(); ++ TestResult tr = null; ++ String sTestJar = testJar.getAbsolutePath(); ++ int jpos = -1; ++ for (String arg[] : optionPatterns) { ++ jpos = indexOfJoption(arg); ++ //Build a cmd string for output in results reporting. ++ String cmdString = javacCmd + " " + JBCP_PREPEND + sTestJar; ++ for (String opt : arg) { ++ cmdString = cmdString.concat(" " + opt); ++ } ++ switch (arg.length) { ++ case 1: ++ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar, ++ arg[0]); ++ break; ++ case 2: ++ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar, ++ arg[0], arg[1]); ++ break; ++ case 3: ++ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar, ++ arg[0], arg[1], arg[2]); ++ break; ++ case 4: ++ tr = doExec(javacCmd, JBCP_PREPEND + sTestJar, ++ arg[0], arg[1], arg[2], arg[3]); ++ break; ++ default: ++ tr = null; ++ break; ++ } ++ ++ String[] output = tr.testOutput.toArray(new String[tr.testOutput.size()]); ++ //-Joptions should not be passed to tool ++ if (jpos > -1) { ++ checkJoptionOutput(tr, arg); ++ if (tr.contains(arg[jpos])) { ++ throw new RuntimeException( ++ "failed! Should not have passed -J option to tool.\n" ++ + "CMD: " + cmdString); ++ } ++ } else { ++ //check that each non -J option was passed to tool. ++ for (int i = 0; i < arg.length; i++) { ++ if (output[i].compareTo(arg[i]) != 0) { ++ throw new RuntimeException( ++ "failed! CMD: " + cmdString + "\n case:" + ++ output[i] + " != " + arg[i]); ++ } else { ++ pass("check " + output[i] + " == " + arg[i]); ++ } ++ } ++ } ++ pass(cmdString); ++ } ++ } ++ ++ public static void main(String... args) throws IOException { ++ runTestOptions(); ++ } ++} --- langtools/.hgtags 2012-08-10 10:39:19.000000000 -0700 -+++ langtools/.hgtags 2012-08-19 11:53:31.000000000 -0700 ++++ langtools/.hgtags 2013-01-16 09:20:24.000000000 -0800 @@ -123,6 +123,7 @@ 9425dd4f53d5bfcd992d9aecea0eb7d8b2d4f62b jdk7-b146 d34578643d1c6c752d4a6b5e79c6ab1b60850b4a jdk7u1-b01 @@ -15163,15 +31690,39 @@ cd2cc8b5edb045b950aed46d159b4fb8fc2fd1df jdk7u1-b02 82820a30201dbf4b80f1916f3d0f4a92ad21b61a jdk7u1-b03 baa2c13c70fea3d6e259a34f0903197fdceb64b5 jdk7u1-b04 -@@ -197,5 +198,4 @@ +@@ -197,5 +198,28 @@ a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u6-b21 4f3aafa690d1fcb18693fc4085049eeffe4778f7 jdk7u6-b22 dd3e29d8892fcaba6d76431d5fa9d49e7c088f76 jdk7u6-b23 -a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u8-b01 -41bc8da868e58f7182d26b2ab9b6f8a4b09894ed jdk7u8-b02 +6aac89e84fc96d15bb78b13aa71c9e6b73d7237e jdk7u6-b24 ++bcd1d067d525065630deb98b678bc00b499adbe1 jdk7u6-b30 ++2d6017454236d4e95aad7feaff5fc92a612598f4 jdk7u7-b10 ++27041587508dbc4e08c956ba98a11ce0d5608dc4 jdk7u7-b30 ++b92a9f4f6bce4ec500ed3adb8203e6424b579f94 jdk7u7-b11 ++f0fd7463f02ea681ca53022d6d0d425ec1584b34 jdk7u7-b31 ++6bfc26fc14a0650805dd6583048db0b4f8669844 jdk7u7-b01 ++0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u7-b02 ++04848e261e42c697cb70401f8059186434855f33 jdk7u9-b03 ++0000000000000000000000000000000000000000 jdk7u7-b01 ++6bfc26fc14a0650805dd6583048db0b4f8669844 jdk7u9-b01 ++0000000000000000000000000000000000000000 jdk7u7-b02 ++0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u9-b02 ++9148cdb9a18b55ad7d51bb9644b6db812de34eea jdk7u9-b04 ++1de4a0865a714076b4922a9a7119adb98aee23f2 jdk7u9-b05 ++8dfbebb98865d822ddd9e0b9641d21e8bdb8a866 jdk7u10-b10 ++01c6dde274bd520067264231b3015c37e8e62d24 jdk7u10-b11 ++1fb02747d3bce646374c2cab95048c516cec6b01 jdk7u10-b12 ++14735b3d8bdffc7892f1db04b6262bdaad2eb9d7 jdk7u10-b13 ++f555fcdbd07156ee11b25fb4ac106065bbf496b4 jdk7u10-b14 ++dfcd16ac3fbcabed815b8ef4e792716cce0bce21 jdk7u10-b15 ++eaa8a0141c35edc382d7ce0b1148912db8422b16 jdk7u10-b16 ++7101b3e80e96b000b0b4f0bd7fe4dd7910d02f74 jdk7u10-b17 ++4f529e320d83f517a55065b4710c7f1e5ff692c9 jdk7u10-b18 ++1e5aed8511b9bea5c2ebe51a2d9094be8bac73cc jdk7u10-b30 --- langtools/test/Makefile 2012-08-10 10:39:30.000000000 -0700 -+++ langtools/test/Makefile 2012-08-19 11:53:32.000000000 -0700 ++++ langtools/test/Makefile 2013-01-16 09:20:24.000000000 -0800 @@ -42,6 +42,14 @@ ARCH=i586 endif @@ -15208,7 +31759,7 @@ # Root of all test results TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools --- langtools/test/tools/javac/4846262/Test.sh 2012-08-10 10:39:38.000000000 -0700 -+++ langtools/test/tools/javac/4846262/Test.sh 2012-08-19 11:53:33.000000000 -0700 ++++ langtools/test/tools/javac/4846262/Test.sh 2013-01-16 09:20:24.000000000 -0800 @@ -44,7 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15219,7 +31770,7 @@ ;; CYGWIN* ) --- langtools/test/tools/javac/6302184/T6302184.sh 2012-08-10 10:39:38.000000000 -0700 -+++ langtools/test/tools/javac/6302184/T6302184.sh 2012-08-19 11:53:33.000000000 -0700 ++++ langtools/test/tools/javac/6302184/T6302184.sh 2013-01-16 09:20:24.000000000 -0800 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15230,7 +31781,7 @@ ;; CYGWIN* ) --- langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2012-08-10 10:39:41.000000000 -0700 -+++ langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2012-08-19 11:53:33.000000000 -0700 ++++ langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2013-01-16 09:20:24.000000000 -0800 @@ -56,7 +56,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15241,7 +31792,7 @@ ;; Windows* ) --- langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2012-08-10 10:39:43.000000000 -0700 -+++ langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2012-08-19 11:53:33.000000000 -0700 ++++ langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2013-01-16 09:20:24.000000000 -0800 @@ -54,7 +54,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15252,7 +31803,7 @@ FS="/" ;; --- langtools/test/tools/javac/MissingInclude.sh 2012-08-10 10:39:44.000000000 -0700 -+++ langtools/test/tools/javac/MissingInclude.sh 2012-08-19 11:53:34.000000000 -0700 ++++ langtools/test/tools/javac/MissingInclude.sh 2013-01-16 09:20:24.000000000 -0800 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15263,7 +31814,7 @@ ;; Windows* ) --- langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2012-08-10 10:39:45.000000000 -0700 -+++ langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2012-08-19 11:53:34.000000000 -0700 ++++ langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2013-01-16 09:20:24.000000000 -0800 @@ -52,7 +52,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15274,7 +31825,7 @@ FS="/" ;; --- langtools/test/tools/javac/T5090006/compiler.sh 2012-08-10 10:39:47.000000000 -0700 -+++ langtools/test/tools/javac/T5090006/compiler.sh 2012-08-19 11:53:34.000000000 -0700 ++++ langtools/test/tools/javac/T5090006/compiler.sh 2013-01-16 09:20:24.000000000 -0800 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15285,7 +31836,7 @@ ;; Windows* ) --- langtools/test/tools/javac/apt.sh 2012-08-10 10:39:53.000000000 -0700 -+++ langtools/test/tools/javac/apt.sh 2012-08-19 11:53:34.000000000 -0700 ++++ langtools/test/tools/javac/apt.sh 2013-01-16 09:20:24.000000000 -0800 @@ -38,7 +38,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15296,7 +31847,7 @@ PS=":" FS="/" --- langtools/test/tools/javac/constDebug/ConstDebug.sh 2012-08-10 10:39:55.000000000 -0700 -+++ langtools/test/tools/javac/constDebug/ConstDebug.sh 2012-08-19 11:53:34.000000000 -0700 ++++ langtools/test/tools/javac/constDebug/ConstDebug.sh 2013-01-16 09:20:24.000000000 -0800 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15307,7 +31858,7 @@ FS="/" ;; --- langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2012-08-10 10:40:03.000000000 -0700 -+++ langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2012-08-19 11:53:35.000000000 -0700 ++++ langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2013-01-16 09:20:24.000000000 -0800 @@ -48,7 +48,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15318,7 +31869,7 @@ ;; CYGWIN* ) --- langtools/test/tools/javac/innerClassFile/Driver.sh 2012-08-10 10:40:14.000000000 -0700 -+++ langtools/test/tools/javac/innerClassFile/Driver.sh 2012-08-19 11:53:35.000000000 -0700 ++++ langtools/test/tools/javac/innerClassFile/Driver.sh 2013-01-16 09:20:24.000000000 -0800 @@ -53,7 +53,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15329,7 +31880,7 @@ ;; Windows* ) --- langtools/test/tools/javac/javazip/Test.sh 2012-08-10 10:40:14.000000000 -0700 -+++ langtools/test/tools/javac/javazip/Test.sh 2012-08-19 11:53:35.000000000 -0700 ++++ langtools/test/tools/javac/javazip/Test.sh 2013-01-16 09:20:24.000000000 -0800 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15340,7 +31891,7 @@ SCR=`pwd` ;; --- langtools/test/tools/javac/links/links.sh 2012-08-10 10:40:15.000000000 -0700 -+++ langtools/test/tools/javac/links/links.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javac/links/links.sh 2013-01-16 09:20:24.000000000 -0800 @@ -53,7 +53,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15351,7 +31902,7 @@ PS=":" FS="/" --- langtools/test/tools/javac/newlines/Newlines.sh 2012-08-10 10:40:17.000000000 -0700 -+++ langtools/test/tools/javac/newlines/Newlines.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javac/newlines/Newlines.sh 2013-01-16 09:20:24.000000000 -0800 @@ -50,7 +50,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15362,7 +31913,7 @@ ;; Windows* ) --- langtools/test/tools/javac/stackmap/T4955930.sh 2012-08-10 10:40:22.000000000 -0700 -+++ langtools/test/tools/javac/stackmap/T4955930.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javac/stackmap/T4955930.sh 2013-01-16 09:20:24.000000000 -0800 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15373,7 +31924,7 @@ ;; Windows_95 | Windows_98 | Windows_NT ) --- langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2012-08-10 10:40:25.000000000 -0700 -+++ langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2013-01-16 09:20:24.000000000 -0800 @@ -55,7 +55,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15384,7 +31935,7 @@ then ENV="env LANG=en_US.UTF-8" --- langtools/test/tools/javah/6257087/foo.sh 2012-08-10 10:40:28.000000000 -0700 -+++ langtools/test/tools/javah/6257087/foo.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javah/6257087/foo.sh 2013-01-16 09:20:24.000000000 -0800 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15395,7 +31946,7 @@ FS="/" ;; --- langtools/test/tools/javah/ConstMacroTest.sh 2012-08-10 10:40:28.000000000 -0700 -+++ langtools/test/tools/javah/ConstMacroTest.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javah/ConstMacroTest.sh 2013-01-16 09:20:24.000000000 -0800 @@ -56,7 +56,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15406,7 +31957,7 @@ FS="/" ;; --- langtools/test/tools/javah/MissingParamClassTest.sh 2012-08-10 10:40:28.000000000 -0700 -+++ langtools/test/tools/javah/MissingParamClassTest.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javah/MissingParamClassTest.sh 2013-01-16 09:20:24.000000000 -0800 @@ -58,7 +58,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15417,7 +31968,7 @@ FS="/" ;; --- langtools/test/tools/javah/ReadOldClass.sh 2012-08-10 10:40:28.000000000 -0700 -+++ langtools/test/tools/javah/ReadOldClass.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javah/ReadOldClass.sh 2013-01-16 09:20:24.000000000 -0800 @@ -43,7 +43,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15428,7 +31979,7 @@ FS="/" ;; --- langtools/test/tools/javap/pathsep.sh 2012-08-10 10:40:29.000000000 -0700 -+++ langtools/test/tools/javap/pathsep.sh 2012-08-19 11:53:36.000000000 -0700 ++++ langtools/test/tools/javap/pathsep.sh 2013-01-16 09:20:24.000000000 -0800 @@ -40,7 +40,7 @@ # set platform-dependent variables OS=`uname -s` @@ -15439,7 +31990,7 @@ ;; Windows* ) --- make/scripts/hgforest.sh 2012-08-10 09:07:04.000000000 -0700 -+++ make/scripts/hgforest.sh 2012-08-19 11:38:54.000000000 -0700 ++++ make/scripts/hgforest.sh 2013-01-15 23:01:23.000000000 -0800 @@ -1,7 +1,7 @@ #!/bin/sh diff --git a/java/openjdk7/files/patch-zzz-7u11 b/java/openjdk7/files/patch-zzz-7u11 new file mode 100644 index 000000000000..8703f26f9638 --- /dev/null +++ b/java/openjdk7/files/patch-zzz-7u11 @@ -0,0 +1,85 @@ + +# HG changeset patch +# User jrose +# Date 1357874549 28800 +# Node ID ecc14534318c80dc7612c8b1d328a67849c5b07f +# Parent 88c54f7a8c514b3df459cb086356387cd2c35d8a +8004933: Improve MethodHandle interaction with libraries +8006017: Improve lookup resolutions +Reviewed-by: ahgross + +--- jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java Tue Dec 04 17:28:38 2012 -0800 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java Thu Jan 10 19:22:29 2013 -0800 +@@ -418,6 +418,21 @@ class MethodHandleNatives { + return defc == sun.misc.Unsafe.class; + case "lookup": + return defc == java.lang.invoke.MethodHandles.class; ++ case "findStatic": ++ case "findVirtual": ++ case "findConstructor": ++ case "findSpecial": ++ case "findGetter": ++ case "findSetter": ++ case "findStaticGetter": ++ case "findStaticSetter": ++ case "bind": ++ case "unreflect": ++ case "unreflectSpecial": ++ case "unreflectConstructor": ++ case "unreflectGetter": ++ case "unreflectSetter": ++ return defc == java.lang.invoke.MethodHandles.Lookup.class; + case "invoke": + return defc == java.lang.reflect.Method.class; + case "get": +--- jdk/src/share/classes/java/lang/invoke/MethodHandles.java Tue Dec 04 17:28:38 2012 -0800 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandles.java Thu Jan 10 19:22:29 2013 -0800 +@@ -68,6 +68,10 @@ public class MethodHandles { + */ + public static Lookup lookup() { + return new Lookup(); ++ } ++ static { ++ // FIXME in MR1: Core Reflection cannot be used to gain a Lookup to perform MH reflection ++ Reflection.registerMethodsToFilter(MethodHandles.class, "lookup"); + } + + /** + + +# HG changeset patch +# User jrose +# Date 1357955621 28800 +# Node ID d9969a953f693f5760b1d2759f11a2cb222e4f20 +# Parent f9567d889266689d5b76f11a23584127848700bc +8006125: Update MethodHandles library interactions +Reviewed-by: mchung, jdn, ahgross + +--- jdk/src/share/classes/java/lang/invoke/MethodHandles.java Fri Jan 11 09:00:00 2013 -0800 ++++ jdk/src/share/classes/java/lang/invoke/MethodHandles.java Fri Jan 11 17:53:41 2013 -0800 +@@ -68,10 +68,6 @@ public class MethodHandles { + */ + public static Lookup lookup() { + return new Lookup(); +- } +- static { +- // FIXME in MR1: Core Reflection cannot be used to gain a Lookup to perform MH reflection +- Reflection.registerMethodsToFilter(MethodHandles.class, "lookup"); + } + + /** +--- jdk/src/share/classes/sun/reflect/misc/MethodUtil.java Fri Jan 11 09:00:00 2013 -0800 ++++ jdk/src/share/classes/sun/reflect/misc/MethodUtil.java Fri Jan 11 17:53:41 2013 -0800 +@@ -256,6 +256,12 @@ public final class MethodUtil extends Se + public static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + if (m.getDeclaringClass().equals(AccessController.class) || ++ (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.class) ++ && m.getName().equals("lookup")) || ++ (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.Lookup.class) ++ && (m.getName().startsWith("find") || ++ m.getName().startsWith("bind") || ++ m.getName().startsWith("unreflect"))) || + m.getDeclaringClass().equals(Method.class)) + throw new InvocationTargetException( + new UnsupportedOperationException("invocation not supported")); |